fitting 2.0.1 → 2.0.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/CHANGELOG.md +6 -0
- data/lib/fitting/response/fully_validates.rb +9 -1
- data/lib/fitting/version.rb +1 -1
- metadata +3 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: fbd655c211eaa536ad6f96ab3eb3fdda3d9992ae
         | 
| 4 | 
            +
              data.tar.gz: 41df47d60aee994fba69f86996fbb15434168d9e
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: a1ca45ac1f202b95d1ecb4da4ccf0285db1da6b4ea49a5f7449ac299d8d4bbd7a5b65a44fa5f4840e9c9552caf89d204c62916427c0d52a09b580aecfc9593a4
         | 
| 7 | 
            +
              data.tar.gz: 971fa62d13ad32c656e60a7a988b3cac20c452feabc12b7021fda715046ad129b9d91704a2c669a5288673a93f3962044a65aff24001e2a2107172b548f29d69
         | 
    
        data/CHANGELOG.md
    ADDED
    
    
| @@ -6,7 +6,7 @@ module Fitting | |
| 6 6 | 
             
                  def self.craft(schemas, body, strict)
         | 
| 7 7 | 
             
                    if schemas
         | 
| 8 8 | 
             
                      new(schemas.inject([]) do |res, schema|
         | 
| 9 | 
            -
                        res.push( | 
| 9 | 
            +
                        res.push(fully_validate(schema, body, strict))
         | 
| 10 10 | 
             
                      end)
         | 
| 11 11 | 
             
                    else
         | 
| 12 12 | 
             
                      @valid = false
         | 
| @@ -21,6 +21,14 @@ module Fitting | |
| 21 21 | 
             
                  def to_s
         | 
| 22 22 | 
             
                    @to_s ||= join("\n\n")
         | 
| 23 23 | 
             
                  end
         | 
| 24 | 
            +
             | 
| 25 | 
            +
                  private
         | 
| 26 | 
            +
             | 
| 27 | 
            +
                  def self.fully_validate(schema, body, strict)
         | 
| 28 | 
            +
                    JSON::Validator.fully_validate(schema, body, :strict => strict)
         | 
| 29 | 
            +
                  rescue JSON::Schema::UriError
         | 
| 30 | 
            +
                    []
         | 
| 31 | 
            +
                  end
         | 
| 24 32 | 
             
                end
         | 
| 25 33 | 
             
              end
         | 
| 26 34 | 
             
            end
         | 
    
        data/lib/fitting/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: fitting
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2.0. | 
| 4 | 
            +
              version: 2.0.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - d.efimov
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2017- | 
| 11 | 
            +
            date: 2017-05-02 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: json-schema
         | 
| @@ -182,6 +182,7 @@ files: | |
| 182 182 | 
             
            - ".gitignore"
         | 
| 183 183 | 
             
            - ".rubocop.yml"
         | 
| 184 184 | 
             
            - ".travis.yml"
         | 
| 185 | 
            +
            - CHANGELOG.md
         | 
| 185 186 | 
             
            - CODE_OF_CONDUCT.md
         | 
| 186 187 | 
             
            - Gemfile
         | 
| 187 188 | 
             
            - LICENSE.txt
         |