1. 13 7月, 2018 1 次提交
  2. 12 7月, 2018 4 次提交
  3. 11 7月, 2018 2 次提交
  4. 10 7月, 2018 7 次提交
  5. 09 7月, 2018 7 次提交
  6. 08 7月, 2018 12 次提交
  7. 07 7月, 2018 6 次提交
    • K
      Don't balloon @original_options with --restart on restart. · 1d97b8f9
      Kasper Timm Hansen 提交于
      Our restart_command would pass in `--restart` which means
      that if the @original_options already contains --restart
      it would keep getting another --restart appended.
      
      Nothing here that would break the bank, but just a nicety.
      1d97b8f9
    • K
      Don't show unneeded deprecation warning on server restart. · 161ed37d
      Kasper Timm Hansen 提交于
      If booting a server via `rails s -u puma`, we'd convert the
      option to a `using` positional.
      
      When using `rails restart` our `restart_command` would the
      option converted to the using positional and put that in
      the restart command.
      
      Thus we'd show users deprecation warnings for our own code.
      
      Fix that by converting a passed positional to an option instead.
      
      Also: fix initialize method signature. The local_options are an
      array, not a hash. But don't even bother assigning defaults as
      Thor passes them in.
      161ed37d
    • K
      Remove restart_command leftover from switching to Thor options. · 688e48d9
      Kasper Timm Hansen 提交于
      Ref:
      https://github.com/rails/rails/commit/654704247eba742e139cfaa8d1385f13605d9e12
      
      Before the commit we had a restart_command in Rails::Server. But after
      there's another one in Rails::ServerCommand. The command version of the
      method is the right one as it's used in server_options.
      
      Give the leftover method the boot.
      688e48d9
    • K
      Use only snake cased symbols in commands. · b773318f
      Kasper Timm Hansen 提交于
      Mixing strings and symbols seems aesthetically less than ideal.
      
      We can also use underscores just fine. Thor converts them to dashes
      for the CLI and it makes access in Ruby code nicer.
      
      Here's the `server --help` output after this change:
      
      ```
      Usage:
        rails server [thin/puma/webrick] [options]
      
      Options:
        -p, [--port=port]                        # Runs Rails on the specified port - defaults to 3000.
        -b, [--binding=IP]                       # Binds Rails to the specified IP - defaults to 'localhost' in development and '0.0.0.0' in other environments'.
        -c, [--config=file]                      # Uses a custom rackup configuration.
                                                 # Default: config.ru
        -d, [--daemon], [--no-daemon]            # Runs server as a Daemon.
        -e, [--environment=name]                 # Specifies the environment to run this server under (development/test/production).
        -u, [--using=name]                       # Specifies the Rack server used to run the application (thin/puma/webrick).
        -P, [--pid=PID]                          # Specifies the PID file.
                                                 # Default: tmp/pids/server.pid
        -C, [--dev-caching], [--no-dev-caching]  # Specifies whether to perform caching in development.
            [--early-hints], [--no-early-hints]  # Enables HTTP/2 early hints.
      ```
      
      See? Quite dashing 
      b773318f
    • B
      Improve `SecurePasswordTest#test_authenticate` · 382b5ca7
      bogdanvlviv 提交于
      - Ensure that execution of `authenticate`/`authenticate_XXX` returns
      `self` if password is correct, otherwise `false` (as mentioned in the documentation).
      - Test `authenticate_password`.
      382b5ca7
    • B
      Update `has_secure_password` info in the guide · 73a9f640
      bogdanvlviv 提交于
      `has_secure_password` allows configuring name of attribute since #26764.
      This commit adds a mention about it in the Active Model Basics Guide.
      73a9f640
  8. 06 7月, 2018 1 次提交
    • R
      Pass along arguments to underlying `get` method in `follow_redirect!` (#33299) · a0061d23
      Remo Fritzsche 提交于
      * Allow get arguments for follow_redirect
      
      Now all arguments passed to `follow_redirect!` are passed to the
      underlying `get` method. This for example allows to set custom headers
      for the redirection request to the server.
      
      This is especially useful for setting headers that may, outside of the
      testing environment, be set automatically on every request, i.e. by a
      web application firewall.
      
      * Allow get arguments for follow_redirect
      
      [Remo Fritzsche + Rafael Mendonça França]
      a0061d23