activemodel 7.0.5 → 7.0.8.6
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.
- checksums.yaml +4 -4
 - data/CHANGELOG.md +65 -0
 - data/README.rdoc +2 -2
 - data/lib/active_model/attribute_methods.rb +1 -1
 - data/lib/active_model/error.rb +1 -1
 - data/lib/active_model/gem_version.rb +2 -2
 - data/lib/active_model/type/binary.rb +3 -1
 - data/lib/active_model/type/helpers/mutable.rb +4 -4
 - data/lib/active_model/type/value.rb +6 -2
 - metadata +8 -8
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: e289cdc76a9ec9d327c1c08dc126f1afe69481e0e242dfda54fe10e975f83e09
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: a581cc5b0d46d8f5ecc6506a890f3fd5a0a36118093951613da9e82c312273c0
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: a4fd63d2ec145a2deb698110f5525902495f6c5d443f8222d579f399df6c3b197c8aec40d50afe6fc77ae66156a3276c6b28143f731444152d871e5c59ad3340
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: c9fb8423892642e93c01c6685f92a2e2ec1bdf3275b8965643b92f985988fe85700273851b8a6ebb5a57132b3f1628146fa162e2a087cf96b9c36e739b175d43
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,3 +1,68 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ## Rails 7.0.8.6 (October 23, 2024) ##
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            *   No changes.
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            ## Rails 7.0.8.5 (October 15, 2024) ##
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            *   No changes.
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            ## Rails 7.0.8.4 (June 04, 2024) ##
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            *   No changes.
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            ## Rails 7.0.8.3 (May 17, 2024) ##
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            *   No changes.
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            ## Rails 7.0.8.2 (May 16, 2024) ##
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
            *   No changes.
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
            ## Rails 7.0.8.1 (February 21, 2024) ##
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
            *   No changes.
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
            ## Rails 7.0.8 (September 09, 2023) ##
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
            *   No changes.
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
            ## Rails 7.0.7.2 (August 22, 2023) ##
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
            *   No changes.
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
            ## Rails 7.0.7.1 (August 22, 2023) ##
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
            *   No changes.
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
      
 46 
     | 
    
         
            +
            ## Rails 7.0.7 (August 09, 2023) ##
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
            *   Error.full_message now strips ":base" from the message.
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
                *zzak*
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
            *   Add a load hook for `ActiveModel::Model` (named `active_model`) to match the load hook for
         
     | 
| 
      
 53 
     | 
    
         
            +
                `ActiveRecord::Base` and allow for overriding aspects of the `ActiveModel::Model` class.
         
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
      
 56 
     | 
    
         
            +
            ## Rails 7.0.6 (June 29, 2023) ##
         
     | 
| 
      
 57 
     | 
    
         
            +
             
     | 
| 
      
 58 
     | 
    
         
            +
            *   No changes.
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
            ## Rails 7.0.5.1 (June 26, 2023) ##
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
            *   No changes.
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
       1 
66 
     | 
    
         
             
            ## Rails 7.0.5 (May 24, 2023) ##
         
     | 
| 
       2 
67 
     | 
    
         | 
| 
       3 
68 
     | 
    
         
             
            *   No changes.
         
     | 
    
        data/README.rdoc
    CHANGED
    
    | 
         @@ -239,7 +239,7 @@ The latest version of Active Model can be installed with RubyGems: 
     | 
|
| 
       239 
239 
     | 
    
         | 
| 
       240 
240 
     | 
    
         
             
              $ gem install activemodel
         
     | 
| 
       241 
241 
     | 
    
         | 
| 
       242 
     | 
    
         
            -
            Source code can be downloaded as part of the Rails project on GitHub
         
     | 
| 
      
 242 
     | 
    
         
            +
            Source code can be downloaded as part of the \Rails project on GitHub
         
     | 
| 
       243 
243 
     | 
    
         | 
| 
       244 
