surrealist 1.3.1 → 1.3.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
  SHA256:
3
- metadata.gz: 5067bf220ce8d757b29dc527c562e28410070dc101396d3029f3442940ebcebf
4
- data.tar.gz: '09513dc82a8d7538fb9a5e77c842a596a27c5f2ba201960b396607373dbc029a'
3
+ metadata.gz: 53786d7f717738e1ff5debaa04697803ff3f11fb373baf57b73efc84db6cd0fe
4
+ data.tar.gz: b9941f1a8ddcf583eb054a3fa88540769436a03b53c3e584a9cb642978f38241
5
5
  SHA512:
6
- metadata.gz: 6db73c57dae2758e58701201fa9835b6c5c177df66b94f6e81688ad5f5c8e06e914c14b8cb97336678d68353303ca5d3f5eb572a25b6d2c9ab6cd8310fb7a699
7
- data.tar.gz: 450fee40e105f4a88213ef30147a2e67d249455d82a6383183ab9dca4eb8252ac857f6eaec37ccfe72f5c525ce88c9fb272160855ca01d6a91883b9a0d8b9a42
6
+ metadata.gz: 9de2e0941be4041ebd79d479d269c869d451a503e312aee16c6618b1059c63b8c5f7478ddffe931322cbb27651c90c883c0d032be8928d6308b2afd20c342024
7
+ data.tar.gz: f6be30d1b9c050a722b6a7e435fd092494816caf108cc3f7cf5af8b43501f807e7c95a91815cb469c11a1ba254017a7e87af64120585f69068ce734d8f21cd8a
@@ -1,3 +1,9 @@
1
+ # 1.3.2
2
+
3
+ ## Fixed
4
+ * Preserve exception backtrace in case of Surrealist::UndefinedMethodError ([@akxcv][]) [#122](https://github.com/nesaulov/surrealist/pull/122)
5
+ * Fix nil values for Boolean type ([@nesaulov][]) [#127](https://github.com/nesaulov/surrealist/pull/127)
6
+
1
7
  # 1.3.1
2
8
 
3
9
  ## Fixed
data/README.md CHANGED
@@ -7,8 +7,7 @@
7
7
 
8
8
  ![Surrealist](surrealist-icon.png)
9
9
 
10
- A gem that provides DSL for serialization of plain old Ruby objects to JSON in a declarative style
11
- by defining a `json_schema`. It also provides a trivial type checking in the runtime before serialization.
10
+ Surrealist is a schema-driven object serialization ruby library. It also provides a trivial type checking in the runtime before serialization.
12
11
  [Yard documentation](http://www.rubydoc.info/github/nesaulov/surrealist/master)
13
12
 
14
13
 
@@ -4,7 +4,7 @@ module Surrealist
4
4
  # A data structure to carry arguments across methods.
5
5
  # @api private
6
6
  class Carrier
7
- BOOLEANS = [true, false].freeze
7
+ BOOLEANS = [true, false, nil].freeze
8
8
 
9
9
  attr_accessor :camelize, :include_root, :include_namespaces, :root, :namespaces_nesting_level
10
10
 
@@ -64,7 +64,7 @@ module Surrealist
64
64
  def check_booleans!
65
65
  booleans_hash.each do |key, value|
66
66
  unless BOOLEANS.include?(value)
67
- raise ArgumentError, "Expected `#{key}` to be either true or false, got #{value}"
67
+ raise ArgumentError, "Expected `#{key}` to be either true, false or nil, got #{value}"
68
68
  end
69
69
  end
70
70
  end
@@ -90,7 +90,8 @@ module Surrealist
90
90
  def raise_invalid_key!(err)
91
91
  raise Surrealist::UndefinedMethodError,
92
92
  "#{err.message}. You have probably defined a key " \
93
- "in the schema that doesn't have a corresponding method."
93
+ "in the schema that doesn't have a corresponding method.",
94
+ err.backtrace
94
95
  end
95
96
 
96
97
  # Raises ArgumentError if a tag has no corresponding serializer
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Surrealist
4
4
  # Defines the version of Surrealist
5
- VERSION = '1.3.1'.freeze
5
+ VERSION = '1.3.2'.freeze
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: surrealist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikita Esaulov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-30 00:00:00.000000000 Z
11
+ date: 2018-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj