From 21c5a0a104bf04e3e7b63aa5f0104f1c666655c3 Mon Sep 17 00:00:00 2001 From: Daniel Dyba Date: Sat, 16 Jul 2011 16:54:03 -0700 Subject: Changed Commands module to RailsCommands. This is to avoid a conflict that occurs when you add Rake to your Gemfile. There is a Commands Object in Rake that conflicts with the Commands module in plugin.rb. See rails issue #1866. --- railties/lib/rails/commands/plugin.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'railties/lib/rails') diff --git a/railties/lib/rails/commands/plugin.rb b/railties/lib/rails/commands/plugin.rb index 4df849447d..aa4551c806 100644 --- a/railties/lib/rails/commands/plugin.rb +++ b/railties/lib/rails/commands/plugin.rb @@ -274,7 +274,7 @@ end # load default environment and parse arguments require 'optparse' -module Commands +module RailsCommands class Plugin attr_reader :environment, :script_name def initialize @@ -327,7 +327,7 @@ module Commands command = general.shift if command =~ /^(install|remove)$/ - command = Commands.const_get(command.capitalize).new(self) + command = RailsCommands.const_get(command.capitalize).new(self) command.parse!(sub) else puts "Unknown command: #{command}" unless command.blank? @@ -539,4 +539,4 @@ class RecursiveHTTPFetcher end end -Commands::Plugin.parse! +RailsCommands::Plugin.parse! -- cgit v1.2.3