1. 29 11月, 2017 2 次提交
  2. 28 11月, 2017 2 次提交
    • R
      Preparing for 5.2.0.beta1 release · cceeeb6e
      Rafael Mendonça França 提交于
      cceeeb6e
    • I
      [ci skip] Fix documentation for deprecation method_wrappers · 7d35a59e
      Ignat Zakrevsky 提交于
      Seems like version with class methods doesn't work. 
      
      ```ruby
      require "active_support/deprecation.rb"
      
      module Fred
        extend self
      
        def aaa; end
        def bbb; end
        def ccc; end
        def ddd; end
        def eee; end
      end
      
      ActiveSupport::Deprecation.deprecate_methods(Fred, :aaa, bbb: :zzz, ccc: 'use Bar#ccc instead')
      Fred.aaa
      Fred.bbb
      Fred.ccc
      ```
      # produces nothing
      
      vs
      
      ```ruby
      require "active_support/deprecation.rb"
      
      class Fred
        def aaa; end
        def bbb; end
        def ccc; end
        def ddd; end
        def eee; end
      end
      
      ActiveSupport::Deprecation.deprecate_methods(Fred, :aaa, bbb: :zzz, ccc: 'use Bar#ccc instead')
      Fred.new.aaa
      Fred.new.bbb
      Fred.new.ccc
      ```
      
      produces
      
      ```
      DEPRECATION WARNING: aaa is deprecated and will be removed from Rails 5.2 (called from <main> at deprications.rb:15)
      DEPRECATION WARNING: bbb is deprecated and will be removed from Rails 5.2 (use zzz instead) (called from <main> at deprications.rb:16)
      DEPRECATION WARNING: ccc is deprecated and will be removed from Rails 5.2 (use Bar#ccc instead) (called from <main> at deprications.rb:17)
      ```
      7d35a59e
  3. 27 11月, 2017 1 次提交
    • R
      Enable `Style/DefWithParentheses` rubocop rule · 7ce8a6af
      Ryuta Kamizono 提交于
      The def with blank `()` was newly added in #31176, but we have not used
      the blank `()` style in most part of our code base.
      So I've enabled `Style/DefWithParentheses` to prevent to newly added the
      code.
      7ce8a6af
  4. 26 11月, 2017 2 次提交
  5. 23 11月, 2017 2 次提交
  6. 21 11月, 2017 1 次提交
  7. 20 11月, 2017 1 次提交
  8. 18 11月, 2017 1 次提交
  9. 15 11月, 2017 3 次提交
  10. 14 11月, 2017 2 次提交
    • J
      Cache: Enable compression by default for values > 1kB. · ed100166
      Jeremy Daer 提交于
      Compression has long been available, but opt-in and at a 16kB threshold.
      It wasn't enabled by default due to CPU cost. Today it's cheap and
      typical cache data is eminently compressible, such as HTML or JSON
      fragments.
      
      Compression dramatically reduces Memcached/Redis mem usage, which means
      the same cache servers can store more data, which means higher hit
      rates.
      
      To disable compression, pass `compress: false` to the initializer.
      ed100166
    • J
      Built-in Redis cache store · 9f8ec353
      Jeremy Daer 提交于
      * Supports vanilla Redis, hiredis, and Redis::Distributed.
      * Supports Memcached-like sharding across Redises with Redis::Distributed.
      * Fault tolerant. If the Redis server is unavailable, no exceptions are
        raised. Cache fetches are treated as misses and writes are dropped.
      * Local cache. Hot in-memory primary cache within block/middleware scope.
      * `read_/write_multi` support for Redis mget/mset. Use Redis::Distributed
        4.0.1+ for distributed mget support.
      * `delete_matched` support for Redis KEYS globs.
      9f8ec353
  11. 13 11月, 2017 1 次提交
    • Y
      Verify credentials format before saving · 00f5aca3
      yuuji.yaginuma 提交于
      Currently, credentials does not check the format when saving. As a result,
      incorrect data as yaml is also saved.
      If credentials is used in config files., an error will occur in credential
      yaml parsing before edit, and will not be able to edit it.
      
      In order to prevent this, verify the format when saving.
      
      Related: #30851
      00f5aca3
  12. 12 11月, 2017 1 次提交
  13. 10 11月, 2017 3 次提交
    • R
      · a7ef60d5
      Ryuta Kamizono 提交于
      [ci skip]
      a7ef60d5
    • Y
      Remove unused require · aec2b8b3
      yuuji.yaginuma 提交于
      This is no longer used since fd6aaaa0.
      aec2b8b3
    • K
      Bump RuboCop to 0.51.0 · 8c5115f9
      Koichi ITO 提交于
      ## Summary
      
      RuboCop 0.51.0 was released.
      https://github.com/bbatsov/rubocop/releases/tag/v0.51.0
      
      And rubocop-0-51 channel is available in Code Climate.
      https://github.com/codeclimate/codeclimate-rubocop/issues/109
      
      This PR will bump RuboCop to 0.51.0 and fixes the following new
      offenses.
      
      ```console
      % bundle exec rubocop
      Inspecting 2358 files
      
      (snip)
      
      Offenses:
      
      actionpack/lib/action_controller/metal/http_authentication.rb:251:59: C:
      Prefer double-quoted strings unless you need single quotes to avoid
      extra backslashes for escaping.
                [key.strip, value.to_s.gsub(/^"|"$/, "").delete('\'')]
                                                                ^^^^
      activesupport/test/core_ext/load_error_test.rb:8:39: C: Prefer
      double-quoted strings unless you need single quotes to avoid extra
      backslashes for escaping.
          assert_raise(LoadError) { require 'no_this_file_don\'t_exist' }
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      
      2358 files inspected, 2 offenses detected
      ```
      8c5115f9
  14. 09 11月, 2017 2 次提交
    • B
      Prevent deadlocks with load interlock and DB lock. · 1f9f6f6c
      Brent Wheeldon 提交于
      This fixes an issue where competing threads deadlock each other.
      
      - Thread A holds the load interlock but is blocked on getting the DB lock
      - Thread B holds the DB lock but is blocked on getting the load interlock (for example when there is a `Model.transaction` block that needs to autoload)
      
      This solution allows for dependency loading in other threads while a thread is waiting to acquire the DB lock.
      
      Fixes #31019
      1f9f6f6c
    • B
      Remove code duplication in ActiveSupport::Cache · 57f0e3d1
      Bogdan Gusiev 提交于
      57f0e3d1
  15. 08 11月, 2017 1 次提交
    • A
      Allow `Range#include?` on TWZ ranges · 2b434d6f
      Andrew White 提交于
      In #11474 we prevented TWZ ranges being iterated over which matched
      Ruby's handling of Time ranges and as a consequence `include?` stopped
      working with both Time ranges and TWZ ranges. However in
      ruby/ruby@b061634 support was added for `include?` to use `cover?` for
      'linear' objects. Since we have no way of making Ruby consider TWZ
      instances as 'linear' we have to override `Range#include?`.
      
      Fixes #30799.
      2b434d6f
  16. 07 11月, 2017 2 次提交
  17. 06 11月, 2017 2 次提交
  18. 04 11月, 2017 1 次提交
  19. 01 11月, 2017 3 次提交
  20. 29 10月, 2017 1 次提交
    • N
      Deprecate ActiveSupport::Inflector#acronym_regex · b2545e41
      Nick LaMuro 提交于
      To be removed in Rails 6.0 (default for the deprecate helper).  Code
      moved around as well for the ActiveSupport::Deprecation modules, since
      it was dependent on ActiveSupport::Inflector being loaded for it to
      work.  By "lazy loading" the Inflector code from within the Deprecation
      code, we can require ActiveSupport::Deprecation from
      ActiveSupport::Inflector and not get a circular dependency issue.
      b2545e41
  21. 28 10月, 2017 2 次提交
  22. 25 10月, 2017 4 次提交