paradocs 1.1.5 → 1.1.6
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/paradocs/field.rb +5 -1
- data/lib/paradocs/version.rb +1 -1
- data/spec/custom_block_validator_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fcffa38b327e138205c221b0161f777bb59674f9
|
|
4
|
+
data.tar.gz: ce6d34f0dbcbba84201e0c37b12eea7b9804c353
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5d18214752279c15cf66860f9f7e1b5cd3e57eb75b0160458713dca4b11c6b72712c33719e327de0443d7d40a2d481a5c6221fcdabaaf2db7098d648c178551f
|
|
7
|
+
data.tar.gz: 174ccfe6062589625e67642005134216cf03a821ac95af07ccdd4336a083023d98bbf61afd88907c3bf7a6b954dc8ef52d80b45467c2126935b4bbd1578b8aaf
|
data/lib/paradocs/field.rb
CHANGED
|
@@ -132,7 +132,11 @@ module Paradocs
|
|
|
132
132
|
context.add_error e.message
|
|
133
133
|
rescue StandardError => e
|
|
134
134
|
raise e if policy.is_a? Paradocs::Schema # from the inner level, just reraise
|
|
135
|
-
|
|
135
|
+
if Paradocs.config.explicit_errors
|
|
136
|
+
error = ConfigurationError.new("<#{e.class}:#{e.message}> should be registered in the policy")
|
|
137
|
+
error.set_backtrace(e.backtrace)
|
|
138
|
+
raise error
|
|
139
|
+
end
|
|
136
140
|
context.add_error policy.message unless Paradocs.config.explicit_errors
|
|
137
141
|
[value, false]
|
|
138
142
|
end
|
data/lib/paradocs/version.rb
CHANGED
|
@@ -81,7 +81,7 @@ describe 'custom block validator' do
|
|
|
81
81
|
|
|
82
82
|
it "catches unregistered error and raises Configuration error" do
|
|
83
83
|
expect { schema.resolve(age: 101).errors }.to raise_error(Paradocs::ConfigurationError)
|
|
84
|
-
.with_message("ZeroDivisionError should be registered in the policy")
|
|
84
|
+
.with_message("<ZeroDivisionError:divided by 0> should be registered in the policy")
|
|
85
85
|
end
|
|
86
86
|
end
|
|
87
87
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: paradocs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Maxim Tkachenko
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2020-
|
|
12
|
+
date: 2020-12-30 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|