attr_json 2.5.0 → 2.6.0
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/.github/workflows/ci.yml +3 -15
 - data/.github/workflows/future_rails_ci.yml +1 -1
 - data/Appraisals +7 -0
 - data/CHANGELOG.md +12 -1
 - data/README.md +3 -2
 - data/attr_json.gemspec +1 -1
 - data/gemfiles/rails_8_1.gemfile +18 -0
 - data/lib/attr_json/attribute_definition.rb +1 -2
 - data/lib/attr_json/record.rb +1 -1
 - data/lib/attr_json/version.rb +1 -1
 - metadata +6 -8
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: c998ba03c0014b885521c0887f43dc0e1fcda328d61aa50921eea04b4a82b1aa
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: '0813b424db2bceb7c9466c404d71822541fd9262b5add2412f9bd4cabdf8bc91'
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 955e14e84be8141072680b2c33f89fa58ccfb720f006737ffbf708b38116f1fd80d9b45158d9e0b85ca2df76479f002aa96990bbce1cb7e63335162eadad7e23
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 11a651f067c931301568b11f06f3c38f53ce93c1625320debf98ee5174b8c97b11b2756f1a6d539e7c83af78e9c68021e4ede43aa0880d6bdb8e45f658aa5029
         
     | 
    
        data/.github/workflows/ci.yml
    CHANGED
    
    | 
         @@ -35,33 +35,18 @@ jobs: 
     | 
|
| 
       35 
35 
     | 
    
         
             
                      - gemfile: rails_6_0
         
     | 
| 
       36 
36 
     | 
    
         
             
                        ruby: 2.7
         
     | 
| 
       37 
37 
     | 
    
         | 
| 
       38 
     | 
    
         
            -
                      - gemfile: rails_6_0
         
     | 
| 
       39 
     | 
    
         
            -
                        ruby: '3.0'
         
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
38 
     | 
    
         
             
                      - gemfile: rails_6_1
         
     | 
| 
       42 
39 
     | 
    
         
             
                        ruby: 2.7
         
     | 
| 
       43 
40 
     | 
    
         | 
| 
       44 
41 
     | 
    
         
             
                      - gemfile: rails_6_1
         
     | 
| 
       45 
42 
     | 
    
         
             
                        ruby: '3.0'
         
     | 
| 
       46 
43 
     | 
    
         | 
| 
       47 
     | 
    
         
            -
                      - gemfile: rails_7_0
         
     | 
| 
       48 
     | 
    
         
            -
                        ruby: '3.0'
         
     | 
| 
       49 
     | 
    
         
            -
             
     | 
| 
       50 
44 
     | 
    
         
             
                      - gemfile: rails_7_0
         
     | 
| 
       51 
45 
     | 
    
         
             
                        ruby: 3.1
         
     | 
| 
       52 
46 
     | 
    
         | 
| 
       53 
47 
     | 
    
         
             
                      - gemfile: rails_7_0
         
     | 
| 
       54 
48 
     | 
    
         
             
                        ruby: 3.2
         
     | 
| 
       55 
49 
     | 
    
         | 
| 
       56 
     | 
    
         
            -
                      - gemfile: rails_7_1
         
     | 
| 
       57 
     | 
    
         
            -
                        ruby: '3.0'
         
     | 
| 
       58 
     | 
    
         
            -
             
     | 
| 
       59 
     | 
    
         
            -
                      - gemfile: rails_7_1
         
     | 
| 
       60 
     | 
    
         
            -
                        ruby: 3.1
         
     | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
       62 
     | 
    
         
            -
                      - gemfile: rails_7_1
         
     | 
| 
       63 
     | 
    
         
            -
                        ruby: 3.2
         
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
50 
     | 
    
         
             
                      - gemfile: rails_7_1
         
     | 
| 
       66 
51 
     | 
    
         
             
                        ruby: 3.3
         
     | 
| 
       67 
52 
     | 
    
         | 
| 
         @@ -71,6 +56,9 @@ jobs: 
     | 
|
| 
       71 
56 
     | 
    
         
             
                      - gemfile: rails_8_0
         
     | 
| 
       72 
57 
     | 
    
         
             
                        ruby: 3.3
         
     | 
| 
       73 
58 
     | 
    
         | 
| 
      
 59 
     | 
    
         
            +
                      - gemfile: rails_8_1
         
     | 
| 
      
 60 
     | 
    
         
            +
                        ruby: 3.4
         
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
       74 
62 
     | 
    
         
             
                name: ${{ matrix.gemfile }}, ruby ${{ matrix.ruby }}
         
     | 
| 
       75 
63 
     | 
    
         | 
| 
       76 
64 
     | 
    
         
             
                steps:
         
     | 
    
        data/Appraisals
    CHANGED
    
    | 
         @@ -51,6 +51,13 @@ appraise "rails-8-0" do 
     | 
|
| 
       51 
51 
     | 
    
         
             
              gem "pg", "~> 1.0"
         
     | 
| 
       52 
52 
     | 
    
         
             
            end
         
     | 
| 
       53 
53 
     | 
    
         | 
