schema-model 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/lib/schema/model.rb +5 -1
- data/schema-model.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2fe6429e537c3f66ec6bafb9b5f99b3883e291a727e2fe5abfe23ecc5b35c60
|
4
|
+
data.tar.gz: 516b227ad2eba0f204291961c289ebe4bde6cbb4dc9d92b2e6469c20d45cadec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9dbc6f58dcf31d97b79b4c92e2adeaedf8c64be74cf799cc2b593c09929bfeb2837aa6463824bd08ebcccc5cfe6b10d42c47e1f3625174aa491df94fec045042
|
7
|
+
data.tar.gz: 9e9bdb438366ded5ab84498ee183ab98adaa02df0fb53f3e588a6b977acad5d0fb9b0f4a3d2a62a54eba3b135fec6769a1aa761b04f0609ee3b13d1c70830ffa
|
data/.travis.yml
CHANGED
data/lib/schema/model.rb
CHANGED
@@ -110,7 +110,11 @@ STR
|
|
110
110
|
self.class.schema.each_with_object({}) do |(field_name, field_options), memo|
|
111
111
|
unless field_options[:alias_of]
|
112
112
|
value = public_send(field_options[:getter])
|
113
|
-
|
113
|
+
next if value.nil? && !opts[:include_nils]
|
114
|
+
next if opts[:select_filter] && !opts[:select_filter].call(field_name, value, field_options)
|
115
|
+
next if opts[:reject_filter] && opts[:reject_filter].call(field_name, value, field_options)
|
116
|
+
|
117
|
+
memo[field_name] = value
|
114
118
|
end
|
115
119
|
end
|
116
120
|
end
|
data/schema-model.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schema-model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Doug Youch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inheritance-helper
|
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
|
-
rubygems_version: 3.0.
|
96
|
+
rubygems_version: 3.0.8
|
97
97
|
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: Schema Model
|