activesupport 6.1.1 → 6.1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of activesupport might be problematic. Click here for more details.
- checksums.yaml +4 -4
 - data/CHANGELOG.md +43 -0
 - data/README.rdoc +1 -1
 - data/lib/active_support/cache/mem_cache_store.rb +9 -5
 - data/lib/active_support/core_ext/time/calculations.rb +8 -2
 - data/lib/active_support/gem_version.rb +2 -2
 - data/lib/active_support/hash_with_indifferent_access.rb +1 -1
 - data/lib/active_support/notifications.rb +1 -1
 - data/lib/active_support/parameter_filter.rb +1 -1
 - data/lib/active_support/time_with_zone.rb +1 -1
 - data/lib/active_support/values/time_zone.rb +1 -1
 - metadata +6 -6
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 79de516b16a70e3ae9100d8f6a35deca4f3dec0f3c080ea4c44debdfdddb11d0
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 187bd3a2e457d13669cd200ad633508bc8601225cadee1688ef17847d49da6ae
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 0b7a231bd4b8c8d8feb1d84150c1217afa22c221150e562689ea70e761f5a2c67e1db8dfda5daa3832d3a61d864769cb922f3b5e0b6f797a101be34fdcea2b43
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 5964297423a93328267eafbe48ed68828d38d0c8040b0765ecfa2da24bb0edbcab537caf00993c6e5d9859be37d5d3ea79f557981f212a6f76f7454177110e18
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,3 +1,46 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ## Rails 6.1.3.2 (May 05, 2021) ##
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            *   No changes.
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            ## Rails 6.1.3.1 (March 26, 2021) ##
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            *   No changes.
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            ## Rails 6.1.3 (February 17, 2021) ##
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            *   No changes.
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            ## Rails 6.1.2.1 (February 10, 2021) ##
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            *   No changes.
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            ## Rails 6.1.2 (February 09, 2021) ##
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
            *   `ActiveSupport::Cache::MemCacheStore` now accepts an explicit `nil` for its `addresses` argument.
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
                ```ruby
         
     | 
| 
      
 26 
     | 
    
         
            +
                config.cache_store = :mem_cache_store, nil
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                # is now equivalent to
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                config.cache_store = :mem_cache_store
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                # and is also equivalent to
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                config.cache_store = :mem_cache_store, ENV["MEMCACHE_SERVERS"] || "localhost:11211"
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
                # which is the fallback behavior of Dalli
         
     | 
| 
      
 37 
     | 
    
         
            +
                ```
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
                This helps those migrating from `:dalli_store`, where an explicit `nil` was permitted.
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                *Michael Overmeyer*
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
       1 
44 
     | 
    
         
             
            ## Rails 6.1.1 (January 07, 2021) ##
         
     | 
| 
       2 
45 
     | 
    
         | 
| 
       3 
46 
     | 
    
         
             
            *   Change `IPAddr#to_json` to match the behavior of the json gem returning the string representation
         
     | 
    
        data/README.rdoc
    CHANGED
    
    | 
         @@ -15,7 +15,7 @@ The latest version of Active Support can be installed with RubyGems: 
     | 
|
| 
       15 
15 
     | 
    
         | 
| 
       16 
16 
     | 
    
         
             
            Source code can be downloaded as part of the Rails project on GitHub:
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
     | 
    
         
            -
            * https://github.com/rails/rails/tree/ 
     | 
| 
      
 18 
     | 
    
         
            +
            * https://github.com/rails/rails/tree/main/activesupport
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         | 
| 
       21 
21 
     | 
    
         
             
            == License
         
     | 
| 
         @@ -64,7 +64,7 @@ module ActiveSupport 
     | 
|
| 
       64 
64 
     | 
    
         
             
                  def self.build_mem_cache(*addresses) # :nodoc:
         
     | 
| 
       65 
65 
     | 
    
         
             
                    addresses = addresses.flatten
         
     | 
| 
       66 
66 
     | 
    
         
             
                    options = addresses.extract_options!
         
     | 
| 
       67 
     | 
    
         
            -
                    addresses = nil if addresses.empty?
         
     | 
| 
      
 67 
     | 
    
         
            +
                    addresses = nil if addresses.compact.empty?
         
     | 
| 
       68 
68 
     | 
    
         
             
                    pool_options = retrieve_pool_options(options)
         
     | 
| 
       69 
69 
     | 
    
         | 
| 
       70 
70 
     | 
    
         
             
                    if pool_options.empty?
         
     | 
| 
         @@ -185,10 +185,14 @@ module ActiveSupport 
     | 
|
| 
       185 
185 
     | 
    
         
             
                    # before applying the regular expression to ensure we are escaping all
         
     | 
| 
       186 
186 
     | 
    
         
             
                    # characters properly.
         
     | 
| 
       187 
187 
     | 
    
         
             
                    def normalize_key(key, options)
         
     | 
| 
       188 
     | 
    
         
            -
                      key = super 
     | 
