api-regulator 0.1.13 → 0.1.14

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: dd01d986f35199767ed09aeca6b5a5b0b19441113fa10b2fa5b34a511a4773ab
4
- data.tar.gz: 02e722bd4b5df9a728a9ff1a339922cd891e9ae0eca9bf516b653bab3132c379
3
+ metadata.gz: 01bd1b3f0bc005db798835f26a3d5f4f210892efecae2ae4e7472905a2acce86
4
+ data.tar.gz: f5e49bb413b8f981863d1bd4f5df9abab840b92549a51910768517e9d7b278ab
5
5
  SHA512:
6
- metadata.gz: 42b77076b73dffc526ef004bc182c63cd3c45bbfaa8d5102796a92964c951da6351311bce75a89955f74cb851221b566c3188f5477ccb51355c09c588d70fc59
7
- data.tar.gz: 50888b26e95137d81dad5b8cb2777a065613f87fe537e2a1b456bcfe986b41a9e2fa45ce23c77688098421c4e5f8aebe31184f3065764e83dbf44d3c9e6caa4b
6
+ metadata.gz: 1f5780dca825a9b6935894eb9ce30c88cd1cb458adcad5e365460dc837b77c6f2bed10f2cd5fa3c8827edbf53b81df24d96a053ea74ac2321e7509de3336868d
7
+ data.tar.gz: 7283943527bce68a444cbc3739d2aaa80d5618bec6259798838e12670ee78c9addd3b8b93e11adb0b025cae81fc71075f57764a4a56e4294f780ec84dc73751d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- api-regulator (0.1.13)
4
+ api-regulator (0.1.14)
5
5
  activemodel (~> 8.0)
6
6
  activesupport (~> 8.0)
7
7
 
@@ -30,9 +30,9 @@ module ApiRegulator
30
30
  self.defined_attributes += [full_key]
31
31
 
32
32
  param.options.each do |option, value|
33
- validates full_key, option => value, if: ->(record) {
34
- param.required?(validation_context) || record.raw_attributes.key?(param.name)
35
- }
33
+ validates full_key,
34
+ option => value,
35
+ if: ->(record) { param.required?(validation_context) || record.raw_attributes.key?(param.name) }
36
36
  end
37
37
 
38
38
  # Add type-specific validations
@@ -151,11 +151,11 @@ module ApiRegulator
151
151
  return
152
152
  end
153
153
 
154
- inclusion_list = param.options[:inclusion]&.dig(:in)
154
+ inclusion_list = param.options.dig(:inclusion, :in)
155
155
 
156
156
  raw_value.each_with_index do |value, index|
157
157
  # Skip type and inclusion validation if nil is allowed and value is nil
158
- if value.nil? && (inclusion_list&.include?(nil) || param.options[:allow_nil_items])
158
+ if value.nil? && (inclusion_list&.include?(nil) || param.options.dig(:inclusion, :allow_nil))
159
159
  next
160
160
  end
161
161
 
@@ -1,3 +1,3 @@
1
1
  module ApiRegulator
2
- VERSION = "0.1.13"
2
+ VERSION = "0.1.14"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api-regulator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geoff Massanek
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-29 00:00:00.000000000 Z
11
+ date: 2025-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport