nRake Microsoft Case Study
nRake is now the subject of a Microsoft case study. Check it out here:
UPDATE: Now on the Microsoft Case Study site.
Categories : ALT.NET, C#, Design / Architecture, Ruby / Rails, Technical
nRake is now the subject of a Microsoft case study. Check it out here:
UPDATE: Now on the Microsoft Case Study site.
During the RORO hack night last Wednesday, Ryan Bigg (@ryanbigg) and I worked on a Rails Refactor, something I've been meaning to get going for a long time.
How often have you wasted time doing renames in rails? Sure it's hard to automate everything without understanding the code, but there sure are a lot of mechanical steps that you can easily automate. Ryan and I took on controller renames and got a fair way in the few hours we spent on the night.
To rename a controller:
$ rails_refactor.rb rename OldController NewController
To rename a controller action:
$ rails_refactor.rb rename DummyController.old_action new_action
Looking to extend it with model renames, and then more complex refactoring.
If you like it, please fork and contribute
While comparing Dates and Times in Rails (both 2.3 and 3), I came across an odd behaviour:
>> Time.parse("Mon, 26 Jul 2010 9:59") == Date.new(2010, 7, 26)
=> false
>> Time.parse("Mon, 26 Jul 2010 10:00") == Date.new(2010, 7, 26)
=> true
>> Time.parse("Mon, 26 Jul 2010 10:01") == Date.new(2010, 7, 26)
=> false
Also
>> Date.new(2010, 7, 26) == Time.parse("Mon, 26 Jul 2010 10:00")
=> false (Rails 2.3)
=> nil (Rails 3)
>> Date.new(2010, 7, 26) == Time.parse("Mon, 26 Jul 2010 0:00")
=> false (Rails 2.3)
=> nil (Rails 3)
Tonight, we'll be having the RORO hack night in the ThoughtWorks Sydney office, with a focus on open source projects (your own or contributing). A patch for this date/time behaviour might be an interesting area to pursue.