| 
       189 
     | 
    
         
            -
             
     | 
| 
       190 
     | 
    
         
            -
                       
     | 
| 
       191 
     | 
    
         
            -
             
     | 
| 
      
 188 
     | 
    
         
            +
                      key = super
         
     | 
| 
      
 189 
     | 
    
         
            +
             
     | 
| 
      
 190 
     | 
    
         
            +
                      if key
         
     | 
| 
      
 191 
     | 
    
         
            +
                        key = key.dup.force_encoding(Encoding::ASCII_8BIT)
         
     | 
| 
      
 192 
     | 
    
         
            +
                        key = key.gsub(ESCAPE_KEY_CHARS) { |match| "%#{match.getbyte(0).to_s(16).upcase}" }
         
     | 
| 
      
 193 
     | 
    
         
            +
                        key = "#{key[0, 213]}:md5:#{ActiveSupport::Digest.hexdigest(key)}" if key.size > 250
         
     | 
| 
      
 194 
     | 
    
         
            +
                      end
         
     | 
| 
      
 195 
     | 
    
         
            +
             
     | 
| 
       192 
196 
     | 
    
         
             
                      key
         
     | 
| 
       193 
197 
     | 
    
         
             
                    end
         
     | 
| 
       194 
198 
     | 
    
         | 
| 
         @@ -42,8 +42,14 @@ class Time 
     | 
|
| 
       42 
42 
     | 
    
         | 
| 
       43 
43 
     | 
    
         
             
                # Layers additional behavior on Time.at so that ActiveSupport::TimeWithZone and DateTime
         
     | 
| 
       44 
44 
     | 
    
         
             
                # instances can be used when called with a single argument
         
     | 
| 
       45 
     | 
    
         
            -
                def at_with_coercion(*args)
         
     | 
| 
       46 
     | 
    
         
            -
                   
     | 
| 
      
 45 
     | 
    
         
            +
                def at_with_coercion(*args, **kwargs)
         
     | 
| 
      
 46 
     | 
    
         
            +
                  if args.size != 1
         
     | 
| 
      
 47 
     | 
    
         
            +
                    if kwargs.empty?
         
     | 
| 
      
 48 
     | 
    
         
            +
                      return at_without_coercion(*args)
         
     | 
| 
      
 49 
     | 
    
         
            +
                    else
         
     | 
| 
      
 50 
     | 
    
         
            +
                      return at_without_coercion(*args, **kwargs)
         
     | 
| 
      
 51 
     | 
    
         
            +
                    end
         
     | 
| 
      
 52 
     | 
    
         
            +
                  end
         
     | 
| 
       47 
53 
     | 
    
         | 
| 
       48 
54 
     | 
    
         
             
                  # Time.at can be called with a time or numerical value
         
     | 
| 
       49 
55 
     | 
    
         
             
                  time_or_number = args.first
         
     | 
| 
         @@ -113,7 +113,7 @@ module ActiveSupport 
     | 
|
| 
       113 
113 
     | 
    
         
             
                # <tt>ActiveSupport::HashWithIndifferentAccess</tt> or a regular +Hash+.
         
     | 
| 
       114 
114 
     | 
    
         
             
                # In either case the merge respects the semantics of indifferent access.
         
     | 
| 
       115 
115 
     | 
    
         
             
                #
         
     | 
| 
       116 
     | 
    
         
            -
                # If the argument is a regular hash with keys +:key+ and  
     | 
| 
      
 116 
     | 
    
         
            +
                # If the argument is a regular hash with keys +:key+ and <tt>"key"</tt> only one
         
     | 
| 
       117 
117 
     | 
    
         
             
                # of the values end up in the receiver, but which one is unspecified.
         
     | 
| 
       118 
118 
     | 
    
         
             
                #
         
     | 
| 
       119 
119 
     | 
    
         
             
                # When given a block, the value for duplicated keys will be determined
         
     | 
| 
         @@ -178,7 +178,7 @@ module ActiveSupport 
     | 
|
| 
       178 
178 
     | 
    
         
             
              #
         
     | 
| 
       179 
179 
     | 
    
         
             
              # Subscribers using a regexp or other pattern-matching object will remain subscribed
         
     | 
| 
       180 
180 
     | 
    
         
             
              # to all events that match their original pattern, unless those events match a string
         
     | 
| 
       181 
     | 
    
         
            -
              # passed to  
     | 
| 
      
 181 
     | 
    
         
            +
              # passed to +unsubscribe+:
         
     | 
| 
       182 
182 
     | 
    
         
             
              #
         
     | 
| 
       183 
183 
     | 
    
         
             
              #   subscriber = ActiveSupport::Notifications.subscribe(/render/) { }
         
     | 
| 
       184 
184 
     | 
    
         
             
              #   ActiveSupport::Notifications.unsubscribe('render_template.action_view')
         
     | 
| 
         @@ -33,7 +33,7 @@ module ActiveSupport 
     | 
|
| 
       33 
