umbrellio-utils 0.7.1 → 0.7.3

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: 774fdc0636e6db513c88f056cb7f623004b077918b690eda2db500c6caeb8ebe
4
- data.tar.gz: de6fe1fa3e03e0b019f06f3bf926808da16fdb620b6a91912fe1c2639790f44f
3
+ metadata.gz: 98131475f6f02d086ddd897b81950bfb2747a9f9791d11a02e10854595731095
4
+ data.tar.gz: 878a13eda629ee1f8b1a98295cbe62f28432d287157e5b4d8544a9e96f6104af
5
5
  SHA512:
6
- metadata.gz: 8add3f68aeb19b83897a9a944bd4e9e9f5b7ce666e213589b5d4d9069178b8c57a21c4f69bfeb4ba6bbc7cad2e83d421489a7f057c8b80e6ac2ec2dbe6e75873
7
- data.tar.gz: 2dc81457002a305346ae60c8028ed5c8eb80a5ee34d750bcdfe56c6f4366f61e894887ed29caf34f252da3c508e103574b3915ee55ac29e98efb272e7ac5c5a6
6
+ metadata.gz: '089e33e5ed1b28c0f3dd2436c67504a217c2f0a6eb408aba9e85317f19492867c43acb2bb3dfddeee9033e39c4a922d22e897256648fe17b81412ff74f6fa06f'
7
+ data.tar.gz: 7bc11b43a216779e44c2cd1b799932caed2a14538ca4c1d4706c9a1762b304660cbb1aa0523951e5cabef32ba11a3025e7996ef8fd9119d0a08a98d1fce7a224
data/Gemfile CHANGED
@@ -10,6 +10,7 @@ group :development, :test do
10
10
  gem "bundler"
11
11
  gem "bundler-audit"
12
12
  gem "ci-helper"
13
+ gem "http"
13
14
  gem "nokogiri"
14
15
  gem "nori"
15
16
  gem "pg"