244 
     | 
    
         
             
            * https://github.com/rails/rails/tree/main/activemodel
         
     | 
| 
       245 
245 
     | 
    
         | 
| 
         @@ -257,7 +257,7 @@ API documentation is at: 
     | 
|
| 
       257 
257 
     | 
    
         | 
| 
       258 
258 
     | 
    
         
             
            * https://api.rubyonrails.org
         
     | 
| 
       259 
259 
     | 
    
         | 
| 
       260 
     | 
    
         
            -
            Bug reports for the Ruby on Rails project can be filed here:
         
     | 
| 
      
 260 
     | 
    
         
            +
            Bug reports for the Ruby on \Rails project can be filed here:
         
     | 
| 
       261 
261 
     | 
    
         | 
| 
       262 
262 
     | 
    
         
             
            * https://github.com/rails/rails/issues
         
     | 
| 
       263 
263 
     | 
    
         | 
| 
         @@ -415,7 +415,7 @@ module ActiveModel 
     | 
|
| 
       415 
415 
     | 
    
         
             
                        @prefix = prefix
         
     | 
| 
       416 
416 
     | 
    
         
             
                        @suffix = suffix
         
     | 
| 
       417 
417 
     | 
    
         
             
                        @parameters = parameters.nil? ? FORWARD_PARAMETERS : parameters
         
     | 
| 
       418 
     | 
    
         
            -
                        @regex =  
     | 
| 
      
 418 
     | 
    
         
            +
                        @regex = /\A(?:#{Regexp.escape(@prefix)})(.*)(?:#{Regexp.escape(@suffix)})\z/
         
     | 
| 
       419 
419 
     | 
    
         
             
                        @target = "#{@prefix}attribute#{@suffix}"
         
     | 
| 
       420 
420 
     | 
    
         
             
                        @method_name = "#{prefix}%s#{suffix}"
         
     | 
| 
       421 
421 
     | 
    
         
             
                      end
         
     | 
    
        data/lib/active_model/error.rb
    CHANGED
    
    | 
         @@ -49,7 +49,7 @@ module ActiveModel 
     | 
|
| 
       49 
49 
     | 
    
         
             
                  defaults << :"errors.format"
         
     | 
| 
       50 
50 
     | 
    
         
             
                  defaults << "%{attribute} %{message}"
         
     | 
| 
       51 
51 
     | 
    
         | 
| 
       52 
     | 
    
         
            -
                  attr_name = attribute.tr(".", "_").humanize
         
     | 
| 
      
 52 
     | 
    
         
            +
                  attr_name = attribute.remove(/\.base\z/).tr(".", "_").humanize
         
     | 
| 
       53 
53 
     | 
    
         
             
                  attr_name = base_class.human_attribute_name(attribute, {
         
     | 
| 
       54 
54 
     | 
    
         
             
                    default: attr_name,
         
     | 
| 
       55 
55 
     | 
    
         
             
                    base: base,
         
     | 
| 
         @@ -4,10 +4,6 @@ module ActiveModel 
     | 
|
| 
       4 
4 
     | 
    
         
             
              module Type
         
     | 
| 
       5 
5 
     | 
    
         
             
                module Helpers # :nodoc: all
         
     | 
| 
       6 
6 
     | 
    
         
             
                  module Mutable
         
     | 
| 
       7 
     | 
    
         
            -
                    def immutable_value(value)
         
     | 
| 
       8 
     | 
    
         
            -
                      value.deep_dup.freeze
         
     | 
| 
       9 
     | 
    
         
            -
                    end
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
7 
     | 
    
         
             
                    def cast(value)
         
     | 
| 
       12 
8 
     | 
    
         
             
                      deserialize(serialize(value))
         
     | 
| 
       13 
9 
     | 
    
         
             
                    end
         
     | 
| 
         @@ -18,6 +14,10 @@ module ActiveModel 
     | 
|
| 
       18 
14 
     | 
    
         
             
                    def changed_in_place?(raw_old_value, new_value)
         
     | 
| 
       19 
15 
     | 
    
         
             
                      raw_old_value != serialize(new_value)
         
     | 
| 
       20 
16 
     | 
    
         
             
                    end
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
                    def mutable? # :nodoc:
         
     | 
| 
      
 19 
     | 
    
         
            +
                      true
         
     | 
| 
      
 20 
     | 
    
         
            +
                    end
         
     | 
| 
       21 
21 
     | 
    
         
             
                  end
         
     | 
| 
       22 
22 
     | 
    
         
             
                end
         
     | 
| 
       23 
23 
     | 
    
         
             
              end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: activemodel
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 7.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 7.0.8.6
         
     | 
| 
       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:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2024-10-23 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: activesupport
         
     | 
| 
         @@ -16,14 +16,14 @@ dependencies: 
     | 
|
| 
       16 
16 
     | 
    
         
             
                requirements:
         
     | 
| 
       17 
17 
     | 
    
         
             
                - - '='
         
     | 
| 
       18 
18 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       19 
     | 
    
         
            -
                    version: 7.0. 
     | 
| 
      
 19 
     | 
    
         
            +
                    version: 7.0.8.6
         
     | 
| 
       20 
20 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       21 
21 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       22 
22 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       23 
23 
     | 
    
         
             
                requirements:
         
     | 
| 
       24 
24 
     | 
    
         
             
                - - '='
         
     | 
| 
       25 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       26 
     | 
    
         
            -
                    version: 7.0. 
     | 
| 
      
 26 
     | 
    
         
            +
                    version: 7.0.8.6
         
     | 
| 
       27 
27 
     | 
    
         
             
            description: A toolkit for building modeling frameworks like Active Record. Rich support
         
     | 
| 
       28 
28 
     | 
    
         
             
              for attributes, callbacks, validations, serialization, internationalization, and
         
     | 
| 
       29 
29 
     | 
    
         
             
              testing.
         
     | 
| 
         @@ -107,10 +107,10 @@ licenses: 
     | 
|
| 
       107 
107 
     | 
    
         
             
            - MIT
         
     | 
| 
       108 
108 
     | 
    
         
             
            metadata:
         
     | 
| 
       109 
109 
     | 
    
         
             
              bug_tracker_uri: https://github.com/rails/rails/issues
         
     | 
| 
       110 
     | 
    
         
            -
              changelog_uri: https://github.com/rails/rails/blob/v7.0. 
     | 
| 
       111 
     | 
    
         
            -
              documentation_uri: https://api.rubyonrails.org/v7.0. 
     | 
| 
      
 110 
     | 
    
         
            +
              changelog_uri: https://github.com/rails/rails/blob/v7.0.8.6/activemodel/CHANGELOG.md
         
     | 
| 
      
 111 
     | 
    
         
            +
              documentation_uri: https://api.rubyonrails.org/v7.0.8.6/
         
     | 
| 
       112 
112 
     | 
    
         
             
              mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
         
     | 
| 
       113 
     | 
    
         
            -
              source_code_uri: https://github.com/rails/rails/tree/v7.0. 
     | 
| 
      
 113 
     | 
    
         
            +
              source_code_uri: https://github.com/rails/rails/tree/v7.0.8.6/activemodel
         
     | 
| 
       114 
114 
     | 
    
         
             
              rubygems_mfa_required: 'true'
         
     | 
| 
       115 
115 
     | 
    
         
             
            post_install_message: 
         
     | 
| 
       116 
116 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
         @@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       127 
127 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       128 
128 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       129 
129 
     | 
    
         
             
            requirements: []
         
     | 
| 
       130 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
      
 130 
     | 
    
         
            +
            rubygems_version: 3.5.16
         
     | 
| 
       131 
131 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       132 
132 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       133 
133 
     | 
    
         
             
            summary: A toolkit for building modeling frameworks (part of Rails).
         
     |