33 
     | 
    
         
             
                #
         
     | 
| 
       34 
34 
     | 
    
         
             
                # ==== Options
         
     | 
| 
       35 
35 
     | 
    
         
             
                #
         
     | 
| 
       36 
     | 
    
         
            -
                # * <tt>:mask</tt> - A replaced object when filtered. Defaults to  
     | 
| 
      
 36 
     | 
    
         
            +
                # * <tt>:mask</tt> - A replaced object when filtered. Defaults to <tt>"[FILTERED]"</tt>.
         
     | 
| 
       37 
37 
     | 
    
         
             
                def initialize(filters = [], mask: FILTERED)
         
     | 
| 
       38 
38 
     | 
    
         
             
                  @filters = filters
         
     | 
| 
       39 
39 
     | 
    
         
             
                  @mask = mask
         
     | 
| 
         @@ -301,7 +301,7 @@ module ActiveSupport 
     | 
|
| 
       301 
301 
     | 
    
         
             
                alias_method :in, :+
         
     | 
| 
       302 
302 
     | 
    
         | 
| 
       303 
303 
     | 
    
         
             
                # Subtracts an interval of time and returns a new TimeWithZone object unless
         
     | 
| 
       304 
     | 
    
         
            -
                # the other value  
     | 
| 
      
 304 
     | 
    
         
            +
                # the other value +acts_like?+ time. Then it will return a Float of the difference
         
     | 
| 
       305 
305 
     | 
    
         
             
                # between the two times that represents the difference between the current
         
     | 
| 
       306 
306 
     | 
    
         
             
                # object's time and the +other+ time.
         
     | 
| 
       307 
307 
     | 
    
         
             
                #
         
     | 
| 
         @@ -508,7 +508,7 @@ module ActiveSupport 
     | 
|
| 
       508 
508 
     | 
    
         
             
                # Time#in_time_zone() instead.
         
     | 
| 
       509 
509 
     | 
    
         
             
                #
         
     | 
| 
       510 
510 
     | 
    
         
             
                # As of tzinfo 2, utc_to_local returns a Time with a non-zero utc_offset.
         
     | 
| 
       511 
     | 
    
         
            -
                # See the  
     | 
| 
      
 511 
     | 
    
         
            +
                # See the +utc_to_local_returns_utc_offset_times+ config for more info.
         
     | 
| 
       512 
512 
     | 
    
         
             
                def utc_to_local(time)
         
     | 
| 
       513 
513 
     | 
    
         
             
                  tzinfo.utc_to_local(time).yield_self do |t|
         
     | 
| 
       514 
514 
     | 
    
         
             
                    ActiveSupport.utc_to_local_returns_utc_offset_times ?
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: activesupport
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 6.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 6.1.3.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - David Heinemeier Hansson
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2021- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2021-05-05 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: i18n
         
     | 
| 
         @@ -357,10 +357,10 @@ licenses: 
     | 
|
| 
       357 
357 
     | 
    
         
             
            - MIT
         
     | 
| 
       358 
358 
     | 
    
         
             
            metadata:
         
     | 
| 
       359 
359 
     | 
    
         
             
              bug_tracker_uri: https://github.com/rails/rails/issues
         
     | 
| 
       360 
     | 
    
         
            -
              changelog_uri: https://github.com/rails/rails/blob/v6.1. 
     | 
| 
       361 
     | 
    
         
            -
              documentation_uri: https://api.rubyonrails.org/v6.1. 
     | 
| 
      
 360 
     | 
    
         
            +
              changelog_uri: https://github.com/rails/rails/blob/v6.1.3.2/activesupport/CHANGELOG.md
         
     | 
| 
      
 361 
     | 
    
         
            +
              documentation_uri: https://api.rubyonrails.org/v6.1.3.2/
         
     | 
| 
       362 
362 
     | 
    
         
             
              mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
         
     | 
| 
       363 
     | 
    
         
            -
              source_code_uri: https://github.com/rails/rails/tree/v6.1. 
     | 
| 
      
 363 
     | 
    
         
            +
              source_code_uri: https://github.com/rails/rails/tree/v6.1.3.2/activesupport
         
     | 
| 
       364 
364 
     | 
    
         
             
            post_install_message:
         
     | 
| 
       365 
365 
     | 
    
         
             
            rdoc_options:
         
     | 
| 
       366 
366 
     | 
    
         
             
            - "--encoding"
         
     | 
| 
         @@ -378,7 +378,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       378 
378 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       379 
379 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       380 
380 
     | 
    
         
             
            requirements: []
         
     | 
| 
       381 
     | 
    
         
            -
            rubygems_version: 3.2 
     | 
| 
      
 381 
     | 
    
         
            +
            rubygems_version: 3.1.2
         
     | 
| 
       382 
382 
     | 
    
         
             
            signing_key:
         
     | 
| 
       383 
383 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       384 
384 
     | 
    
         
             
            summary: A toolkit of support libraries and Ruby core extensions extracted from the
         
     |