diff options
Diffstat (limited to 'railties')
9 files changed, 42 insertions, 14 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 96149acc08..a1736470ae 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,5 +1,9 @@ ## Rails 5.0.0.beta2 (February 01, 2016) ## +* Add dummy files for apple-touch-icon.png and apple-touch-icon.png. GH#23427 + + *Alexey Zabelin* + * Add `after_bundle` callbacks in Rails plugin templates. Useful for allowing templates to perform actions that are dependent upon `bundle install`. diff --git a/railties/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml b/railties/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml index 9e99264d33..80ceb9df92 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml +++ b/railties/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml @@ -1,4 +1,4 @@ -# PostgreSQL. Versions 8.2 and up are supported. +# PostgreSQL. Versions 9.1 and up are supported. # # Configure Using Gemfile # gem 'activerecord-jdbcpostgresql-adapter' diff --git a/railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml b/railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml index feb25bbc6b..d51b2ec199 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml +++ b/railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml @@ -1,4 +1,4 @@ -# PostgreSQL. Versions 8.2 and up are supported. +# PostgreSQL. Versions 9.1 and up are supported. # # Install the pg driver: # gem install pg diff --git a/railties/lib/rails/generators/rails/app/templates/public/apple-touch-icon-precomposed.png b/railties/lib/rails/generators/rails/app/templates/public/apple-touch-icon-precomposed.png new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/railties/lib/rails/generators/rails/app/templates/public/apple-touch-icon-precomposed.png diff --git a/railties/lib/rails/generators/rails/app/templates/public/apple-touch-icon.png b/railties/lib/rails/generators/rails/app/templates/public/apple-touch-icon.png new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/railties/lib/rails/generators/rails/app/templates/public/apple-touch-icon.png diff --git a/railties/lib/rails/tasks/routes.rake b/railties/lib/rails/tasks/routes.rake index 353b8b4e72..939fa59c75 100644 --- a/railties/lib/rails/tasks/routes.rake +++ b/railties/lib/rails/tasks/routes.rake @@ -9,8 +9,8 @@ task routes: :environment do inspector = ActionDispatch::Routing::RoutesInspector.new(all_routes) if ARGV.any?{ |argv| argv.start_with? 'CONTROLLER' } puts <<-eow.strip_heredoc - Passing `CONTROLLER` to `bin/rake routes` is deprecated and will be removed in Rails 5.1. - Please use `bin/rake routes -c controller_name` instead. + Passing `CONTROLLER` to `bin/rails routes` is deprecated and will be removed in Rails 5.1. + Please use `bin/rails routes -c controller_name` instead. eow end @@ -18,7 +18,7 @@ task routes: :environment do routes_filter = { controller: ENV['CONTROLLER'] } if ENV['CONTROLLER'] OptionParser.new do |opts| - opts.banner = "Usage: rake routes [options]" + opts.banner = "Usage: rails routes [options]" opts.on("-c", "--controller [CONTROLLER]") do |controller| routes_filter = { controller: controller } end diff --git a/railties/lib/rails/test_unit/line_filtering.rb b/railties/lib/rails/test_unit/line_filtering.rb index dab4d3631d..b7635c71f4 100644 --- a/railties/lib/rails/test_unit/line_filtering.rb +++ b/railties/lib/rails/test_unit/line_filtering.rb @@ -26,7 +26,7 @@ module Rails private def derive_regexp(filter) # Regexp filtering copied from Minitest. - filter =~ %r%/(.*)/% ? Regexp.new($1) : filter + Regexp.new $1 if filter =~ %r%/(.*)/% end def derive_line_filters(patterns) diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index 7171aa6e1a..745a3e3ec5 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -141,9 +141,9 @@ module ApplicationTests end RUBY - output = Dir.chdir(app_path){ `bin/rake routes CONTROLLER=cart` } - assert_equal ["Passing `CONTROLLER` to `bin/rake routes` is deprecated and will be removed in Rails 5.1.", - "Please use `bin/rake routes -c controller_name` instead.", + output = Dir.chdir(app_path){ `bin/rails routes CONTROLLER=cart` } + assert_equal ["Passing `CONTROLLER` to `bin/rails routes` is deprecated and will be removed in Rails 5.1.", + "Please use `bin/rails routes -c controller_name` instead.", "Prefix Verb URI Pattern Controller#Action", " cart GET /cart(.:format) cart#show\n"].join("\n"), output @@ -183,7 +183,7 @@ module ApplicationTests end RUBY - output = Dir.chdir(app_path){ `bin/rake routes -g show` } + output = Dir.chdir(app_path){ `bin/rails routes -g show` } assert_equal "Prefix Verb URI Pattern Controller#Action\n cart GET /cart(.:format) cart#show\n", output end @@ -195,13 +195,13 @@ module ApplicationTests end RUBY - output = Dir.chdir(app_path){ `bin/rake routes -c cart` } + output = Dir.chdir(app_path){ `bin/rails routes -c cart` } assert_equal "Prefix Verb URI Pattern Controller#Action\n cart GET /cart(.:format) cart#show\n", output - output = Dir.chdir(app_path){ `bin/rake routes -c Cart` } + output = Dir.chdir(app_path){ `bin/rails routes -c Cart` } assert_equal "Prefix Verb URI Pattern Controller#Action\n cart GET /cart(.:format) cart#show\n", output - output = Dir.chdir(app_path){ `bin/rake routes -c CartController` } + output = Dir.chdir(app_path){ `bin/rails routes -c CartController` } assert_equal "Prefix Verb URI Pattern Controller#Action\n cart GET /cart(.:format) cart#show\n", output end diff --git a/railties/test/application/test_runner_test.rb b/railties/test/application/test_runner_test.rb index a7eb0feb11..821ac9b033 100644 --- a/railties/test/application/test_runner_test.rb +++ b/railties/test/application/test_runner_test.rb @@ -363,7 +363,7 @@ module ApplicationTests end RUBY - run_test_command('test/models/account_test.rb:4:9 test/models/post_test:4:9').tap do |output| + run_test_command('test/models/account_test.rb:4:9 test/models/post_test.rb:4:9').tap do |output| assert_match 'AccountTest:FirstFilter', output assert_match 'AccountTest:SecondFilter', output assert_match 'PostTest:FirstFilter', output @@ -382,6 +382,30 @@ module ApplicationTests end end + def test_line_filters_trigger_only_one_runnable + app_file 'test/models/post_test.rb', <<-RUBY + require 'test_helper' + + class PostTest < ActiveSupport::TestCase + test 'truth' do + assert true + end + end + + class SecondPostTest < ActiveSupport::TestCase + test 'truth' do + assert false, 'ran second runnable' + end + end + RUBY + + # Pass seed guaranteeing failure. + run_test_command('test/models/post_test.rb:4 --seed 30410').tap do |output| + assert_no_match 'ran second runnable', output + assert_match '1 runs, 1 assertions', output + end + end + def test_shows_filtered_backtrace_by_default create_backtrace_test |