api-regulator 0.1.0 → 0.1.1

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: 8474dc3c3898732b6e48a0b2c1722ecc13735e95474b01d9c4223be2cc461653
4
- data.tar.gz: 541a39193368ff06b3932f869e75d27a50375ae5c2acd772e0276aa2c892bc8a
3
+ metadata.gz: 88bc51a665a125169fea48c149623cfc72df75a4996685ea847ef84c83819aec
4
+ data.tar.gz: 1d61290605b37dd3c5a2b3b48d52490bbe5d1b993713f6d4386cfb7aedda3f21
5
5
  SHA512:
6
- metadata.gz: 67f74a784f20dc965e53a838c6ea8d068242cf77fd7aa7508c6e7e427efd4fef9f29a8242ab737f375b7accc84192551acc40036cfeb9778c1899731510cc102
7
- data.tar.gz: 732b45b1592042bc7259f82d84b396583a74acb92daac22636d1edddc9f2b41771eea4226459b6709ac109b8ed430a6838ef76a592d2c2742d6ae5dcae3e2b36
6
+ metadata.gz: 7a3b2f318a78aa7c171faf82b7b24e1ede15a7a7d2a447f308f56b8aafe7c32da3ae611ed0303ac79013cef7355c82988c02dc5ed24cd9928bd9bb17fcef9c84
7
+ data.tar.gz: 82f9714a67fb41d91b65086e2fadd379cf04ea1516e93d853730a4c4be7bc663730cf8bdece2338c9931c3eb66fa8944cc2d436479f1d26cdfaa81645309ca87
@@ -0,0 +1,35 @@
1
+ name: Run Specs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+
11
+ jobs:
12
+ test:
13
+ name: Run Tests
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ # Checkout the code
18
+ - name: Checkout code
19
+ uses: actions/checkout@v3
20
+
21
+ # Set up Ruby
22
+ - name: Set up Ruby
23
+ uses: ruby/setup-ruby@v1
24
+ with:
25
+ ruby-version: '3.2' # Specify your gem's Ruby version
26
+ bundler-cache: true # Cache gems to speed up the workflow
27
+
28
+ # Install dependencies
29
+ - name: Install dependencies
30
+ run: bundle install
31
+
32
+ # Run RSpec tests
33
+ - name: Run specs
34
+ run: bundle exec rspec
35
+
data/Gemfile.lock CHANGED
@@ -8,29 +8,29 @@ PATH
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actioncable (7.2.2)
12
- actionpack (= 7.2.2)
13
- activesupport (= 7.2.2)
11
+ actioncable (7.2.2.1)
12
+ actionpack (= 7.2.2.1)
13
+ activesupport (= 7.2.2.1)
14
14
  nio4r (~> 2.0)
15
15
  websocket-driver (>= 0.6.1)
16
16
  zeitwerk (~> 2.6)
17
- actionmailbox (7.2.2)
18
- actionpack (= 7.2.2)
19
- activejob (= 7.2.2)
20
- activerecord (= 7.2.2)
21
- activestorage (= 7.2.2)
22
- activesupport (= 7.2.2)
17
+ actionmailbox (7.2.2.1)
18
+ actionpack (= 7.2.2.1)
19
+ activejob (= 7.2.2.1)
20
+ activerecord (= 7.2.2.1)
21
+ activestorage (= 7.2.2.1)
22
+ activesupport (= 7.2.2.1)
23
23
  mail (>= 2.8.0)
24
- actionmailer (7.2.2)
25
- actionpack (= 7.2.2)
26
- actionview (= 7.2.2)
27
- activejob (= 7.2.2)
28
- activesupport (= 7.2.2)
24
+ actionmailer (7.2.2.1)
25
+ actionpack (= 7.2.2.1)
26
+ actionview (= 7.2.2.1)
27
+ activejob (= 7.2.2.1)
28
+ activesupport (= 7.2.2.1)
29
29
  mail (>= 2.8.0)
30
30
  rails-dom-testing (~> 2.2)
