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.
This commit is contained in:
parent
936404399d
commit
21c5a0a104
@ -274,7 +274,7 @@ def rails_env
|
||||
|
||||
# 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 @@ def parse!(args=ARGV)
|
||||
|
||||
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 @@ def fetch_dir(url)
|
||||
end
|
||||
end
|
||||
|
||||
Commands::Plugin.parse!
|
||||
RailsCommands::Plugin.parse!
|
||||
|
Loading…
Reference in New Issue
Block a user