This project is archived and is in readonly mode.
Rails::Generators::GeneratedAttribute: tests, cleanups and a bugfix
-
Jeff Kreeftmeijer
- Tag changed from bug, cleanup, generators, patch, tests to 3.x, bug, cleanup, generators, patch, tests
-
Rohit Arondekar
- State changed from new to resolved
- Assigned user set to Rizwan Reza
+1 Nice DRY'ing up, looks cleaner and all tests pass(on 1.9.2-head).
However I got a warning from Git:
rohit@rohit-desktop:~/remote-repos/rails_patches/working3$ git am < ../others_patches/generated_attribute_tests.diff
Applying: Rails::Generators::GeneratedAttribute: tests, cleanups and a bugfix [#4631 Rails::Generators::GeneratedAttribute: tests, cleanups and a bugfix state:resolved]
/home/rohit/remote-repos/rails_patches/working3/.git/rebase-apply/patch:176: trailing whitespace./home/rohit/remote-repos/rails_patches/working3/.git/rebase-apply/patch:183: trailing whitespace.
/home/rohit/remote-repos/rails_patches/working3/.git/rebase-apply/patch:192: trailing whitespace.
warning: 3 lines add whitespace errors.
-
Ryan Bigg
- State changed from resolved to open
Please be careful with putting bracketted stuff like [#ticket_no resolved] as it will mark that ticket as resolved.
-
Rohit Arondekar
Sorry about that, and thanks Ryan for changing state to open. Will take care not to repeat this again.
-
Jeff Kreeftmeijer
Checked the trailing whitespace problem out, seemed that there were some trailing spaces in
railties/test/generators/generated_attribute_test.rb. Here's a new patch. :) -
Rohit Arondekar
One test fails on 1.9.2-head, see => http://pastie.org/969479
It appears that in 1.9.2 Proc doesn't have marshal_dump defined. But playing in irb I noticed both 1.8.7 and 1.9.2-head, Proc doesn't have marshal_dump defined, so where is it coming from?Someone might want to look at marshal.rb in activesupport, it has some 1.9.2 stuff in it, I don't know if it's relevant though.
-
Rohit Arondekar
I made a mistake in my original comment, I had tested on 1.8.7 and not 1.9.2-head.
-
Rizwan Reza
- No changes were found…
-
Jeff Kreeftmeijer
I can't seem to reproduce Rohit's test fail on master with and without the patch on Ruby 1.8.7-p249 and 1.9.1-p376.
Can anybody else reproduce this? Also, isn't it really unlikely that my patch would cause this?
-
Rohit Arondekar
I had tested on 1.9.2-head. I tried again both before and after applying the patch and all tests pass.
P.S I have no idea why it failed the last time, maybe my environment is borked. :(
-
Anil Wadghule
+1 tests pass (1.8.7)
One thing, is it right to replace then Date.today.to_s(:db) with then Date.today.to_s?
If I recall correctly, Date object also supported .to_s(:db).
-
Jeff Kreeftmeijer
Anil was right, I've put
.to_s(:db)back, and includedactive_support/timeinRails::Generators::GeneratedAttribute. Here's a new patch. :) -
Rohit Arondekar
+1 Tests pass on
ruby 1.9.2dev (2010-05-08 trunk 27665)
ruby 1.8.7 (2009-06-12 patchlevel 174)Like the DRY'ing up and the tests look cleaner.
-
Shih-gian Lee
+1 for me too on 1.8.7. Agree with Rohit. Like the code refactoring to make it more DRY.
-
Rizwan Reza
- Milestone cleared.
- Tag changed from 3.x, bug, cleanup, generators, patch, tests to 3.x, bug, bugmash-review, cleanup, generators, patch, tests
- State changed from open to verified
-
Santiago Pastorino
- Assigned user changed from Rizwan Reza to José Valim
-
Repository
- State changed from verified to resolved
(from [d93b45e8d32e3c4917c6b16bcea3a694800d2c49]) Rails::Generators::GeneratedAttribute: tests, cleanups and a bugfix [#4631 Rails::Generators::GeneratedAttribute: tests, cleanups and a bugfix state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/d93b45e8d32e3c4917c6b16bcea3a6... -
Rizwan Reza
- Tag changed from 3.x, bug, bugmash-review, cleanup, generators, patch, tests to 3.x, bug, cleanup, generators, patch, tests