31
- actionpack (7.2.2)
32
- actionview (= 7.2.2)
33
- activesupport (= 7.2.2)
31
+ actionpack (7.2.2.1)
32
+ actionview (= 7.2.2.1)
33
+ activesupport (= 7.2.2.1)
34
34
  nokogiri (>= 1.8.5)
35
35
  racc
36
36
  rack (>= 2.2.4, < 3.2)
@@ -39,35 +39,35 @@ GEM
39
39
  rails-dom-testing (~> 2.2)
40
40
  rails-html-sanitizer (~> 1.6)
41
41
  useragent (~> 0.16)
42
- actiontext (7.2.2)
43
- actionpack (= 7.2.2)
44
- activerecord (= 7.2.2)
45
- activestorage (= 7.2.2)
46
- activesupport (= 7.2.2)
42
+ actiontext (7.2.2.1)
43
+ actionpack (= 7.2.2.1)
44
+ activerecord (= 7.2.2.1)
45
+ activestorage (= 7.2.2.1)
46
+ activesupport (= 7.2.2.1)
47
47
  globalid (>= 0.6.0)
48
48
  nokogiri (>= 1.8.5)
49
- actionview (7.2.2)
50
- activesupport (= 7.2.2)
49
+ actionview (7.2.2.1)
50
+ activesupport (= 7.2.2.1)
51
51
  builder (~> 3.1)
52
52
  erubi (~> 1.11)
53
53
  rails-dom-testing (~> 2.2)
54
54
  rails-html-sanitizer (~> 1.6)
55
- activejob (7.2.2)
56
- activesupport (= 7.2.2)
55
+ activejob (7.2.2.1)
56
+ activesupport (= 7.2.2.1)
57
57
  globalid (>= 0.3.6)
58
- activemodel (7.2.2)
59
- activesupport (= 7.2.2)
60
- activerecord (7.2.2)
61
- activemodel (= 7.2.2)
62
- activesupport (= 7.2.2)
58
+ activemodel (7.2.2.1)
59
+ activesupport (= 7.2.2.1)
60
+ activerecord (7.2.2.1)
61
+ activemodel (= 7.2.2.1)
62
+ activesupport (= 7.2.2.1)
63
63
  timeout (>= 0.4.0)
64
- activestorage (7.2.2)
65
- actionpack (= 7.2.2)
66
- activejob (= 7.2.2)
67
- activerecord (= 7.2.2)
68
- activesupport (= 7.2.2)
64
+ activestorage (7.2.2.1)
65
+ actionpack (= 7.2.2.1)
66
+ activejob (= 7.2.2.1)
67
+ activerecord (= 7.2.2.1)
68
+ activesupport (= 7.2.2.1)
69
69
  marcel (~> 1.0)
70
- activesupport (7.2.2)
70
+ activesupport (7.2.2.1)
71
71
  base64
72
72
  benchmark (>= 0.3)
73
73
  bigdecimal
@@ -99,7 +99,7 @@ GEM
99
99
  irb (1.14.1)
100
100
  rdoc (>= 4.0.0)
101
101
  reline (>= 0.4.2)
102
- logger (1.6.1)
102
+ logger (1.6.3)
103
103
  loofah (2.23.1)
104
104
  crass (~> 1.0.2)
105
105
  nokogiri (>= 1.12.0)
@@ -111,7 +111,7 @@ GEM
111
111
  marcel (1.0.4)
112
112
  mini_mime (1.1.5)
113
113
  mini_portile2 (2.8.8)
114
- minitest (5.25.2)
114
+ minitest (5.25.4)
115
115
  net-imap (0.5.1)
116
116
  date
117
117
  net-protocol
@@ -122,10 +122,10 @@ GEM
122
122
  net-smtp (0.5.0)
123
123
  net-protocol
124
124
  nio4r (2.7.4)
125
- nokogiri (1.16.8)
125
+ nokogiri (1.17.2)
126
126
  mini_portile2 (~> 2.8.2)
127
127
  racc (~> 1.4)
128
- nokogiri (1.16.8-arm64-darwin)
128
+ nokogiri (1.17.2-arm64-darwin)
129
129
  racc (~> 1.4)
130
130
  psych (5.2.0)
131
131
  stringio
