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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8fe2234ba4deb51ee1e9bb8310c8d20e0b399ac04555325881256236a3211eae
4
- data.tar.gz: dafc2e746909a6c5d83994e07391ac9e22164ff8f9af15c4ddc1eb3cd262bcb9
3
+ metadata.gz: b2fe6429e537c3f66ec6bafb9b5f99b3883e291a727e2fe5abfe23ecc5b35c60
4
+ data.tar.gz: 516b227ad2eba0f204291961c289ebe4bde6cbb4dc9d92b2e6469c20d45cadec
5
5
  SHA512:
6
- metadata.gz: ee6bca17f3ab5539f21de688c80f55e9e234e0d5e32e205c18ed6d9f75abc698997d92f84405cea0a361dc4bd9055cf32632765134bedbffc1f9f6b0cb87f90e
7
- data.tar.gz: 7093b4d1dca9386a15d51557edac2b9b713157737fe78b8c447c8af432b53103007b7f0c0cf68c8d92fbb2c75ca0c0f74a758052ae1ad65350305676e1b31c64
6
+ metadata.gz: 9dbc6f58dcf31d97b79b4c92e2adeaedf8c64be74cf799cc2b593c09929bfeb2837aa6463824bd08ebcccc5cfe6b10d42c47e1f3625174aa491df94fec045042
7
+ data.tar.gz: 9e9bdb438366ded5ab84498ee183ab98adaa02df0fb53f3e588a6b977acad5d0fb9b0f4a3d2a62a54eba3b135fec6769a1aa761b04f0609ee3b13d1c70830ffa
data/.travis.yml CHANGED
@@ -4,7 +4,6 @@ env:
4
4
  rvm:
5
5
  - 2.6.3
6
6
  - 2.1.9
7
- - 1.9.3
8
7
  gemfile: gemfiles/travis.gemfile
9
8
  language: ruby
10
9
  before_script:
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
- memo[field_name] = value if !value.nil? || opts[:include_nils]
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'schema-model'
5
- s.version = '0.6.0'
5
+ s.version = '0.6.1'
6
6
  s.licenses = ['MIT']
7
7
  s.summary = 'Schema Model'
8
8
  s.description = 'Easy way to create models from payloads'
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.0
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-02-11 00:00:00.000000000 Z
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.6
96
+ rubygems_version: 3.0.8
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: Schema Model