From 29fa06a2348eb242edb8518f6af78f3927f03264 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Sun, 31 Jul 2016 14:57:47 +0900 Subject: Suppress warnings This commit suppressed `warning: instance variable @session_store not initialized`. e5a6f7ee9e951dbe0e4e9ea2c0743b4dfb135c57 introduced these warnings. --- railties/lib/rails/application/configuration.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'railties') diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 7d0c3daa23..285a63d4c6 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -34,6 +34,7 @@ module Rails @public_file_server.index_name = "index" @force_ssl = false @ssl_options = {} + @session_store = nil @time_zone = "UTC" @beginning_of_week = :monday @log_level = nil -- cgit v1.2.3 From e3fc35b5d68b66d5fa165baf69bf76c1110bb512 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Sun, 31 Jul 2016 16:25:39 +0900 Subject: remove unnecessary require and extend `rack/test` is require at the top of file. https://github.com/rails/rails/blob/master/railties/test/railties/engine_test.rb#L3 In addtion, `Rack::Test::Methods` is include in class, extend is unnecessary. https://github.com/rails/rails/blob/master/railties/test/railties/engine_test.rb#L9 --- railties/test/railties/engine_test.rb | 8 -------- 1 file changed, 8 deletions(-) (limited to 'railties') diff --git a/railties/test/railties/engine_test.rb b/railties/test/railties/engine_test.rb index 0eaa5bc351..fb8de84e1b 100644 --- a/railties/test/railties/engine_test.rb +++ b/railties/test/railties/engine_test.rb @@ -36,8 +36,6 @@ module RailtiesTest add_to_env_config "development", "config.assets.digest = false" boot_rails - require 'rack/test' - extend Rack::Test::Methods get "/assets/engine.js" assert_match "alert()", last_response.body @@ -321,8 +319,6 @@ module RailtiesTest RUBY boot_rails - require 'rack/test' - extend Rack::Test::Methods get "/sprokkit" assert_equal "I am a Sprokkit", last_response.body @@ -359,8 +355,6 @@ module RailtiesTest RUBY boot_rails - require 'rack/test' - extend Rack::Test::Methods get '/foo' assert_equal 'foo', last_response.body @@ -449,8 +443,6 @@ YAML RUBY boot_rails - require 'rack/test' - extend Rack::Test::Methods get "/admin/foo/bar" assert_equal 200, last_response.status -- cgit v1.2.3 From 31c1ed95d33bd9a46a6a4ebb5c1e1fa2af171969 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Wed, 3 Aug 2016 03:36:35 +0900 Subject: Show supported DBs first in `rails new --help` --- railties/lib/rails/generators/app_base.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'railties') diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 8d4056c202..3e0fedb7d2 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -10,7 +10,7 @@ require 'active_support/core_ext/array/extract_options' module Rails module Generators class AppBase < Base # :nodoc: - DATABASES = %w( mysql oracle postgresql sqlite3 frontbase ibm_db sqlserver ) + DATABASES = %w( mysql postgresql sqlite3 oracle frontbase ibm_db sqlserver ) JDBC_DATABASES = %w( jdbcmysql jdbcsqlite3 jdbcpostgresql jdbc ) DATABASES.concat(JDBC_DATABASES) @@ -266,12 +266,12 @@ module Rails end def gem_for_database - # %w( mysql oracle postgresql sqlite3 frontbase ibm_db sqlserver jdbcmysql jdbcsqlite3 jdbcpostgresql ) + # %w( mysql postgresql sqlite3 oracle frontbase ibm_db sqlserver jdbcmysql jdbcsqlite3 jdbcpostgresql ) case options[:database] - when "oracle" then ["ruby-oci8", nil] + when "mysql" then ["mysql2", [">= 0.3.18", "< 0.5"]] when "postgresql" then ["pg", ["~> 0.18"]] + when "oracle" then ["ruby-oci8", nil] when "frontbase" then ["ruby-frontbase", nil] - when "mysql" then ["mysql2", [">= 0.3.18", "< 0.5"]] when "sqlserver" then ["activerecord-sqlserver-adapter", nil] when "jdbcmysql" then ["activerecord-jdbcmysql-adapter", nil] when "jdbcsqlite3" then ["activerecord-jdbcsqlite3-adapter", nil] @@ -284,9 +284,9 @@ module Rails def convert_database_option_for_jruby if defined?(JRUBY_VERSION) case options[:database] - when "oracle" then options[:database].replace "jdbc" when "postgresql" then options[:database].replace "jdbcpostgresql" when "mysql" then options[:database].replace "jdbcmysql" + when "oracle" then options[:database].replace "jdbc" when "sqlite3" then options[:database].replace "jdbcsqlite3" end end -- cgit v1.2.3