Don't reference ARGV in the exec module. This makes testing easier.

This commit is contained in:
Chris Eppstein 2009-01-18 17:41:20 -08:00
parent becda48b83
commit 5fce487ba8

View File

@ -68,8 +68,8 @@ module Compass
def parse! def parse!
self.opts = OptionParser.new(&method(:set_opts)) self.opts = OptionParser.new(&method(:set_opts))
self.opts.parse!(self.args) self.opts.parse!(self.args)
if ARGV.size > 0 if self.args.size > 0
self.options[:project_name] = trim_trailing_separator(ARGV.shift) self.options[:project_name] = trim_trailing_separator(self.args.shift)
end end
self.options[:command] ||= self.options[:project_name] ? :create_project : :update_project self.options[:command] ||= self.options[:project_name] ? :create_project : :update_project
self.options[:environment] ||= :production self.options[:environment] ||= :production