| 
      
 54 
     | 
    
         
            +
            appraise "rails-8-1" do
         
     | 
| 
      
 55 
     | 
    
         
            +
              gem 'combustion', "~> 1.0"
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
              gem "rails", "~> 8.1.0"
         
     | 
| 
      
 58 
     | 
    
         
            +
              gem "pg", "~> 1.0"
         
     | 
| 
      
 59 
     | 
    
         
            +
            end
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
       54 
61 
     | 
    
         | 
| 
       55 
62 
     | 
    
         
             
            appraise "rails-edge" do
         
     | 
| 
       56 
63 
     | 
    
         
             
              # need combustion edge to work with rails edge, will no longer
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -5,7 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 
     | 
|
| 
       5 
5 
     | 
    
         
             
            and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
     | 
    
         
            -
            ## [Unreleased](https://github.com/jrochkind/attr_json/compare/v2. 
     | 
| 
      
 8 
     | 
    
         
            +
            ## [Unreleased](https://github.com/jrochkind/attr_json/compare/v2.6.0...HEAD)
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
            ### Fixed
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
         @@ -29,6 +29,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 
     | 
|
| 
       29 
29 
     | 
    
         | 
| 
       30 
30 
     | 
    
         
             
            *
         
     | 
| 
       31 
31 
     | 
    
         | 
| 
      
 32 
     | 
    
         
            +
            ## [2.6.0](https://github.com/jrochkind/attr_json/compare/v2.5.1...v2.6.0)
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
            * Allow Rails 8.1, no logic changes.
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
            ## [2.5.1](https://github.com/jrochkind/attr_json/compare/v2.5.0...v2.5.1)
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
            ## Fixed
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
            * Fixed bug where date/datetime types required db to exist on app boot. https://github.com/jrochkind/attr_json/pull/242 Thanks @jNicker
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
       32 
43 
     | 
    
         
             
            ## [2.5.0](https://github.com/jrochkind/attr_json/compare/v2.4.0...v2.5.0)
         
     | 
| 
       33 
44 
     | 
    
         | 
| 
       34 
