1. 22 2月, 2018 3 次提交
  2. 21 2月, 2018 9 次提交
  3. 20 2月, 2018 4 次提交
  4. 19 2月, 2018 16 次提交
    • A
      Merge pull request #32032 from utilum/method_redefined · 0f05c87e
      Andrew White 提交于
      Avoid method_redefined warnings in  RouteSet::NamedRouteCollection
      0f05c87e
    • A
      Merge pull request #32054 from rails/fix-generation-of-empty-csp · dc6185b4
      Andrew White 提交于
      Fix generation of empty content security policy
      dc6185b4
    • U
      Avoid method_redefined warnings in RouteSet::NamedRouteCollection · 899e2dad
      utilum 提交于
      Before:
      ```
      ~/.rbenv/versions/2.5.0/bin/ruby -w -Itest -Ilib -I../activesupport/lib -I../actionpack/lib -I../actionview/lib -I../activemodel/lib test/application/routing_test.rb
      Run options: --seed 5851
      
      .......~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:156: warning: method redefined; discarding old custom_path
      ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:321: warning: previous definition of custom_path was here
      ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:162: warning: method redefined; discarding old custom_url
      ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:321: warning: previous definition of custom_url was here
      ....~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:156: warning: method redefined; discarding old custom_path
      ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:321: warning: previous definition of custom_path was here
      ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:162: warning: method redefined; discarding old custom_url
      ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:321: warning: previous definition of custom_url was here
      ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:156: warning: method redefined; discarding old custom_path
      ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:321: warning: previous definition of custom_path was here
      ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:162: warning: method redefined; discarding old custom_url
      ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:321: warning: previous definition of custom_url was here
      ..........~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:156: warning: method redefined; discarding old custom_path
      ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:321: warning: previous definition of custom_path was here
      ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:162: warning: method redefined; discarding old custom_url
      ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:321: warning: previous definition of custom_url was here
      ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:156: warning: method redefined; discarding old custom_path
      ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:321: warning: previous definition of custom_path was here
      ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:162: warning: method redefined; discarding old custom_url
      ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:321: warning: previous definition of custom_url was here
      .....
      
      Finished in 13.233638s, 1.9647 runs/s, 5.8185 assertions/s.
      26 runs, 77 assertions, 0 failures, 0 errors, 0 skips
      ```
      
      After:
      ```
      ~/.rbenv/versions/2.5.0/bin/ruby -w -Itest -Ilib -I../activesupport/lib -I../actionpack/lib -I../actionview/lib -I../activemodel/lib test/application/routing_test.rb
      Run options: --seed 38072
      
      ..........................
      
      Finished in 12.009632s, 2.1649 runs/s, 6.4115 assertions/s.
      26 runs, 77 assertions, 0 failures, 0 errors, 0 skips
      ```
      899e2dad
    • A
      Merge pull request #32052 from rails/fix-country-zones-with-multiple-mappings · 0d41a76d
      Andrew White 提交于
      Return all mappings for a timezone id in country_zones
      0d41a76d
    • A
      Remove trailing semi-colon from CSP · d85283cc
      Andrew White 提交于
      Although the spec[1] is defined in such a way that a trailing semi-colon
      is valid it also doesn't allow a semi-colon by itself to indicate an
      empty policy. Therefore it's easier (and valid) just to omit it rather
      than to detect whether the policy is empty or not.
      
      [1]: https://www.w3.org/TR/CSP2/#policy-syntax
      d85283cc
    • A
      Don't accidentally create an empty CSP · 57f9c363
      Andrew White 提交于
      Setting up the request environment was accidentally creating a CSP
      as a consequence of accessing the option - only set the instance
      variable if a block is passed.
      57f9c363
    • A
      Revert "Merge pull request #32045 from eagletmt/skip-csp-header" · 52a1f1c2
      Andrew White 提交于
      This reverts commit 86f7c269, reversing
      changes made to 5ece2e4a.
      
      If a policy is set then we should generate it even if it's empty.
      However what is happening is that we're accidentally generating an
      empty policy when the initializer is commented out by default.
      52a1f1c2
    • A
      Return all mappings for a timezone id in `country_zones` · 2d95956e
      Andrew White 提交于
      Some timezones like `Europe/London` have multiple mappings in
      `ActiveSupport::TimeZone::MAPPING` so return all of them instead
      of the first one found by using `Hash#value`. e.g:
      
        # Before
        ActiveSupport::TimeZone.country_zones("GB") # => ["Edinburgh"]
      
        # After
        ActiveSupport::TimeZone.country_zones("GB") # => ["Edinburgh", "London"]
      
      Fixes #31668.
      2d95956e
    • R
      Merge pull request #32051 from dixitp012/rubocop_single_space · f712ef27
      Ryuta Kamizono 提交于
      rubocop single space after assignment
      f712ef27
    • D
      rubocop single space after assignment · f0af84df
      Dixit Patel 提交于
      f0af84df
    • Y
      Use the query cache when connection is already connected · 0d9fb7eb
      yuuji.yaginuma 提交于
      Fixes #32021.
      0d9fb7eb
    • G
      bec1751e
    • G
      Fix test method name · 67bf2f41
      Guillermo Iguaran 提交于
      67bf2f41
    • G
      Don't generate empty app/views folder when --api and --skip-action-mailer are used together · 185e6daa
      Guillermo Iguaran 提交于
      The purpose of keeping app/views folder in API apps is that it's used for
      mailer views so doesn't makes sense to keep it when Action Mailer is skipped.
      185e6daa
    • K
      Clean up reporter replacement a bit. · 6cc000c3
      Kasper Timm Hansen 提交于
      * Don't use :: for class methods, we don't do that elsewhere.
      
      * Don't install a needless method on minitest. Prefer assigning the
        reporter anyway as that's what minitest does internally.
      
      * Don't bother opting out when the reporter ain't a Minitest::CompositeReporter.
        It's hardcoded: https://github.com/seattlerb/minitest/blob/005a3ba42c07d04797e2d00ac2c53e3be127c12f/lib/minitest.rb#L125
        And overrides have to create delegate reporters:
        https://github.com/kern/minitest-reporters/blob/1018b1b42f34b01d4de179c8aad2fa06771fe9b0/lib/minitest/minitest_reporter_plugin.rb#L72
      6cc000c3
    • G
      Merge pull request #32045 from eagletmt/skip-csp-header · 86f7c269
      Guillermo Iguaran 提交于
      Skip generating empty CSP header when no policy is configured
      86f7c269
  5. 18 2月, 2018 8 次提交