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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: af6b4603c9d55c009611245b88a4e62fcdeea5d9
4
- data.tar.gz: b8cb478938399c88bd1f04901a9e6331ffac1725
3
+ metadata.gz: fbd655c211eaa536ad6f96ab3eb3fdda3d9992ae
4
+ data.tar.gz: 41df47d60aee994fba69f86996fbb15434168d9e
5
5
  SHA512:
6
- metadata.gz: eec87fbdf37cf782b5a08dfaa5503cf1c5e967d307f4f21d2f6dc900011bb3952fe8958d1124c84e3b4e064d7f115189dbcb240e0d5642085cda17ce5de6c3a3
7
- data.tar.gz: a13432f64d9b36f68398270b26950309d275236e7637c5d3783514a70f4e70631b0bb5f1988ce6ca00f29885b7c503717bab22902dc82e23942c42fe85a5f21a
6
+ metadata.gz: a1ca45ac1f202b95d1ecb4da4ccf0285db1da6b4ea49a5f7449ac299d8d4bbd7a5b65a44fa5f4840e9c9552caf89d204c62916427c0d52a09b580aecfc9593a4
7
+ data.tar.gz: 971fa62d13ad32c656e60a7a988b3cac20c452feabc12b7021fda715046ad129b9d91704a2c669a5288673a93f3962044a65aff24001e2a2107172b548f29d69
data/CHANGELOG.md ADDED
@@ -0,0 +1,6 @@
1
+ # Change log
2
+
3
+ ### 2.0.2 - 2017-05-02
4
+
5
+ * bug fixes
6
+ * Validate html response
@@ -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(JSON::Validator.fully_validate(schema, body, :strict => strict))
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
@@ -1,3 +1,3 @@
1
1
  module Fitting
2
- VERSION = '2.0.1'.freeze
2
+ VERSION = '2.0.2'.freeze
3
3
  end
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.1
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-04-20 00:00:00.000000000 Z
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