Changeset 4502
- Timestamp:
- 06/28/06 20:53:00 (2 years ago)
- Files:
-
- trunk/railties/CHANGELOG (modified) (1 diff)
- trunk/railties/lib/breakpoint_client.rb (modified) (5 diffs)
- trunk/railties/lib/commands/console.rb (modified) (1 diff)
- trunk/railties/lib/commands/process/inspector.rb (modified) (1 diff)
- trunk/railties/lib/commands/process/reaper.rb (modified) (1 diff)
- trunk/railties/lib/commands/process/spawner.rb (modified) (1 diff)
- trunk/railties/lib/commands/process/spinner.rb (modified) (1 diff)
- trunk/railties/lib/commands/runner.rb (modified) (1 diff)
- trunk/railties/lib/commands/servers/webrick.rb (modified) (2 diffs)
- trunk/railties/lib/rails_generator/generators/applications/app/app_generator.rb (modified) (1 diff)
- trunk/railties/lib/rails_generator/generators/components/model/model_generator.rb (modified) (1 diff)
- trunk/railties/lib/rails_generator/options.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/railties/CHANGELOG
r4486 r4502 1 1 *SVN* 2 3 * Remove opts.on { |options[:option_name] } style hash assignment. Closes #4440. [nicksieger@gmail.com] 2 4 3 5 * Mongrel support for script/server. #5475 [jeremydurham@gmail.com] trunk/railties/lib/breakpoint_client.rb
r2637 r4502 31 31 "Default: Find a good URI automatically.", 32 32 "Example: -c druby://localhost:12345" 33 ) { | Options[:ClientURI]|}33 ) { |v| Options[:ClientURI] = v } 34 34 35 35 opts.on("-s", "--server-uri=uri", … … 37 37 "specified uri.", 38 38 "Default: druby://localhost:42531" 39 ) { | Options[:ServerURI]|}39 ) { |v| Options[:ServerURI] = v } 40 40 41 41 opts.on("-R", "--retry-delay=delay", Integer, … … 46 46 "reconnecting completely.", 47 47 "Default: 10" 48 ) { | Options[:RetryDelay]|}48 ) { |v| Options[:RetryDelay] = v } 49 49 50 50 opts.on("-P", "--[no-]permanent", … … 53 53 "running even after the server has closed the", 54 54 "connection. Useful for example in Rails." 55 ) { | Options[:Permanent]|}55 ) { |v| Options[:Permanent] = v } 56 56 57 57 opts.on("-V", "--[no-]verbose", … … 61 61 "that the breakpoint client is still alive, but adds", 62 62 "quite a bit of clutter." 63 ) { | Options[:Verbose]|}63 ) { |v| Options[:Verbose] = v } 64 64 65 65 opts.separator "" trunk/railties/lib/commands/console.rb
r4118 r4502 5 5 OptionParser.new do |opt| 6 6 opt.banner = "Usage: console [environment] [options]" 7 opt.on('-s', '--sandbox', 'Rollback database modifications on exit.') { | options[:sandbox]|}8 opt.on("--irb=[#{irb}]", 'Invoke a different irb.') { | options[:irb]|}7 opt.on('-s', '--sandbox', 'Rollback database modifications on exit.') { |v| options[:sandbox] = v } 8 opt.on("--irb=[#{irb}]", 'Invoke a different irb.') { |v| options[:irb] = v } 9 9 opt.parse!(ARGV) 10 10 end trunk/railties/lib/commands/process/inspector.rb
r4320 r4502 55 55 opts.on(" Options:") 56 56 57 opts.on("-s", "--ps=command", "default: #{OPTIONS[:ps]}", String) { | OPTIONS[:ps]|}58 opts.on("-p", "--pidpath=path", "default: #{OPTIONS[:pid_path]}", String) { | OPTIONS[:pid_path]|}59 opts.on("-r", "--pattern=pattern", "default: #{OPTIONS[:pattern]}", String) { | OPTIONS[:pattern]|}57 opts.on("-s", "--ps=command", "default: #{OPTIONS[:ps]}", String) { |v| OPTIONS[:ps] = v } 58 opts.on("-p", "--pidpath=path", "default: #{OPTIONS[:pid_path]}", String) { |v| OPTIONS[:pid_path] = v } 59 opts.on("-r", "--pattern=pattern", "default: #{OPTIONS[:pattern]}", String) { |v| OPTIONS[:pattern] = v } 60 60 61 61 opts.separator "" trunk/railties/lib/commands/process/reaper.rb
r4294 r4502 122 122 opts.on(" Options:") 123 123 124 opts.on("-a", "--action=name", "reload|graceful|kill (default: #{OPTIONS[:action]})", String) { | OPTIONS[:action]|}125 opts.on("-p", "--pidpath=path", "default: #{OPTIONS[:pid_path]}", String) { | OPTIONS[:pid_path]|}126 opts.on("-r", "--pattern=pattern", "default: #{OPTIONS[:pattern]}", String) { | OPTIONS[:pattern]|}124 opts.on("-a", "--action=name", "reload|graceful|kill (default: #{OPTIONS[:action]})", String) { |v| OPTIONS[:action] = v } 125 opts.on("-p", "--pidpath=path", "default: #{OPTIONS[:pid_path]}", String) { |v| OPTIONS[:pid_path] = v } 126 opts.on("-r", "--pattern=pattern", "default: #{OPTIONS[:pattern]}", String) { |v| OPTIONS[:pattern] = v } 127 127 128 128 opts.separator "" trunk/railties/lib/commands/process/spawner.rb
r4324 r4502 92 92 opts.on(" Options:") 93 93 94 opts.on("-p", "--port=number", Integer, "Starting port number (default: #{OPTIONS[:port]})") { | OPTIONS[:port]|}95 opts.on("-i", "--instances=number", Integer, "Number of instances (default: #{OPTIONS[:instances]})") { | OPTIONS[:instances]|}96 opts.on("-r", "--repeat=seconds", Integer, "Repeat spawn attempts every n seconds (default: off)") { | OPTIONS[:repeat]|}97 opts.on("-e", "--environment=name", String, "test|development|production (default: #{OPTIONS[:environment]})") { | OPTIONS[:environment]|}98 opts.on("-n", "--process=name", String, "default: #{OPTIONS[:process]}") { | OPTIONS[:process]|}99 opts.on("-s", "--spawner=path", String, "default: #{OPTIONS[:spawner]}") { | OPTIONS[:spawner]|}94 opts.on("-p", "--port=number", Integer, "Starting port number (default: #{OPTIONS[:port]})") { |v| OPTIONS[:port] = v } 95 opts.on("-i", "--instances=number", Integer, "Number of instances (default: #{OPTIONS[:instances]})") { |v| OPTIONS[:instances] = v } 96 opts.on("-r", "--repeat=seconds", Integer, "Repeat spawn attempts every n seconds (default: off)") { |v| OPTIONS[:repeat] = v } 97 opts.on("-e", "--environment=name", String, "test|development|production (default: #{OPTIONS[:environment]})") { |v| OPTIONS[:environment] = v } 98 opts.on("-n", "--process=name", String, "default: #{OPTIONS[:process]}") { |v| OPTIONS[:process] = v } 99 opts.on("-s", "--spawner=path", String, "default: #{OPTIONS[:spawner]}") { |v| OPTIONS[:spawner] = v } 100 100 opts.on("-d", "--dispatcher=path", String, "default: #{OPTIONS[:dispatcher]}") { |dispatcher| OPTIONS[:dispatcher] = File.expand_path(dispatcher) } 101 101 trunk/railties/lib/commands/process/spinner.rb
r2637 r4502 37 37 opts.on(" Options:") 38 38 39 opts.on("-c", "--command=path", String) { | OPTIONS[:command]|}40 opts.on("-i", "--interval=seconds", Float) { | OPTIONS[:interval]|}41 opts.on("-d", "--daemon") { | OPTIONS[:daemon]|}39 opts.on("-c", "--command=path", String) { |v| OPTIONS[:command] = v } 40 opts.on("-i", "--interval=seconds", Float) { |v| OPTIONS[:interval] = v } 41 opts.on("-d", "--daemon") { |v| OPTIONS[:daemon] = v } 42 42 43 43 opts.separator "" trunk/railties/lib/commands/runner.rb
r4075 r4502 11 11 opts.on("-e", "--environment=name", String, 12 12 "Specifies the environment for the runner to operate under (test/development/production).", 13 "Default: development") { | options[:environment]|}13 "Default: development") { |v| options[:environment] = v } 14 14 15 15 opts.separator "" trunk/railties/lib/commands/servers/webrick.rb
r2987 r4502 20 20 opts.on("-p", "--port=port", Integer, 21 21 "Runs Rails on the specified port.", 22 "Default: 3000") { | OPTIONS[:port]|}22 "Default: 3000") { |v| OPTIONS[:port] = v } 23 23 opts.on("-b", "--binding=ip", String, 24 24 "Binds Rails to the specified ip.", 25 "Default: 0.0.0.0") { | OPTIONS[:ip]|}25 "Default: 0.0.0.0") { |v| OPTIONS[:ip] = v } 26 26 opts.on("-e", "--environment=name", String, 27 27 "Specifies the environment to run this server under (test/development/production).", 28 "Default: development") { | OPTIONS[:environment]|}28 "Default: development") { |v| OPTIONS[:environment] = v } 29 29 opts.on("-m", "--mime-types=filename", String, 30 30 "Specifies an Apache style mime.types configuration file to be used for mime types", … … 37 37 opts.on("-c", "--charset=charset", String, 38 38 "Set default charset for output.", 39 "Default: UTF-8") { | OPTIONS[:charset]|}39 "Default: UTF-8") { |v| OPTIONS[:charset] = v } 40 40 41 41 opts.separator "" trunk/railties/lib/rails_generator/generators/applications/app/app_generator.rb
r4336 r4502 98 98 opt.on("-r", "--ruby=path", String, 99 99 "Path to the Ruby binary of your choice (otherwise scripts use env, dispatchers current path).", 100 "Default: #{DEFAULT_SHEBANG}") { | options[:shebang]|}100 "Default: #{DEFAULT_SHEBANG}") { |v| options[:shebang] = v } 101 101 102 102 opt.on("-d", "--database=name", String, 103 103 "Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite2/sqlite3).", 104 "Default: mysql") { | options[:db]|}104 "Default: mysql") { |v| options[:db] = v } 105 105 106 106 opt.on("-f", "--freeze", 107 107 "Freeze Rails in vendor/rails from the gems generating the skeleton", 108 "Default: false") { | options[:freeze]|}108 "Default: false") { |v| options[:freeze] = v } 109 109 end 110 110 trunk/railties/lib/rails_generator/generators/components/model/model_generator.rb
r3947 r4502 30 30 opt.separator 'Options:' 31 31 opt.on("--skip-migration", 32 "Don't generate a migration file for this model") { | options[:skip_migration]|}32 "Don't generate a migration file for this model") { |v| options[:skip_migration] = v } 33 33 end 34 34 end trunk/railties/lib/rails_generator/options.rb
r4471 r4502 121 121 opt.separator 'Rails Info:' 122 122 opt.on('-v', '--version', 'Show the Rails version number and quit.') 123 opt.on('-h', '--help', 'Show this help message and quit.') { | options[:help]|}123 opt.on('-h', '--help', 'Show this help message and quit.') { |v| options[:help] = v } 124 124 125 125 opt.separator '' 126 126 opt.separator 'General Options:' 127 127 128 opt.on('-p', '--pretend', 'Run but do not make any changes.') { | options[:pretend]|}128 opt.on('-p', '--pretend', 'Run but do not make any changes.') { |v| options[:pretend] = v } 129 129 opt.on('-f', '--force', 'Overwrite files that already exist.') { options[:collision] = :force } 130 130 opt.on('-s', '--skip', 'Skip files that already exist.') { options[:collision] = :skip } 131 opt.on('-q', '--quiet', 'Suppress normal output.') { | options[:quiet]|}132 opt.on('-t', '--backtrace', 'Debugging: show backtrace on errors.') { | options[:backtrace]|}131 opt.on('-q', '--quiet', 'Suppress normal output.') { |v| options[:quiet] = v } 132 opt.on('-t', '--backtrace', 'Debugging: show backtrace on errors.') { |v| options[:backtrace] = v } 133 133 opt.on('-c', '--svn', 'Modify files with subversion. (Note: svn must be in path)') do 134 134 options[:svn] = `svn status`.inject({}) do |opt, e|