rails--rails/railties/lib/rails/commands
Andrey Chernih b3a34cd374 Add ability to extend `rails server` command options parser
With this change it will be possible to add additional options to the `option_parser` like this:

    require 'rails/commands/server'
    module Rails
      class Server < ::Rack::Server
        class Options
          def option_parser_with_open(options)
            parser = option_parser_without_open options
            parser.on('-o', '--open', 'Open in default browser') { options[:open] = true }
            parser
          end
          alias_method_chain :option_parser, :open
        end

        def start_with_open
          start_without_open do
            `open http://localhost:3000` if options[:open]
          end
        end
        alias_method_chain :start, :open
      end
    end
2014-07-11 23:26:33 +04:00
..
application.rb stop mutating ARGV 2013-10-30 14:59:22 -07:00
commands_tasks.rb Let COMMAND_WHITELIST be an Array, not a String 2014-03-16 12:23:58 +09:00
console.rb Isolate debugger related code 2014-04-10 16:02:13 +02:00
dbconsole.rb Fix rails dbconsole for jdbcmysql adapter. 2014-05-05 14:55:48 -07:00
destroy.rb Use Ruby 1.9 Hash syntax in railties 2012-10-14 18:26:58 +02:00
generate.rb Use Ruby 1.9 Hash syntax in railties 2012-10-14 18:26:58 +02:00
plugin.rb Replace map.flatten with flat_map in railties 2014-03-04 09:13:44 -08:00
runner.rb Make `rails runner` command options more obvious 2013-12-19 15:43:03 -06:00
server.rb Add ability to extend `rails server` command options parser 2014-07-11 23:26:33 +04:00
update.rb Use Ruby 1.9 Hash syntax in railties 2012-10-14 18:26:58 +02:00