@@ -137,30 +137,30 @@ GEM
137
137
  rack (>= 1.3)
138
138
  rackup (2.2.1)
139
139
  rack (>= 3)
140
- rails (7.2.2)
141
- actioncable (= 7.2.2)
142
- actionmailbox (= 7.2.2)
143
- actionmailer (= 7.2.2)
144
- actionpack (= 7.2.2)
145
- actiontext (= 7.2.2)
146
- actionview (= 7.2.2)
147
- activejob (= 7.2.2)
148
- activemodel (= 7.2.2)
149
- activerecord (= 7.2.2)
150
- activestorage (= 7.2.2)
151
- activesupport (= 7.2.2)
140
+ rails (7.2.2.1)
141
+ actioncable (= 7.2.2.1)
142
+ actionmailbox (= 7.2.2.1)
143
+ actionmailer (= 7.2.2.1)
144
+ actionpack (= 7.2.2.1)
145
+ actiontext (= 7.2.2.1)
146
+ actionview (= 7.2.2.1)
147
+ activejob (= 7.2.2.1)
148
+ activemodel (= 7.2.2.1)
149
+ activerecord (= 7.2.2.1)
150
+ activestorage (= 7.2.2.1)
151
+ activesupport (= 7.2.2.1)
152
152
  bundler (>= 1.15.0)
153
- railties (= 7.2.2)
153
+ railties (= 7.2.2.1)
154
154
  rails-dom-testing (2.2.0)
155
155
  activesupport (>= 5.0.0)
156
156
  minitest
157
157
  nokogiri (>= 1.6)
158
- rails-html-sanitizer (1.6.1)
158
+ rails-html-sanitizer (1.6.2)
159
159
  loofah (~> 2.21)
160
160
  nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
161
- railties (7.2.2)
162
- actionpack (= 7.2.2)
163
- activesupport (= 7.2.2)
161
+ railties (7.2.2.1)
162
+ actionpack (= 7.2.2.1)
163
+ activesupport (= 7.2.2.1)
164
164
  irb (~> 1.13)
165
165
  rackup (>= 1.0.0)
166
166
  rake (>= 12.2)
@@ -192,13 +192,13 @@ GEM
192
192
  rspec-mocks (~> 3.10)
193
193
  rspec-support (~> 3.10)
194
194
  rspec-support (3.13.1)
195
- securerandom (0.3.2)
195
+ securerandom (0.4.0)
196
196
  stringio (3.1.2)
197
197
  thor (1.3.2)
198
198
  timeout (0.4.2)
199
199
  tzinfo (2.0.6)
200
200
  concurrent-ruby (~> 1.0)
201
- useragent (0.16.10)
201
+ useragent (0.16.11)
202
202
  websocket-driver (0.7.6)
203
203
  websocket-extensions (>= 0.1.0)
204
204
  websocket-extensions (0.1.5)
@@ -110,7 +110,7 @@ module ApiRegulator
110
110
  end
111
111
 
112
112
  raw_value.each_with_index do |value, index|
113
- unless value.is_a?(Hash)
113
+ unless value.is_a?(Hash) || raw_value.is_a?(ActionController::Parameters)
114
114
  errors.add("#{attribute}[#{index}]", "must be a hash")
115
115
  next
116
116
  end
@@ -164,7 +164,8 @@ module ApiRegulator
164
164
  errors.add(attribute, "can't be blank") if param.options[:presence]
165
165
  return
166
166
  end
167
- unless raw_value.is_a?(Hash)
167
+
168
+ unless raw_value.is_a?(Hash) || raw_value.is_a?(ActionController::Parameters)
168
169
  errors.add(attribute, "must be a hash")
169
170
  return
170
171
  end
@@ -1,3 +1,3 @@
1
1
  module ApiRegulator
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
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.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geoff Massanek
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-06 00:00:00.000000000 Z
11
+ date: 2024-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -130,6 +130,7 @@ executables: []
130
130
  extensions: []
131
131
  extra_rdoc_files: []
132
132
  files:
133
+ - ".github/workflows/spec.yml"
133
134
  - ".gitignore"
134
135
  - ".rspec"
135
136
  - ".ruby-version"