From 81a6a60dc6dff2ad8c2a45bf17fc40e760224e30 Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Wed, 28 Jun 2006 20:53:00 +0000 Subject: Remove opts.on { |options[:option_name] } style hash assignment. Closes #4440. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4502 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/commands/process/inspector.rb | 6 +++--- railties/lib/commands/process/reaper.rb | 6 +++--- railties/lib/commands/process/spawner.rb | 12 ++++++------ railties/lib/commands/process/spinner.rb | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) (limited to 'railties/lib/commands/process') diff --git a/railties/lib/commands/process/inspector.rb b/railties/lib/commands/process/inspector.rb index 6a23f498e0..15643059fc 100644 --- a/railties/lib/commands/process/inspector.rb +++ b/railties/lib/commands/process/inspector.rb @@ -54,9 +54,9 @@ ARGV.options do |opts| opts.on(" Options:") - opts.on("-s", "--ps=command", "default: #{OPTIONS[:ps]}", String) { |OPTIONS[:ps]| } - opts.on("-p", "--pidpath=path", "default: #{OPTIONS[:pid_path]}", String) { |OPTIONS[:pid_path]| } - opts.on("-r", "--pattern=pattern", "default: #{OPTIONS[:pattern]}", String) { |OPTIONS[:pattern]| } + opts.on("-s", "--ps=command", "default: #{OPTIONS[:ps]}", String) { |v| OPTIONS[:ps] = v } + opts.on("-p", "--pidpath=path", "default: #{OPTIONS[:pid_path]}", String) { |v| OPTIONS[:pid_path] = v } + opts.on("-r", "--pattern=pattern", "default: #{OPTIONS[:pattern]}", String) { |v| OPTIONS[:pattern] = v } opts.separator "" diff --git a/railties/lib/commands/process/reaper.rb b/railties/lib/commands/process/reaper.rb index 6ac2f8e8bd..375a78e21b 100644 --- a/railties/lib/commands/process/reaper.rb +++ b/railties/lib/commands/process/reaper.rb @@ -121,9 +121,9 @@ ARGV.options do |opts| opts.on(" Options:") - opts.on("-a", "--action=name", "reload|graceful|kill (default: #{OPTIONS[:action]})", String) { |OPTIONS[:action]| } - opts.on("-p", "--pidpath=path", "default: #{OPTIONS[:pid_path]}", String) { |OPTIONS[:pid_path]| } - opts.on("-r", "--pattern=pattern", "default: #{OPTIONS[:pattern]}", String) { |OPTIONS[:pattern]| } + opts.on("-a", "--action=name", "reload|graceful|kill (default: #{OPTIONS[:action]})", String) { |v| OPTIONS[:action] = v } + opts.on("-p", "--pidpath=path", "default: #{OPTIONS[:pid_path]}", String) { |v| OPTIONS[:pid_path] = v } + opts.on("-r", "--pattern=pattern", "default: #{OPTIONS[:pattern]}", String) { |v| OPTIONS[:pattern] = v } opts.separator "" diff --git a/railties/lib/commands/process/spawner.rb b/railties/lib/commands/process/spawner.rb index 8b5d56b324..b90e67c758 100644 --- a/railties/lib/commands/process/spawner.rb +++ b/railties/lib/commands/process/spawner.rb @@ -91,12 +91,12 @@ ARGV.options do |opts| opts.on(" Options:") - opts.on("-p", "--port=number", Integer, "Starting port number (default: #{OPTIONS[:port]})") { |OPTIONS[:port]| } - opts.on("-i", "--instances=number", Integer, "Number of instances (default: #{OPTIONS[:instances]})") { |OPTIONS[:instances]| } - opts.on("-r", "--repeat=seconds", Integer, "Repeat spawn attempts every n seconds (default: off)") { |OPTIONS[:repeat]| } - opts.on("-e", "--environment=name", String, "test|development|production (default: #{OPTIONS[:environment]})") { |OPTIONS[:environment]| } - opts.on("-n", "--process=name", String, "default: #{OPTIONS[:process]}") { |OPTIONS[:process]| } - opts.on("-s", "--spawner=path", String, "default: #{OPTIONS[:spawner]}") { |OPTIONS[:spawner]| } + opts.on("-p", "--port=number", Integer, "Starting port number (default: #{OPTIONS[:port]})") { |v| OPTIONS[:port] = v } + opts.on("-i", "--instances=number", Integer, "Number of instances (default: #{OPTIONS[:instances]})") { |v| OPTIONS[:instances] = v } + opts.on("-r", "--repeat=seconds", Integer, "Repeat spawn attempts every n seconds (default: off)") { |v| OPTIONS[:repeat] = v } + opts.on("-e", "--environment=name", String, "test|development|production (default: #{OPTIONS[:environment]})") { |v| OPTIONS[:environment] = v } + opts.on("-n", "--process=name", String, "default: #{OPTIONS[:process]}") { |v| OPTIONS[:process] = v } + opts.on("-s", "--spawner=path", String, "default: #{OPTIONS[:spawner]}") { |v| OPTIONS[:spawner] = v } opts.on("-d", "--dispatcher=path", String, "default: #{OPTIONS[:dispatcher]}") { |dispatcher| OPTIONS[:dispatcher] = File.expand_path(dispatcher) } opts.separator "" diff --git a/railties/lib/commands/process/spinner.rb b/railties/lib/commands/process/spinner.rb index af073c747f..c0b2f09a94 100644 --- a/railties/lib/commands/process/spinner.rb +++ b/railties/lib/commands/process/spinner.rb @@ -36,9 +36,9 @@ ARGV.options do |opts| opts.on(" Options:") - opts.on("-c", "--command=path", String) { |OPTIONS[:command]| } - opts.on("-i", "--interval=seconds", Float) { |OPTIONS[:interval]| } - opts.on("-d", "--daemon") { |OPTIONS[:daemon]| } + opts.on("-c", "--command=path", String) { |v| OPTIONS[:command] = v } + opts.on("-i", "--interval=seconds", Float) { |v| OPTIONS[:interval] = v } + opts.on("-d", "--daemon") { |v| OPTIONS[:daemon] = v } opts.separator "" -- cgit v1.2.3