We'll respond shortly.
Two new interesting open-source Objective-C frameworks bookended our week this week:
First, Peter Kim sent a message to the Cedar-discuss mailing list to introduce us to his new matcher framework Expecta. Now, instead of OCHamcrest's
assertThatBool(maybe, equalToBool(NO)) shenanigans one can simply
expect(2+2).toEqual(4); There's also a nice DSL for implementing custom matchers for objects.
Excited about the possibilities, Kurtis and I spiked on implementing a set of custom matchers for commonly-used Cocoa structs such as CGPoint, something we have found lacking in current tools and testing patterns. Our entire project team looks forward to writing more tests using Expecta.
Also, Twitter Engineering just announced TwUI, a new Core Animation-based UI framework for OS X. Fun times.
"What does it take to get formtastic and paperclip working together out of the box?"
An enquiring Pivot would like to know.
*"Did you know Skype history is regex-aware?"
Now go ahead and correct yourself before resending that message...
heroku_san + autotagger >>> anyone? anyone? Ken wants to talk to you.
versions in .rvmrc -- use them. If you're simply using ree@gemset things might fall apart after an upgrade. A better practice would be to use bundler, which will be more reliable in reinstalling your required gems if your ruby is upgraded.
Pair eXchange at Pivotal SF tonight. Bring your side project and your thinking brain, and look forward to some fun pair programming!
Thursday, October 28 at 6:30PM
Pivotal Labs is hosting and our own Sarah Mei is leading an open source workshop for developers interested in learning about contributing to open source projects. Sarah will be using the Diaspora project as an example, and the Diaspora team will be on hand to assist. Email Sarah at sarahmei at pivotallabs dot com for more info, or view the meetup page here
"How do I use RVM on the server?"
RVM on the server can be fraught with peril. Be sure that your (or your process's) shell is being invoked in a way which plays nice with RVM, for instance bash -lc or bash -ic in cron.
"Why does Google Street View give me a grey dead area instead of a picture of some dude's house?"
Most likely this is due to having requested a view for an area where none is available. The Google docs have been found to be a bit misleading on this, however there is an api call to see if there is an available street view for a given radius -- try increasing this radius near your lat & long until you get success in order to avoid a useless response.
Switching to resque might help, but not without first rewriting the jobs.
More research yielded the fact that delayed_job reopens all files (including the log files) when it spins up. Under Ruby 1.8, File#reopen defaults file mode to last set, while 1.9 defaults to read only. This could easily cause logging failures. (with a nod to Davis W. Frank for the followup info)
Calling .destroy on a has_one relationship does not update the record association to nil, which can cause problems when the relationship is subsequently updated. It was suggested that calling .clear on the association might help work around the issue.
Rails 3 request helper methods in ActionController::TestCase::Behavior take the session and flash hashes as parameters, as opposed to setting them explicitly before making a normal get request. Compare http://api.rubyonrails.org/classes/ActionController/TestCase/Behavior.html#method-i-get with http://api.rubyonrails.org/classes/ActionDispatch/Integration/RequestHelpers.html#method-i-get for more detail