Rebuilding Rails

120 views
Skip to first unread message

Cynthia Kiser

unread,
Aug 22, 2013, 1:12:33 AM8/22/13
to laruby...@googlegroups.com
Excellent meeting this evening. We covered the material in chapter 1 - and the testing exercise. Thanks Ricky for starting us off and for graciously sharing his screen for the duration. 

A couple of notes for those following along at home:
  1) The book is a little unclear about where to create the best_quotes directory. It is not part of your rulers library so should not be inside the rulers directory. We moved ours to be in a directory parallel to our rulers directory.

  2) Looks like there is a typo in the test_helper.rb file for Exercise 3. The directory you want is actually found at:

                this_dir = File.join(File.dirname(__FILE__), "..", "lib")

     (note the extra "lib" part) 

For those of you who haven't yet purchased the book yet, you can find it at http://rebuilding-rails.com/ Next week we'll be continuing with chapter 2. Please try out the exercises if you can. Questions make good starting points for our discussions.

Richard Manriquez

unread,
Aug 22, 2013, 4:32:29 AM8/22/13
to laruby...@googlegroups.com
Hi folks.  Thanks Cynthia for posting this.  Happy to be the guinea pig for the greater good.

Also, for any folks who are curious about my setup tonight:
tmux (http://tmux.sourceforge.net/) - screen splitting, multiple shells
vim with Janus plugins (https://github.com/carlhuda/janus) - text editor
pry (http://pryrepl.org/) - IRB/ruby console replacement
iTerm 2 (http://www.iterm2.com/) - Terminal replacement

and my config files are on github (https://github.com/dechimp/dotfiles)

-Ricky

Cynthia Kiser

unread,
Aug 22, 2013, 5:42:10 PM8/22/13
to laruby...@googlegroups.com
By the way, tonight's Eastside/Westside joint study group meeting look very relevant to last night's discussions about gems - how to make them, how to use them, and how to extract them from an existing application. If you can manage it, might be fun to continue learning at tonight's meeting. 6:30 PM at Pivotal Labs in Santa Monica. Details at: http://www.meetup.com/laruby/events/134475422/

Cynthia Kiser

unread,
Aug 24, 2013, 6:27:27 PM8/24/13
to laruby...@googlegroups.com
Hey all, our group has a GitHub repository with things we have worked on over the years. I added repositories for the work we did this week on the rulers and best quotes projects. Feel free to fork, add stuff, and submit pull requests.

Cynthia Kiser

unread,
Sep 5, 2013, 1:20:17 AM9/5/13
to laruby...@googlegroups.com
Good to see everyone again this week. This week we worked on adding automatic loading to our Rulers gem - and then used that to automatically load controllers in our Best Quotes application. Thanks (?) to a typo in a file name, we got a lot of practice debugging it. 

Next week views! See you then.

Cynthia Kiser

unread,
Sep 5, 2013, 1:24:25 AM9/5/13
to laruby...@googlegroups.com
Oh, and I forgot to mention that the Pragmatic Bookshelf is having a sale on paper books - including the Deploying Rails book we were considering reading for one of our next books. Get while the getting's good: http://pragprog.com/news/no-batteries-required-book-sale-and-new-pragpub-issue 

Cynthia Kiser

unread,
Sep 9, 2013, 12:20:09 AM9/9/13
to laruby...@googlegroups.com
Anyone else done the exercises for this chapter yet? I worked on them this evening and things are mostly working - except that you now have to run the tests from without the test directory or the controller can't find the view files. The problem is this line in the render method which makes the app and the tests sensitive to where you start the ruby process: 

  filename = File.join "app", "views", controller_name, "#{view_name}.html.erb"

For the app the relative path is a good thing - but it prevents my tests from running as I want them to. Suggestions?

Richard Manriquez

unread,
Sep 10, 2013, 6:35:07 PM9/10/13
to laruby...@googlegroups.com
I am doing Exercise 1 from this chapter, but I am really confused by what he is talking about.  He's throwing all kinds of things at me I've never seen before without explaining them.  This might be an interesting discussion this week...

-Ricky


--
You received this message because you are subscribed to the Google Groups "LA Ruby Study Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to laruby-books...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

John Ryan

unread,
Sep 13, 2013, 12:22:39 PM9/13/13
to laruby...@googlegroups.com
FWIW...

I was inspired by our test authoring, the other night.

These days, I prefer to test-drive my code.  So, I asked the question, "what core functionality are we expecting from Rulers, at this point?" and then wrote the minimal set of tests that describe that functionality.


I am playing with splitting the class definition up so that the corresponding mock controllers are physically next to the test case methods that use them (rather than force you, the reader, to hunt for them elsewhere in the file).

I know I like this, but what matters is how it reads for others...

Question: do you find this way of organizing the test class readable? (as compared to having all the test methods in one "class" declaration)
Reply all
Reply to author
Forward
0 new messages