diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-02-03 08:16:18 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-02-03 08:17:25 +0900 |
commit | fae17243984965b152d8212be6405ce840887018 (patch) | |
tree | 09e5f277fb26f6607aeb7bbfc94ca754123da65d /railties | |
parent | 49e0c4e8642a0160bd01c4490b4babe89108da48 (diff) | |
download | rails-fae17243984965b152d8212be6405ce840887018.tar.gz rails-fae17243984965b152d8212be6405ce840887018.tar.bz2 rails-fae17243984965b152d8212be6405ce840887018.zip |
use rails command in routes task
For other task has become to use the rails command at doc and test,
I think that routes task also it is better to use the rails command.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/tasks/routes.rake | 6 | ||||
-rw-r--r-- | railties/test/application/rake_test.rb | 14 |
2 files changed, 10 insertions, 10 deletions
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/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 |