data/Gemfile.lock CHANGED
@@ -1,80 +1,83 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- umbrellio-utils (0.7.1)
4
+ umbrellio-utils (0.7.3)
5
5
  memery (~> 1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actioncable (7.0.6)
11
- actionpack (= 7.0.6)
12
- activesupport (= 7.0.6)
10
+ actioncable (7.0.8)
11
+ actionpack (= 7.0.8)
12
+ activesupport (= 7.0.8)
13
13
  nio4r (~> 2.0)
14
14
  websocket-driver (>= 0.6.1)
15
- actionmailbox (7.0.6)
16
- actionpack (= 7.0.6)
17
- activejob (= 7.0.6)
18
- activerecord (= 7.0.6)
19
- activestorage (= 7.0.6)
20
- activesupport (= 7.0.6)
15
+ actionmailbox (7.0.8)
16
+ actionpack (= 7.0.8)
17
+ activejob (= 7.0.8)
18
+ activerecord (= 7.0.8)
19
+ activestorage (= 7.0.8)
20
+ activesupport (= 7.0.8)
21
21
  mail (>= 2.7.1)
22
22
  net-imap
23
23
  net-pop
24
24
  net-smtp
25
- actionmailer (7.0.6)
26
- actionpack (= 7.0.6)
27
- actionview (= 7.0.6)
28
- activejob (= 7.0.6)
29
- activesupport (= 7.0.6)
25
+ actionmailer (7.0.8)
26
+ actionpack (= 7.0.8)
27
+ actionview (= 7.0.8)
28
+ activejob (= 7.0.8)
29
+ activesupport (= 7.0.8)
30
30
  mail (~> 2.5, >= 2.5.4)
31
31
  net-imap
32
32
  net-pop
33
33
  net-smtp
34
34
  rails-dom-testing (~> 2.0)
35
- actionpack (7.0.6)
36
- actionview (= 7.0.6)
37
- activesupport (= 7.0.6)
35
+ actionpack (7.0.8)
36
+ actionview (= 7.0.8)
37
+ activesupport (= 7.0.8)
38
38
  rack (~> 2.0, >= 2.2.4)
39
39
  rack-test (>= 0.6.3)
40
40
  rails-dom-testing (~> 2.0)
41
41
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
42
- actiontext (7.0.6)
43
- actionpack (= 7.0.6)
44
- activerecord (= 7.0.6)
45
- activestorage (= 7.0.6)
46
- activesupport (= 7.0.6)
42
+ actiontext (7.0.8)
43
+ actionpack (= 7.0.8)
44
+ activerecord (= 7.0.8)
45
+ activestorage (= 7.0.8)
46
+ activesupport (= 7.0.8)
47
47
  globalid (>= 0.6.0)
48
48
  nokogiri (>= 1.8.5)
49
- actionview (7.0.6)
50
- activesupport (= 7.0.6)
49
+ actionview (7.0.8)
50
+ activesupport (= 7.0.8)
51
51
  builder (~> 3.1)
52
52
  erubi (~> 1.4)
53
53
  rails-dom-testing (~> 2.0)
54
54
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
55
- activejob (7.0.6)
56
- activesupport (= 7.0.6)
55
+ activejob (7.0.8)
56
+ activesupport (= 7.0.8)
57
57
  globalid (>= 0.3.6)
58
- activemodel (7.0.6)
59
- activesupport (= 7.0.6)
60
- activerecord (7.0.6)
61
- activemodel (= 7.0.6)
62
- activesupport (= 7.0.6)
63
- activestorage (7.0.6)
64
- actionpack (= 7.0.6)
65
- activejob (= 7.0.6)
66
- activerecord (= 7.0.6)
67
- activesupport (= 7.0.6)
58
+ activemodel (7.0.8)
59
+ activesupport (= 7.0.8)
60
+ activerecord (7.0.8)
61
+ activemodel (= 7.0.8)
62
+ activesupport (= 7.0.8)
63
+ activestorage (7.0.8)
64
+ actionpack (= 7.0.8)
65
+ activejob (= 7.0.8)
66
+ activerecord (= 7.0.8)
67
+ activesupport (= 7.0.8)
68
68
  marcel (~> 1.0)
69
69
  mini_mime (>= 1.1.0)
70
- activesupport (7.0.6)
70
+ activesupport (7.0.8)
71
71
  concurrent-ruby (~> 1.0, >= 1.0.2)
72
72
  i18n (>= 1.6, < 2)
73
73
  minitest (>= 5.1)
74
74
  tzinfo (~> 2.0)
75
+ addressable (2.8.5)
76
+ public_suffix (>= 2.0.2, < 6.0)
75
77
  amazing_print (1.5.0)
76
78
  amq-protocol (2.3.2)
77
79
  ast (2.4.2)
80
+ bigdecimal (3.1.4)
78
81
  builder (3.2.4)
79
82
  bundler-audit (0.9.1)
80
83
  bundler (>= 1.2.0, < 3)
@@ -93,15 +96,32 @@ GEM
93
96
  date (3.3.3)
94
97
  diff-lcs (1.5.0)
95
98
  docile (1.4.0)
99
+ domain_name (0.5.20190701)
100
+ unf (>= 0.0.5, < 1.0.0)
96
101
  dry-inflector (0.3.0)
97
102
  erubi (1.12.0)
98
- globalid (1.1.0)
99
- activesupport (>= 5.0)
103
+ ffi (1.15.5)
104
+ ffi-compiler (1.0.1)
105
+ ffi (>= 1.0.0)
106
+ rake
107
+ globalid (1.2.1)
108
+ activesupport (>= 6.1)
109
+ http (5.1.1)
110
+ addressable (~> 2.8)
111
+ http-cookie (~> 1.0)
112
+ http-form_data (~> 2.2)
113
+ llhttp-ffi (~> 0.4.0)
114
+ http-cookie (1.0.5)
115
+ domain_name (~> 0.5)
116
+ http-form_data (2.3.0)
100
117
  i18n (1.14.1)
101
118
  concurrent-ruby (~> 1.0)
102
119
  json (2.6.3)
103
120
  lamian (1.7.0)
104
121
  rails (>= 4.2)
122
+ llhttp-ffi (0.4.0)
123
+ ffi-compiler (~> 1.0)
124
+ rake (~> 13.0)
105
125
  loofah (2.21.3)
106
126
  crass (~> 1.0.2)
107
127
  nokogiri (>= 1.12.0)
@@ -114,10 +134,10 @@ GEM
114
134
  memery (1.5.0)
115
135
  ruby2_keywords (~> 0.0.2)
116
136
  method_source (1.0.0)
117
- mini_mime (1.1.2)
118
- mini_portile2 (2.8.2)
119
- minitest (5.18.1)
120
- net-imap (0.3.6)
137
+ mini_mime (1.1.5)
138
+ mini_portile2 (2.8.4)
139
+ minitest (5.20.0)
140
+ net-imap (0.3.7)
121
141
  date
122
142
  net-protocol
123
143
  net-pop (0.1.2)
@@ -127,24 +147,25 @@ GEM
127
147
  net-smtp (0.3.3)
128
148
  net-protocol
129
149
  nio4r (2.5.9)
130
- nokogiri (1.15.2)
150
+ nokogiri (1.15.4)
131
151
  mini_portile2 (~> 2.8.2)
132
152
  racc (~> 1.4)
133
- nokogiri (1.15.2-arm64-darwin)
153
+ nokogiri (1.15.4-arm64-darwin)
134
154
  racc (~> 1.4)
135
- nokogiri (1.15.2-x86_64-darwin)
155
+ nokogiri (1.15.4-x86_64-darwin)
136
156
  racc (~> 1.4)
137
- nokogiri (1.15.2-x86_64-linux)
157
+ nokogiri (1.15.4-x86_64-linux)
138
158
  racc (~> 1.4)
139
159
  nori (2.6.0)
140
160
  parallel (1.23.0)
141
161
  parser (3.2.2.3)
142
162
  ast (~> 2.4.1)
143
163
  racc
144
- pg (1.5.3)
164
+ pg (1.5.4)
145
165
  pry (0.14.2)
146
166
  coderay (~> 1.1)
147
167
  method_source (~> 1.0)
168
+ public_suffix (5.0.3)
148
169
  rabbit_messaging (0.13.0)
149
170
  bunny (~> 2.0)
150
171
  lamian
@@ -152,33 +173,33 @@ GEM
152
173
  sneakers (~> 2.0)
153
174
  tainbox
154
175
  racc (1.7.1)
155
- rack (2.2.7)
176
+ rack (2.2.8)
156
177
  rack-test (2.1.0)
157
178
  rack (>= 1.3)
158
- rails (7.0.6)
159
- actioncable (= 7.0.6)
160
- actionmailbox (= 7.0.6)
161
- actionmailer (= 7.0.6)
162
- actionpack (= 7.0.6)
163
- actiontext (= 7.0.6)
164
- actionview (= 7.0.6)
165
- activejob (= 7.0.6)
166
- activemodel (= 7.0.6)
167
- activerecord (= 7.0.6)
168
- activestorage (= 7.0.6)
169
- activesupport (= 7.0.6)
179
+ rails (7.0.8)
180
+ actioncable (= 7.0.8)
181
+ actionmailbox (= 7.0.8)
182
+ actionmailer (= 7.0.8)
183
+ actionpack (= 7.0.8)
184
+ actiontext (= 7.0.8)
185
+ actionview (= 7.0.8)
186
+ activejob (= 7.0.8)
187
+ activemodel (= 7.0.8)
188
+ activerecord (= 7.0.8)
189
+ activestorage (= 7.0.8)
190
+ activesupport (= 7.0.8)
170
191
  bundler (>= 1.15.0)
171
- railties (= 7.0.6)
172
- rails-dom-testing (2.1.1)
192
+ railties (= 7.0.8)
193
+ rails-dom-testing (2.2.0)
173
194
  activesupport (>= 5.0.0)
174
195
  minitest
175
196
  nokogiri (>= 1.6)
176
197
  rails-html-sanitizer (1.6.0)
177
198
  loofah (~> 2.21)
178
199
  nokogiri (~> 1.14)
179
- railties (7.0.6)
180
- actionpack (= 7.0.6)
181
- activesupport (= 7.0.6)
200
+ railties (7.0.8)
201
+ actionpack (= 7.0.8)
202
+ activesupport (= 7.0.8)
182
203
  method_source
183
204
  rake (>= 12.2)
184
205
  thor (~> 1.0)
@@ -187,7 +208,7 @@ GEM
187
208
  rake (13.0.6)
188
209
  rbtree (0.4.6)
189
210
  regexp_parser (2.8.1)
190
- rexml (3.2.5)
211
+ rexml (3.2.6)
191
212
  rspec (3.12.0)
192
213
  rspec-core (~> 3.12.0)
193
214
  rspec-expectations (~> 3.12.0)
@@ -200,7 +221,7 @@ GEM
200
221
  rspec-json_matcher (0.2.0)
201
222
  amazing_print
202
223
  json
203
- rspec-mocks (3.12.5)
224
+ rspec-mocks (3.12.6)
204
225
  diff-lcs (>= 1.2.0, < 2.0)
205
226
  rspec-support (~> 3.12.0)
206
227
  rspec-support (3.12.1)
@@ -242,9 +263,10 @@ GEM
242
263
  ruby-progressbar (1.13.0)
243
264
  ruby2_keywords (0.0.5)
244
265
  self_data (1.3.0)
245
- semantic_logger (4.13.0)
266
+ semantic_logger (4.14.0)
246
267
  concurrent-ruby (~> 1.0)
247
- sequel (5.70.0)
268
+ sequel (5.72.0)
269
+ bigdecimal
248
270
  sequel-batches (2.0.2)
249
271
  sequel
250
272
  serverengine (2.0.7)
@@ -268,27 +290,30 @@ GEM
268
290
  rbtree
269
291
  set (~> 1.0)
270
292
  symbiont-ruby (0.7.0)
271
- table_sync (6.1.0)
293
+ table_sync (6.4.1)
272
294
  memery
273
- rabbit_messaging
295
+ rabbit_messaging (~> 0.13)
274
296
  rails
275
297
  self_data
276
298
  tainbox (2.1.2)
277
299
  activesupport
278
300
  thor (1.2.2)
279
- timecop (0.9.6)
301
+ timecop (0.9.8)
280
302
  timeout (0.4.0)
281
303
  tzinfo (2.0.6)
282
304
  concurrent-ruby (~> 1.0)
283
- umbrellio-sequel-plugins (0.11.0.143)
305
+ umbrellio-sequel-plugins (0.14.0.187)
284
306
  sequel
285
307
  symbiont-ruby
308
+ unf (0.1.4)
309
+ unf_ext
310
+ unf_ext (0.0.8.2)
286
311
  unicode-display_width (2.4.2)
287
- websocket-driver (0.7.5)
312
+ websocket-driver (0.7.6)
288
313
  websocket-extensions (>= 0.1.0)
289
314
  websocket-extensions (0.1.5)
290
315
  yard (0.9.34)
291
- zeitwerk (2.6.8)
316
+ zeitwerk (2.6.11)
292
317
 
293
318
  PLATFORMS
294
319
  arm64-darwin-20
@@ -302,6 +327,7 @@ DEPENDENCIES
302
327
  bundler
303
328
  bundler-audit
304
329
  ci-helper
330
+ http
305
331
  nokogiri
306
332
  nori
307
333
  pg
@@ -5,6 +5,7 @@ module UmbrellioUtils
5
5
  extend self
6
6
 
7
7
  EMAIL_REGEXP = /\A([\w+-].?)+@[a-z\d-]+(\.[a-z]+)*\.[a-z]+\z/i.freeze
8
+ HOLDER_NAME_REGEXP = /\A([A-Za-z0-9.'-]+ ?)+\z/.freeze
8
9
 
9
10
  def secure_compare(src, dest)
10
11
  ActiveSupport::SecurityUtils.secure_compare(
@@ -33,13 +34,7 @@ module UmbrellioUtils
33
34
  end
34
35
 
35
36
  def valid_card_holder?(holder)
36
- words = holder.to_s.split
37
- return if words.count != 2
38
- return if words.any? { |x| x.match?(/(.+)(\1)(\1)/) }
39
- return unless words.all? { |x| x.size >= 2 }
40
- return unless words.all? { |x| x.match?(/\A[A-Z]+\z/) }
41
-
42
- true
37
+ holder.to_s =~ HOLDER_NAME_REGEXP
43
38
  end
44
39
 
45
40
  def valid_card_cvv?(cvv)
@@ -54,7 +54,7 @@ module UmbrellioUtils
54
54
 
55
55
  def parse_params
56
56
  case request.media_type
57
- when "application/json"
57
+ when "application/json", /\+json\z/
58
58
  Parsing.safely_parse_json(body)
59
59
  when "application/xml"
60
60
  Parsing.parse_xml(body)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UmbrellioUtils
4
- VERSION = "0.7.1"
4
+ VERSION = "0.7.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: umbrellio-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - JustAnotherDude
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-05 00:00:00.000000000 Z
11
+ date: 2023-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: memery
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  requirements: []
89
- rubygems_version: 3.4.13
89
+ rubygems_version: 3.4.19
90
90
  signing_key:
91
91
  specification_version: 4
92
92
  summary: A set of utilities that speed up development