Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename RouteInspect to RoutesInspector for consistency

  • Loading branch information...
commit dbc43bcce69aa4aaf0ae309bf410e2b786c4e3f6 1 parent e39f218
@josevalim josevalim authored
View
2  .../lib/rails/application/route_inspector.rb → ...lib/rails/application/routes_inspector.rb
@@ -62,7 +62,7 @@ def engine?
##
# This class is just used for displaying route information when someone
# executes `rake routes`. People should not use this class.
- class RouteInspector # :nodoc:
+ class RoutesInspector # :nodoc:
def initialize
@engines = Hash.new
end
View
4 railties/lib/rails/info_controller.rb
@@ -1,4 +1,4 @@
-require 'rails/application/route_inspector'
+require 'rails/application/routes_inspector'
class Rails::InfoController < ActionController::Base
self.view_paths = File.join(File.dirname(__FILE__), 'templates')
@@ -15,7 +15,7 @@ def properties
end
def routes
- inspector = Rails::Application::RouteInspector.new
+ inspector = Rails::Application::RoutesInspector.new
@info = inspector.format(_routes.routes).join("\n")
end
View
4 railties/lib/rails/tasks/routes.rake
@@ -1,7 +1,7 @@
desc 'Print out all defined routes in match order, with names. Target specific controller with CONTROLLER=x.'
task :routes => :environment do
all_routes = Rails.application.routes.routes
- require 'rails/application/route_inspector'
- inspector = Rails::Application::RouteInspector.new
+ require 'rails/application/routes_inspector'
+ inspector = Rails::Application::RoutesInspector.new
puts inspector.format(all_routes, ENV['CONTROLLER']).join "\n"
end
View
4 ...es/test/application/route_inspect_test.rb → ...s/test/application/routes_inspect_test.rb
@@ -1,5 +1,5 @@
require 'minitest/autorun'
-require 'rails/application/route_inspector'
+require 'rails/application/routes_inspector'
require 'action_controller'
require 'rails/engine'
@@ -7,7 +7,7 @@ module ApplicationTests
class RouteInspectTest < ActiveSupport::TestCase
def setup
@set = ActionDispatch::Routing::RouteSet.new
- @inspector = Rails::Application::RouteInspector.new
+ @inspector = Rails::Application::RoutesInspector.new
app = ActiveSupport::OrderedOptions.new
app.config = ActiveSupport::OrderedOptions.new
app.config.assets = ActiveSupport::OrderedOptions.new
Please sign in to comment.
Something went wrong with that request. Please try again.