Changeset 231
- Timestamp:
- 05/03/07 13:07:50 (2 years ago)
- Files:
-
- trunk/lib/merb/merb_server.rb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/merb/merb_server.rb
r198 r231 92 92 end 93 93 94 opts.on("-r", "--script-runner ['RUBY CODE'| FULL_SCRIPT_PATH]", "Command-line option to run scripts and/or code in the merb app") do |stuff_to_run| 95 options[:runner] = stuff_to_run 96 end 97 94 98 opts.on("-g", "--generate-app PATH", "Generate a fresh merb app at PATH") do |path| 95 99 options[:generate] = path || Dir.pwd … … 103 107 options[:merb_config] = config 104 108 end 105 106 opts.on("-X", "--mutex on/off", "This flag is for turn hing on and off the mutex lock.") do |mutex|109 110 opts.on("-X", "--mutex on/off", "This flag is for turning the mutex lock on and off.") do |mutex| 107 111 if mutex == 'off' 108 112 options[:use_mutex] = false … … 204 208 exit! 205 209 end 210 211 if @@merb_opts[:runner] 212 initialize_merb 213 code_or_file = @@merb_opts[:runner] 214 if File.exists?(code_or_file) 215 eval(File.read(code_or_file)) 216 else 217 eval(code_or_file) 218 end 219 exit! 220 end 206 221 207 222 if @@merb_opts[:start_drb]