45 
     | 
    
         
             
            ## Added
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -1,6 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # AttrJson
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            [](https://github.com/jrochkind/attr_json/actions/workflows/ci.yml)
         
     | 
| 
      
 4 
     | 
    
         
            +
            [](https://github.com/jrochkind/attr_json/actions/workflows/future_rails_ci.yml)
         
     | 
| 
       4 
5 
     | 
    
         
             
            [](https://badge.fury.io/rb/attr_json)
         
     | 
| 
       5 
6 
     | 
    
         | 
| 
       6 
7 
     | 
    
         
             
            ActiveRecord attributes stored serialized in a json column, super smooth. For Rails 6.0.x through 7.0.x. Ruby 2.7+.
         
     | 
    
        data/attr_json.gemspec
    CHANGED
    
    | 
         @@ -47,7 +47,7 @@ attributes use as much of the existing ActiveRecord architecture as we can.} 
     | 
|
| 
       47 
47 
     | 
    
         
             
              # dependency included just as it is here, should never be released
         
     | 
| 
       48 
48 
     | 
    
         
             
              # from an env tht has any of these variables set.
         
     | 
| 
       49 
49 
     | 
    
         
             
              unless ENV['APPRAISAL_INITIALIZED'] || ENV["TRAVIS"] || ENV['CI']
         
     | 
| 
       50 
     | 
    
         
            -
                spec.add_runtime_dependency "activerecord", ">= 6.0.0", "< 8. 
     | 
| 
      
 50 
     | 
    
         
            +
                spec.add_runtime_dependency "activerecord", ">= 6.0.0", "< 8.2"
         
     | 
| 
       51 
51 
     | 
    
         
             
              end
         
     | 
| 
       52 
52 
     | 
    
         | 
| 
       53 
53 
     | 
    
         
             
              spec.add_development_dependency "bundler"
         
     | 
| 
         @@ -0,0 +1,18 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # This file was generated by Appraisal
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            source "https://rubygems.org"
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            gem "combustion", "~> 1.0"
         
     | 
| 
      
 6 
     | 
    
         
            +
            gem "rails", "~> 8.1.0"
         
     | 
| 
      
 7 
     | 
    
         
            +
            gem "pg", "~> 1.0"
         
     | 
| 
      
 8 
     | 
    
         
            +
            gem "rspec-rails", "~> 6.0"
         
     | 
| 
      
 9 
     | 
    
         
            +
            gem "simple_form", ">= 4.0"
         
     | 
| 
      
 10 
     | 
    
         
            +
            gem "cocoon", ">= 1.2"
         
     | 
| 
      
 11 
     | 
    
         
            +
            gem "jquery-rails"
         
     | 
| 
      
 12 
     | 
    
         
            +
            gem "coffee-rails"
         
     | 
| 
      
 13 
     | 
    
         
            +
            gem "sprockets-rails"
         
     | 
| 
      
 14 
     | 
    
         
            +
            gem "capybara", "~> 3.0"
         
     | 
| 
      
 15 
     | 
    
         
            +
            gem "selenium-webdriver"
         
     | 
| 
      
 16 
     | 
    
         
            +
            gem "byebug"
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            gemspec path: "../"
         
     | 
| 
         @@ -130,9 +130,8 @@ 
     | 
|
| 
       130 
130 
     | 
    
         
             
                    # serializing, we're kind of stuck with this precision in current implementation.
         
     | 
| 
       131 
131 
     | 
    
         
             
                    lookup_kwargs = { adapter: nil }
         
     | 
| 
       132 
132 
     | 
    
         
             
                    if type == :datetime || type == :time
         
     | 
| 
       133 
     | 
    
         
            -
                      lookup_kwargs =  
     | 
| 
      
 133 
     | 
    
         
            +
                      lookup_kwargs[:precision] = ActiveSupport::JSON::Encoding.time_precision
         
     | 
| 
       134 
134 
     | 
    
         
             
                    end
         
     | 
| 
       135 
     | 
    
         
            -
             
     | 
| 
       136 
135 
     | 
    
         
             
                    type = ActiveRecord::Type.lookup(type, **lookup_kwargs)
         
     | 
| 
       137 
136 
     | 
    
         
             
                  elsif !(type.is_a?(ActiveModel::Type::Value) || type.is_a?(ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter))
         
     | 
| 
       138 
137 
     | 
    
         
             
                    raise ArgumentError, "Second argument (#{type}) must be a symbol or instance of an ActiveModel::Type::Value subclass"
         
     | 
    
        data/lib/attr_json/record.rb
    CHANGED
    
    
    
        data/lib/attr_json/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,13 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: attr_json
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 2. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.6.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Jonathan Rochkind
         
     | 
| 
       8 
     | 
    
         
            -
            autorequire:
         
     | 
| 
       9 
8 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
9 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 10 
     | 
    
         
            +
            date: 1980-01-02 00:00:00.000000000 Z
         
     | 
| 
       12 
11 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
12 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
13 
     | 
    
         
             
              name: activerecord
         
     | 
| 
         @@ -19,7 +18,7 @@ dependencies: 
     | 
|
| 
       19 
18 
     | 
    
         
             
                    version: 6.0.0
         
     | 
| 
       20 
19 
     | 
    
         
             
                - - "<"
         
     | 
| 
       21 
20 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       22 
     | 
    
         
            -
                    version: '8. 
     | 
| 
      
 21 
     | 
    
         
            +
                    version: '8.2'
         
     | 
| 
       23 
22 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       24 
23 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       25 
24 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -29,7 +28,7 @@ dependencies: 
     | 
|
| 
       29 
28 
     | 
    
         
             
                    version: 6.0.0
         
     | 
| 
       30 
29 
     | 
    
         
             
                - - "<"
         
     | 
| 
       31 
30 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       32 
     | 
    
         
            -
                    version: '8. 
     | 
| 
      
 31 
     | 
    
         
            +
                    version: '8.2'
         
     | 
| 
       33 
32 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       34 
33 
     | 
    
         
             
              name: bundler
         
     | 
| 
       35 
34 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -167,6 +166,7 @@ files: 
     | 
|
| 
       167 
166 
     | 
    
         
             
            - gemfiles/rails_7_1.gemfile
         
     | 
| 
       168 
167 
     | 
    
         
             
            - gemfiles/rails_7_2.gemfile
         
     | 
| 
       169 
168 
     | 
    
         
             
            - gemfiles/rails_8_0.gemfile
         
     | 
| 
      
 169 
     | 
    
         
            +
            - gemfiles/rails_8_1.gemfile
         
     | 
| 
       170 
170 
     | 
    
         
             
            - gemfiles/rails_edge.gemfile
         
     | 
| 
       171 
171 
     | 
    
         
             
            - lib/attr_json.rb
         
     | 
| 
       172 
172 
     | 
    
         
             
            - lib/attr_json/attribute_definition.rb
         
     | 
| 
         @@ -195,7 +195,6 @@ licenses: 
     | 
|
| 
       195 
195 
     | 
    
         
             
            metadata:
         
     | 
| 
       196 
196 
     | 
    
         
             
              homepage_uri: https://github.com/jrochkind/attr_json
         
     | 
| 
       197 
197 
     | 
    
         
             
              source_code_uri: https://github.com/jrochkind/attr_json
         
     | 
| 
       198 
     | 
    
         
            -
            post_install_message:
         
     | 
| 
       199 
198 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       200 
199 
     | 
    
         
             
            require_paths:
         
     | 
| 
       201 
200 
     | 
    
         
             
            - lib
         
     | 
| 
         @@ -210,8 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       210 
209 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       211 
210 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       212 
211 
     | 
    
         
             
            requirements: []
         
     | 
| 
       213 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
       214 
     | 
    
         
            -
            signing_key:
         
     | 
| 
      
 212 
     | 
    
         
            +
            rubygems_version: 3.7.1
         
     | 
| 
       215 
213 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       216 
214 
     | 
    
         
             
            summary: ActiveRecord attributes stored serialized in a json column, super smooth.
         
     | 
| 
       217 
215 
     | 
    
         
             
            test_files: []
         
     |