diff options
-rw-r--r-- | actionpack/lib/action_controller/metal/http_authentication.rb | 2 | ||||
-rw-r--r-- | actionpack/test/active_record_unit.rb | 18 | ||||
-rw-r--r--[-rwxr-xr-x] | activemodel/lib/active_model/serializers/xml.rb | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | activemodel/test/cases/serializers/xml_serialization_test.rb | 0 | ||||
-rw-r--r-- | activesupport/test/configurable_test.rb | 2 | ||||
-rw-r--r-- | activesupport/test/dependencies_test.rb | 10 | ||||
-rw-r--r-- | railties/CHANGELOG.md | 4 | ||||
-rw-r--r-- | railties/lib/rails/application.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/commands/application.rb | 3 |
9 files changed, 15 insertions, 26 deletions
diff --git a/actionpack/lib/action_controller/metal/http_authentication.rb b/actionpack/lib/action_controller/metal/http_authentication.rb index f50394837b..896238b7dc 100644 --- a/actionpack/lib/action_controller/metal/http_authentication.rb +++ b/actionpack/lib/action_controller/metal/http_authentication.rb @@ -458,7 +458,7 @@ module ActionController # pairs by the standardized `:`, `;`, or `\t` delimiters defined in # `AUTHN_PAIR_DELIMITERS`. def raw_params(auth) - auth.sub(TOKEN_REGEX, '').split /"\s*#{AUTHN_PAIR_DELIMITERS}\s*/ + auth.sub(TOKEN_REGEX, '').split(/"\s*#{AUTHN_PAIR_DELIMITERS}\s*/) end # Encodes the given token and options into an Authorization header value. diff --git a/actionpack/test/active_record_unit.rb b/actionpack/test/active_record_unit.rb index 4dd7406798..95fbb112c0 100644 --- a/actionpack/test/active_record_unit.rb +++ b/actionpack/test/active_record_unit.rb @@ -45,19 +45,11 @@ class ActiveRecordTestConnector def setup_connection if Object.const_defined?(:ActiveRecord) defaults = { :database => ':memory:' } - begin - adapter = defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3' - options = defaults.merge :adapter => adapter, :timeout => 500 - ActiveRecord::Base.establish_connection(options) - ActiveRecord::Base.configurations = { 'sqlite3_ar_integration' => options } - ActiveRecord::Base.connection - rescue Exception # errors from establishing a connection - $stderr.puts 'SQLite 3 unavailable; trying SQLite 2.' - options = defaults.merge :adapter => 'sqlite' - ActiveRecord::Base.establish_connection(options) - ActiveRecord::Base.configurations = { 'sqlite2_ar_integration' => options } - ActiveRecord::Base.connection - end + adapter = defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3' + options = defaults.merge :adapter => adapter, :timeout => 500 + ActiveRecord::Base.establish_connection(options) + ActiveRecord::Base.configurations = { 'sqlite3_ar_integration' => options } + ActiveRecord::Base.connection Object.send(:const_set, :QUOTED_TYPE, ActiveRecord::Base.connection.quote_column_name('type')) unless Object.const_defined?(:QUOTED_TYPE) else diff --git a/activemodel/lib/active_model/serializers/xml.rb b/activemodel/lib/active_model/serializers/xml.rb index 648ae7ce3d..648ae7ce3d 100755..100644 --- a/activemodel/lib/active_model/serializers/xml.rb +++ b/activemodel/lib/active_model/serializers/xml.rb diff --git a/activemodel/test/cases/serializers/xml_serialization_test.rb b/activemodel/test/cases/serializers/xml_serialization_test.rb index 99a9c1fe33..99a9c1fe33 100755..100644 --- a/activemodel/test/cases/serializers/xml_serialization_test.rb +++ b/activemodel/test/cases/serializers/xml_serialization_test.rb diff --git a/activesupport/test/configurable_test.rb b/activesupport/test/configurable_test.rb index 215a6e06b0..d00273a028 100644 --- a/activesupport/test/configurable_test.rb +++ b/activesupport/test/configurable_test.rb @@ -38,7 +38,7 @@ class ConfigurableActiveSupport < ActiveSupport::TestCase assert_equal :bar, Parent.config.foo end - test "configuration accessors is not available on instance" do + test "configuration accessors are not available on instance" do instance = Parent.new assert !instance.respond_to?(:bar) diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb index 51a7e4b2fe..9d913c27b0 100644 --- a/activesupport/test/dependencies_test.rb +++ b/activesupport/test/dependencies_test.rb @@ -923,10 +923,8 @@ class DependenciesTest < ActiveSupport::TestCase def test_remove_constant_does_not_autoload_already_removed_parents_as_a_side_effect with_autoloading_fixtures do - silence_warnings do - ::A - ::A::B - end + _ = ::A # assignment to silence parse-time warning "possibly useless use of :: in void context" + _ = ::A::B # assignment to silence parse-time warning "possibly useless use of :: in void context" ActiveSupport::Dependencies.remove_constant('A') ActiveSupport::Dependencies.remove_constant('A::B') assert !defined?(A) @@ -936,9 +934,7 @@ class DependenciesTest < ActiveSupport::TestCase def test_load_once_constants_should_not_be_unloaded with_autoloading_fixtures do ActiveSupport::Dependencies.autoload_once_paths = ActiveSupport::Dependencies.autoload_paths - silence_warnings do - ::A - end + _ = ::A # assignment to silence parse-time warning "possibly useless use of :: in void context" assert defined?(A) ActiveSupport::Dependencies.clear assert defined?(A) diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 3dd2944da3..88e08a29a6 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,5 +1,9 @@ ## Rails 4.0.0 (unreleased) ## +* Explicit options have precedence over `~/.railsrc` on the `rails new` command. + + *Rafael Mendonça França* + * Generated migrations now always use the `change` method. *Marc-André Lafortune* diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 9d71bf448d..8439d4864d 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -132,8 +132,6 @@ module Rails # * "action_dispatch.encrypted_cookie_salt" => config.action_dispatch.encrypted_cookie_salt # * "action_dispatch.encrypted_signed_cookie_salt" => config.action_dispatch.encrypted_signed_cookie_salt # - # These parameters will be used by middlewares and engines to configure themselves - # def env_config @env_config ||= begin if config.secret_key_base.nil? diff --git a/railties/lib/rails/commands/application.rb b/railties/lib/rails/commands/application.rb index ff0eda3413..2d9708e5b5 100644 --- a/railties/lib/rails/commands/application.rb +++ b/railties/lib/rails/commands/application.rb @@ -14,8 +14,7 @@ else extra_args_string = File.open(railsrc).read extra_args = extra_args_string.split(/\n+/).map {|l| l.split}.flatten puts "Using #{extra_args.join(" ")} from #{railsrc}" - ARGV << extra_args - ARGV.flatten! + ARGV.insert(1, *extra_args) end end |