parametric 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/parametric/field_dsl.rb +1 -1
- data/lib/parametric/version.rb +1 -1
- data/spec/schema_spec.rb +11 -0
- 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: 723fbc2c52d12ad990405295ef4a0a857d0d6638
|
4
|
+
data.tar.gz: 685e8e6b97ffebbf51e413e1780fcfd69bb626a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5f63c830feb5c708b64be0d2de108949cd2b07a3157686f64b6535c77ca79fa157a24293a1983a17a69ce0c30cd24df6b482aad9a4d295e254ac2400771de00
|
7
|
+
data.tar.gz: 3eb0a6f083e87303716931e6e55247e044b7d969af09322638758029adef56c6c1ecf66c79f148ae7b14b3879a590835af1f5af83e6e8475517b9b76205ca7eb
|
data/lib/parametric/field_dsl.rb
CHANGED
data/lib/parametric/version.rb
CHANGED
data/spec/schema_spec.rb
CHANGED
@@ -96,6 +96,17 @@ describe Parametric::Schema do
|
|
96
96
|
end
|
97
97
|
end
|
98
98
|
|
99
|
+
it "ignores nil fields if using :declared policy" do
|
100
|
+
schema = described_class.new do
|
101
|
+
field(:id).type(:integer)
|
102
|
+
field(:title).declared.type(:string)
|
103
|
+
end
|
104
|
+
|
105
|
+
resolve(schema, {id: 123}) do |results|
|
106
|
+
expect(results.output.keys).to eq [:id]
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
99
110
|
describe "#policy" do
|
100
111
|
it "applies policy to all fields" do
|
101
112
|
subject.policy(:declared)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parametric
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ismael Celis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|