Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e207bd1
in class assignment
Oct 3, 2014
861333c
Update roster.txt
sojama Oct 3, 2014
f3cfe7a
Update roster.txt
syearva Oct 3, 2014
d025cb9
kenny added
Oct 3, 2014
0477f03
Update roster.txt
Pensive1881 Oct 3, 2014
f46f230
Update roster.txt
edwinfu Oct 3, 2014
f4c4c4d
Update roster.txt
Oct 3, 2014
6848604
added Nathan's info
natron19 Oct 3, 2014
a45c952
Merge pull request #2 from sojama/master
reneedv Oct 3, 2014
646f197
Update roster.txt
metroretro Oct 3, 2014
6367821
Exercise.
GGadow Oct 3, 2014
2a84337
Merge pull request #3 from Pensive1881/patch-1
reneedv Oct 3, 2014
ea01298
Update roster.txt
rcrelia Oct 3, 2014
29716b2
Merge pull request #4 from edwinfu/master
reneedv Oct 3, 2014
fb1480d
Merge pull request #8 from ktrops/master
reneedv Oct 3, 2014
418ddc2
Added Tom to roster
tomun Oct 3, 2014
3f1b2bf
Merge pull request #15 from tomun/master
reneedv Oct 3, 2014
95d8bd4
work from class
reneedv Oct 3, 2014
1f3f769
Merge branch 'master' of github.com:UWE-Ruby/RubyFall2014
reneedv Oct 3, 2014
7e3ce3c
put whitespace at end of file so PR's can be merged
reneedv Oct 3, 2014
ddcb30a
Merge pull request #9 from natron19/master
reneedv Oct 3, 2014
c50fde0
merge in Gregg's changes
reneedv Oct 3, 2014
f6ff6f3
Merge branch 'master' of github.com:UWE-Ruby/RubyFall2014
reneedv Oct 3, 2014
28af7c6
add Scott's info
reneedv Oct 3, 2014
ecf80a7
add Surendra's info
reneedv Oct 3, 2014
2e341d9
add Kenny's info
reneedv Oct 3, 2014
42ef1bf
add Joe's info
reneedv Oct 3, 2014
72e6dad
add Rick's info
reneedv Oct 3, 2014
b5015eb
add Emily's info
reneedv Oct 3, 2014
d15be6b
week 2 materials
reneedv Oct 9, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions week1/exercises/roster.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
0, Renée, renee@nird.us, reneedv, @nirdllc, Renee
1, Katie, katrops@gmail.com, katrops, @kjtrops, Katie
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
3, Alex, lumberjackparade@hotmail.com, Pensive1881
4, Rick, rcrelia@gmail.com, rcrelia, @rcrelia, Rick
5, Edwin, edwin.fu@gmail.com, edwinfu, @edwinfu,
6, Gregg, gpg@gregory-gadow.net, GGadow, n/a, Gregg
7 Alicia, aliciagoodwin@gmail.com, sojama
8, Scott Kostojohn, skostojohn@hotmail.com,skostojohn,@crm_scott, Scott
9, Kenny, lukenny@gmail.com, lukenny, , Kenny
10, Nathan, nathanrohm@gmail.com, natron19, natron19, natron19
11, Emily, emxruf@gmail.com, no twitter, metroretro, Emily
12, joseph , jjs0sbw@gmail.com, jjs0sbw, @jjs0sbw, huh?
13,
14,
14, Tom, tunderhill@gmail.com, tomun, @tomun,
15, Surendra, mohan.surendra@gmail.com, syearva, ,
11 changes: 6 additions & 5 deletions week1/exercises/rspec_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,19 @@
# Fix the Failing Test
# Order of Operations is Please Excuse My Dear Aunt Sally:
# Parentheses, Exponents, Multiplication, Division, Addition, Subtraction
(1+2-5*6/2).should eq -13
(1+2-5*6/2).should eq -12
end
it "should count the characters in your name" do
pending "make a test to count the characters in your name"
"Name".should have(5).characters
"Tom".should have(3).characters
end

it "should check basic math" do
pending "make a test to check some basic math"
(1+1).should eq 2
end

it "should check basic spelling"
it "should check basic spelling" do
"field".should include("ie")
end

end
end
10 changes: 10 additions & 0 deletions week2/class_materials/resources.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

Ruby Docs: http://www.ruby-doc.org/core-1.9.3/String.html
Pragmatic Programmers Guide: http://pragprog.com/book/ruby3/programming-ruby-1-9 (at the bottom is the link to the extending Ruby pdf I mentioned)

Travis CI (where open source projects are tested): https://travis-ci.org
grb: https://github.com/jinzhu/grb
The Ruby ToolBox: https://www.ruby-toolbox.com/

my alias for rspec:
alias rspec="rspec --color --format documentation"
Binary file added week2/class_materials/week2.key
Binary file not shown.
Binary file added week2/class_materials/week2.pdf
Binary file not shown.
Empty file added week2/examples/.keep
Empty file.
17 changes: 17 additions & 0 deletions week2/exercises/book.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class Book
attr_accessor :title
attr_reader :page_count

@@book_count = 0

def self.book_count
@@book_count
end

def initialize title = "Not Set", page_count = 0
@@book_count += 1
@page_count = page_count
@title = title
end

end
49 changes: 49 additions & 0 deletions week2/exercises/book_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
require_relative 'book'
require_relative '../../spec_helper'

describe Book do

context "::book_count" do

it "should count how many books have been created" do
Book.new
Book.new
Book.new
Book.book_count.should eq 3
end

end

context "::new" do

it "should set some defaults" do
Book.new.title.should eq "Not Set"
end

it "should allow us to set the page count" do
book = Book.new "Harry Potter", 5
book.page_count.should eq 5
end

end

context "#title" do

before :each do
@book = Book.new
end

it "should have a title" do
@book.should respond_to "title"
end

it "should allow me to set the title" do
@book.title = "Snow Crash"
@book.title.should eq "Snow Crash"
end



end

end
10 changes: 10 additions & 0 deletions week2/exercises/mad_libs.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
puts "Please enter a noun"
noun = gets.chomp
puts "Please enter an adjective"
adjective = gets.chomp
puts "Please enter a past tense action verb"
verb_past_tense = gets.chomp
puts "What does the #{noun} say?"
says = gets.chomp
story = "The #{adjective} #{noun} #{verb_past_tense} past the graveyard and says #{says}"
puts story
13 changes: 13 additions & 0 deletions week2/homework/questions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Please Read The Chapters on:
Containers, Blocks, and Iterators
Sharing Functionality: Inheritance, Modules, and Mixins

1. What is the difference between a Hash and an Array?

2. When would you use an Array over a Hash and vice versa?

3. What is a module? Enumerable is a built in Ruby module, what is it?

4. Can you inherit more than one thing in Ruby? How could you get around this problem?

5. What is the difference between a Module and a Class?
48 changes: 48 additions & 0 deletions week2/homework/simon_says_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Hint: require needs to be able to find this file to load it
require_relative "simon_says.rb"
require_relative '../../spec_helper'

describe SimonSays do
include SimonSays # Hint: Inclusion is different than SimonSays.new (read about modules)

# Hint: We are just calling methods, we are not passing a message to a SimonSays object.
it "should echo hello" do
echo("hello").should == "hello"
end

it "should echo bye" do
echo("bye").should == "bye"
end

it "should shout hello" do
shout("hello").should == "HELLO"
end

it "should shout multiple words" do
shout("hello world").should == "HELLO WORLD"
end

it "should repeat" do
repeat("hello").should == "hello hello"
end

it "should repeat a number of times" do
repeat("hello", 3).should == "hello hello hello"
end

it "should return the first letter" do
start_of_word("hello", 1).should == "h"
end

it "should return the first two letters" do
start_of_word("Bob", 2).should == "Bo"
end

it "should tell us the first word of 'Hello World' is 'Hello'" do
first_word("Hello World").should == "Hello"
end

it "should tell us the first word of 'oh dear' is 'oh'" do
first_word("oh dear").should == "oh"
end
end