blumquist 0.7.0 → 0.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4879db47364122779e5e676bdf8856a3ab262e3
4
- data.tar.gz: 0e7e11fe567658c3faf6f3818ab61a18bc84f5f6
3
+ metadata.gz: 3b5e4d75cddd5c44519c9825fda2a66b098e091b
4
+ data.tar.gz: 8b4296bec61f4eb06eefc5bb308c1d8acb04799b
5
5
  SHA512:
6
- metadata.gz: f4ead88bf98e00094da661c9ae1ec0b4e042c8f382d32c6147d4e30184a49bd917ecc5b7c4735a2e23e446819c23f4eae50868db0ef1986e3a02a177ecd68871
7
- data.tar.gz: 20c8f94af73909b36aa723b67070b9ce340ecbb3c9aca8c43484d586b7d3211f942bb08095f81a80a1c8eaa8899162d5df3a1c863df0b7e4749c01efbe224f9b
6
+ metadata.gz: 82bc8da4c1734ee3510496646251fffaa144aa2e2308640b90d7e5e58e00b40471d74a2950a52dea006dbe44d537bc04736f5f8d419d60c15e1f655f08e6e554
7
+ data.tar.gz: 04058a903ca94f86ddfc88450a9afa1783dadfdc34fc38606be1f8c9c4affda9caf29039a3facf3a8f48408b18e3c4a84444461c3cfe5af501bc0f9d0ea11c81
@@ -1,3 +1,6 @@
1
+ # 0.8.0
2
+ - Make error messages look better with json pretty print
3
+
1
4
  # 0.7.0
2
5
  - Add object equality comparison
3
6
 
@@ -45,7 +45,7 @@ class Blumquist
45
45
  return unless @validate
46
46
  errors = JSON::Validator.fully_validate(@schema, @data)
47
47
  return true if errors.length == 0
48
- raise(Errors::ValidationError, [errors, @schema, @data])
48
+ raise(Errors::ValidationError, [errors.map { |e| e.split("\n") }, @data])
49
49
  end
50
50
 
51
51
  def validate_schema
@@ -2,7 +2,7 @@ class Blumquist
2
2
  module Errors
3
3
  class ValidationError < Blumquist::Error
4
4
  def initialize(errors)
5
- super(errors.to_json)
5
+ super(JSON.pretty_generate(JSON.parse(errors.to_json)))
6
6
  end
7
7
  end
8
8
  end
@@ -1,3 +1,3 @@
1
1
  class Blumquist
2
- VERSION = "0.7.0"
2
+ VERSION = "0.8.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blumquist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jannis Hermanns
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-14 00:00:00.000000000 Z
11
+ date: 2017-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
214
214
  version: '0'
215
215
  requirements: []
216
216
  rubyforge_project:
217
- rubygems_version: 2.5.1
217
+ rubygems_version: 2.6.12
218
218
  signing_key:
219
219
  specification_version: 4
220
220
  summary: Turn some data and a json schema into an immutable object with getters from