diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-04-14 11:49:36 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-04-14 11:49:36 -0700 |
commit | 316ee25c25a64a2d82c284293a31804077b05d79 (patch) | |
tree | 4d3d6051f6edb291cd435b9d330b8e23fe56eb0f /railties/lib/rails/commands/server.rb | |
parent | 09608ce9d236c6a9439cf011a3442e1492d0732e (diff) | |
parent | a1e2db2e9bb4ca2fdf6190aa8f448fe85cf76529 (diff) | |
download | rails-316ee25c25a64a2d82c284293a31804077b05d79.tar.gz rails-316ee25c25a64a2d82c284293a31804077b05d79.tar.bz2 rails-316ee25c25a64a2d82c284293a31804077b05d79.zip |
Merge branch 'master' into adequaterecord
* master: (70 commits)
[ci skip] Added link to ruby-lang.org installation.
Use the index on hidden field
`collection_check_boxes` respects `:index` option for the hidden filed name.
docs, double meaning of `serialize` argument. Closes #14284.
Just call read_attribute, no need to use `send`.
- Fix lingering reference to `:text` instead of the newer `:plain` - Section references `form_tag` instead of the `form_for` used in the example
again, read_attribute is public, so just call it
read_attribute is public, so we should just call it
Disable assest cache store in docs [ci skip]
Make counter cache decrementation on destroy idempotent
Write the failing test case for concurrent counter cache
[ci skip] Use plain underscore instead of "\_".
Update documentation to use Rails.application instead
Add a changelog entry for #14546 [ci skip]
Move tests for deep_dup and duplicable to object directory
Missing 'are' in note - [ci skip]
CollectionHelpers now accepts a readonly option
Fix a few typos [ci skip]
Bundle tzinfo-data on :x64_mingw (64-bit Ruby on Windows).
don't bother with an offset if the offset is zero
...
Diffstat (limited to 'railties/lib/rails/commands/server.rb')
-rw-r--r-- | railties/lib/rails/commands/server.rb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/railties/lib/rails/commands/server.rb b/railties/lib/rails/commands/server.rb index fec4962fb5..6146b6c1db 100644 --- a/railties/lib/rails/commands/server.rb +++ b/railties/lib/rails/commands/server.rb @@ -18,7 +18,14 @@ module Rails opts.on("-c", "--config=file", String, "Use custom rackup configuration file") { |v| options[:config] = v } opts.on("-d", "--daemon", "Make server run as a Daemon.") { options[:daemonize] = true } - opts.on("-u", "--debugger", "Enable the debugger") { options[:debugger] = true } + opts.on("-u", "--debugger", "Enable the debugger") do + if RUBY_VERSION < '2.0.0' + options[:debugger] = true + else + puts "=> Notice: debugger option is ignored since ruby 2.0 and " \ + "it will be removed in future versions" + end + end opts.on("-e", "--environment=name", String, "Specifies the environment to run this server under (test/development/production).", "Default: development") { |v| options[:environment] = v } @@ -75,7 +82,9 @@ module Rails def middleware middlewares = [] - middlewares << [Rails::Rack::Debugger] if options[:debugger] + if RUBY_VERSION < '2.0.0' + middlewares << [Rails::Rack::Debugger] if options[:debugger] + end middlewares << [::Rack::ContentLength] # FIXME: add Rack::Lock in the case people are using webrick. |