rasti-types 1.1.1 → 1.1.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.
- checksums.yaml +4 -4
- data/lib/rasti/types/model.rb +2 -2
- data/lib/rasti/types/version.rb +1 -1
- data/spec/model_spec.rb +7 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 668b604d95b67bb965b9860363c9708e7588ffdf4c2db16f82d7c4ec1c08e4bd
         | 
| 4 | 
            +
              data.tar.gz: 98f6a227331dae03e77d45813d40d34db1bef7e30c8724dd7a43c5f20369acd6
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 68255142316b26b850774f6bf07303f481a648d5ab81596685d4c15aee681bd1d5825867d0bc8c5168268f7eed9d431720f29393cd1e0d29fc0d278db8290f08
         | 
| 7 | 
            +
              data.tar.gz: 419d07e23e42296eac48d707d556cab894c7fccf4690caea1d79b77a7b27c99e2b897a90e80b34d55fea881578570e0200d3f156c106c57ca9303eeff618101e
         | 
    
        data/lib/rasti/types/model.rb
    CHANGED
    
    
    
        data/lib/rasti/types/version.rb
    CHANGED
    
    
    
        data/spec/model_spec.rb
    CHANGED
    
    | @@ -2,13 +2,19 @@ require 'minitest_helper' | |
| 2 2 |  | 
| 3 3 | 
             
            describe Rasti::Types::Model do
         | 
| 4 4 |  | 
| 5 | 
            -
              it ' | 
| 5 | 
            +
              it 'Hash' do
         | 
| 6 6 | 
             
                result = Rasti::Types::Model[Point].cast x: 1, y: 2
         | 
| 7 7 | 
             
                result.must_be_instance_of Point
         | 
| 8 8 | 
             
                result.x.must_equal 1
         | 
| 9 9 | 
             
                result.y.must_equal 2
         | 
| 10 10 | 
             
              end
         | 
| 11 11 |  | 
| 12 | 
            +
              it 'Model' do
         | 
| 13 | 
            +
                model = Point.new x: 3, y: 4
         | 
| 14 | 
            +
                result = Rasti::Types::Model[Point].cast model
         | 
| 15 | 
            +
                result.must_equal model
         | 
| 16 | 
            +
              end
         | 
| 17 | 
            +
             | 
| 12 18 | 
             
              it 'Hash -> CastError' do
         | 
| 13 19 | 
             
                error = proc { Rasti::Types::Model[Point].cast(z: 'text') }.must_raise Rasti::Types::CompoundError
         | 
| 14 20 | 
             
                error.message.must_equal "Errors:\n- x: [\"not present\"]\n- y: [\"not present\"]"
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: rasti-types
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.1. | 
| 4 | 
            +
              version: 1.1.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Gabriel Naiman
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2021- | 
| 11 | 
            +
            date: 2021-05-13 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: multi_require
         |