Hi, I have some doubts considering contributions to Rails.

For instance, in attachments follows a patch to change from:

       default.config = config if config
       default.config ||= Configuration.new

To:

       default.config = config || Configuration.new

That seems more clear to me.

This little change really doesn't make much difference but I think it 
makes the code a bit cleaner... Opening an issue in LightHouse to do 
just that seems a little too much in my opinion. Is there any way that 
we can do little changes like this in an easy way, such as happens in 
docrails project? Maybe some Rails fork for some fast code cleaning with 
open commit access?

Then, here is the next question. I was reading this guide:

http://guides.rails.info/contributing_to_rails.html

But it was not clear if I should run all tests for all Rails modules 
when changing something like this. First, I didn't see an option to run 
the tests only for sqlite3, for instance in Rails root, just when 
testing ActiveRecord alone. Anyway, I tried to:

 > cd railties
 > rake regular_test (I didn't find any other related task)

First, it asked to install the rack-test gem (maybe we should state that 
in Rails guides, anyway). Then it seems that the testing is requiring 
Initilizer twice for some reason:

rails/railties/lib/initializer.rb:17: It looks like initializer.rb was 
required twice (RuntimeError)

How should I run the Rails tests and which gems I need to install and 
what configurations should I do?

Thanks in advance,

Rodrigo.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

>From c26702e74dedc9d3f1a4ed59963002be4e2c243b Mon Sep 17 00:00:00 2001
From: Rodrigo Rosenfeld Rosas <[email protected]>
Date: Sun, 13 Sep 2009 15:03:36 +0000
Subject: [PATCH] Code cleaning

---
 railties/lib/initializer.rb |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb
index d882a67..8225d6d 100644
--- a/railties/lib/initializer.rb
+++ b/railties/lib/initializer.rb
@@ -104,8 +104,7 @@ module Rails
     end
 
     def self.run(initializer = nil, config = nil)
-      default.config = config if config
-      default.config ||= Configuration.new
+      default.config = config || Configuration.new
       yield default.config if block_given?
       default.run(initializer)
     end
-- 
1.6.2.4

Reply via email to