Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
allenwei committed Jan 2, 2011
1 parent 1d5cadf commit be0195e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions opt_parser.rb
Expand Up @@ -18,8 +18,8 @@
options[:envrionment] = envrionment
end

opt.on("-d","--deamon","runing on deamon mode?") do
options[:deamon] = true
opt.on("-d","--daemon","runing on daemon mode?") do
options[:daemon] = true
end

opt.on("-h","--help","help") do
Expand Down
8 changes: 4 additions & 4 deletions opt_parser2.rb
Expand Up @@ -15,12 +15,12 @@
opt.separator ""
opt.separator "Options"

opt.on("-e ENVIRONMENT","--envrionment ENVIRONMENT",Numeric,"which enviroment you want server run") do |envrionment|
options[:envrionment] = envrionment
opt.on("-e ENVIRONMENT","--environment ENVIRONMENT",Numeric,"which enviroment you want server run") do |environment|
options[:environment] = environment
end

opt.on("-d","--deamon","runing on deamon mode?") do
options[:deamon] = true
opt.on("-d","--daemon","runing on daemon mode?") do
options[:daemon] = true
end

opt.on("--delay N", Float, "Delay N seconds before executing") do |n|
Expand Down
2 changes: 1 addition & 1 deletion thor_example
Expand Up @@ -6,7 +6,7 @@ require 'thor'
class ThorExample < Thor
desc "start", "start server"
method_option :environment,:default => "development", :aliases => "-e",:desc => "which enviroment you want server run."
method_option :deamon, :type => :boolean, :default => false, :aliases => "-d",:desc => "runing on deamon mode?"
method_option :daemon, :type => :boolean, :default => false, :aliases => "-d",:desc => "runing on daemon mode?"
def start
puts "start #{options.inspect}"
end
Expand Down

0 comments on commit be0195e

Please sign in to comment.