1. 30 3月, 2018 1 次提交
    • D
      Deprecate controller level force_ssl · 4701a50b
      Derek Prior 提交于
      Today there are two common ways for Rails developers to force their
      applications to communicate over HTTPS:
      
      * `config.force_ssl` is a setting in environment configurations that
        enables the `ActionDispatch::SSL` middleware. With this middleware
        enabled, all HTTP communication to your application will be redirected
        to HTTPS. The middleware also takes care of other best practices by
        setting HSTS headers, upgrading all cookies to secure only, etc.
      * The `force_ssl` controller method redirects HTTP requests to certain
        controllers to HTTPS.
      
      As a consultant, I've seen many applications with misconfigured HTTPS
      setups due to developers adding `force_ssl` to `ApplicationController`
      and not enabling `config.force_ssl`. With this configuration, many
      application requests can be served over HTTP such as assets, requests
      that hit mounted engines, etc. In addition, because cookies are not
      upgraded to secure only in this configuration and HSTS headers are not
      set, it's possible for cookies that are meant to be secure to be sent
      over HTTP.
      
      The confusion between these two methods of forcing HTTPS is compounded
      by the fact that they share an identical name. This makes finding
      documentation on the "right" method confusing.
      
      HTTPS throughout is quickly becomming table stakes for all web sites.
      Sites are expected to operate over HTTPS for all communication,
      sensitive or otherwise. Let's encourage use of the broader-reaching
      `ActionDispatch::SSL` middleware and elminate this source of user
      confusion. If, for some reason, applications need to expose certain
      endpoints over HTTP they can do so by properly configuring
      `config.ssl_options`.
      4701a50b
  2. 26 3月, 2018 1 次提交
  3. 22 3月, 2018 1 次提交
  4. 21 3月, 2018 1 次提交
  5. 19 3月, 2018 2 次提交
  6. 18 3月, 2018 2 次提交
  7. 17 3月, 2018 1 次提交
  8. 16 3月, 2018 1 次提交
  9. 14 3月, 2018 2 次提交
  10. 13 3月, 2018 2 次提交
    • B
      Update "Ruby on Rails 5.2 Release Notes" Guide [ci skip] · 7fd6d69a
      bogdanvlviv 提交于
      - Add a description of major features in Rails 5.2.
      - Add a reference to Pull Request/Commit to every entry in CHANGELOGs,
        note that some of them combined.
      - Add section "Ruby on Rails Guides" with notable changes.
      - Note that
        - Skipped this since encrypted secrets are already on the way out.
          ```
          *   Add `rails secrets:show` command.
              ([Pull Request](https://github.com/rails/rails/pull/29695))
          ```
        - Skipped this since it was backported all the way to 5-0-stable.
          ```
          *   Make Rails' test runner work better with minitest plugins.
              ([Pull Request](https://github.com/rails/rails/pull/29572))
          ```
      
      Thanks to everyone who has been working on Rails 5.2! <3
      7fd6d69a
    • A
      Remove path config option from Azure service · 309bb6c4
      Andrew White 提交于
      The Active Storage service for Azure Storage has an option called `path`
      that is ambiguous in meaning. It needs to be set to the primary blob
      storage endpoint but that can be determined from the blobs client anyway.
      
      To simplify the configuration this commit removes the `path` option and
      gets the endpoint from the blobs client instead.
      
      Closes #32225.
      309bb6c4
  11. 12 3月, 2018 3 次提交
  12. 09 3月, 2018 2 次提交
  13. 06 3月, 2018 1 次提交
  14. 04 3月, 2018 1 次提交
  15. 03 3月, 2018 1 次提交
  16. 01 3月, 2018 1 次提交
    • B
      Add --expanded option to "rails routes" · c6d928f3
      Benoit Tigeot 提交于
      When using rails routes with small terminal or complicated routes it can be
      very difficult to understand where is the element listed in header. psql
      had the same issue, that's why they created "expanded mode" you can
      switch using `\x` or by starting psql with
      ```
      -x
      --expanded
      
          Turn on the expanded table formatting mode. This is equivalent to the \x command.
      ```
      The output is similar to one implemented here for rails routes:
      
      db_user-# \du
      List of roles
      -[ RECORD 1 ]----------------------------------------------
      Role name  | super
      Attributes | Superuser, Create role, Create DB
      Member of  | {}
      -[ RECORD 2 ]----------------------------------------------
      Role name  | role
      Attributes | Superuser, Create role, Create DB, Replication
      Member of  | {}
      c6d928f3
  17. 27 2月, 2018 2 次提交
  18. 26 2月, 2018 1 次提交
  19. 21 2月, 2018 1 次提交
  20. 18 2月, 2018 5 次提交
  21. 17 2月, 2018 2 次提交
  22. 16 2月, 2018 2 次提交
    • E
      Add test parallelization to Rails · 26821d9b
      eileencodes 提交于
      Provides both a forked process and threaded parallelization options. To
      use add `parallelize` to your test suite.
      
      Takes a `workers` argument that controls how many times the process
      is forked. For each process a new database will be created suffixed
      with the worker number; test-database-0 and test-database-1
      respectively.
      
      If `ENV["PARALLEL_WORKERS"]` is set the workers argument will be ignored
      and the environment variable will be used instead. This is useful for CI
      environments, or other environments where you may need more workers than
      you do for local testing.
      
      If the number of workers is set to `1` or fewer, the tests will not be
      parallelized.
      
      The default parallelization method is to fork processes. If you'd like to
      use threads instead you can pass `with: :threads` to the `parallelize`
      method. Note the threaded parallelization does not create multiple
      database and will not work with system tests at this time.
      
      parallelize(workers: 2, with: :threads)
      
      The threaded parallelization uses Minitest's parallel exector directly.
      The processes paralleliztion uses a Ruby Drb server.
      
      For parallelization via threads a setup hook and cleanup hook are
      provided.
      
      ```
      class ActiveSupport::TestCase
        parallelize_setup do |worker|
          # setup databases
        end
      
        parallelize_teardown do |worker|
          # cleanup database
        end
      
        parallelize(workers: 2)
      end
      ```
      
      [Eileen M. Uchitelle, Aaron Patterson]
      26821d9b
    • J
      ActiveStorage file cleanup in Integration Tests · b6bbedf1
      Jeremy Prevost 提交于
      Documents ActiveStorage file cleanup in Integration Tests which is
      similar but slightly different than the existing docs for System Tests.
      b6bbedf1
  23. 15 2月, 2018 4 次提交