umbrellio-utils 1.5.0 → 1.5.2

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: 16502aeac71a5a8860b3dcd6ea3acbf3714ee86c243b2cfa78ca3356805211dd
4
- data.tar.gz: 8c9744334c49cf933d1dd2f7b60b5d22cd00468450bbc90971e083479ed9e7db
3
+ metadata.gz: 8df77131c011a6b48b5cd6e81bd86a5a806034dbf8dfde59cac4bcb52a7c15e7
4
+ data.tar.gz: 7f97769c05db4332bebca56efbb0ae5b34ec34a6661ba0920b6643a706dfa44b
5
5
  SHA512:
6
- metadata.gz: 80a4cf07687c9b3c8aa4680533e14977ea7730834ba78393fef5121db2636c971072795145aa42305e41b181a29d48379e9fcb486abd1dd5539e6164441ca0a1
7
- data.tar.gz: d52ecd94d480776572e2d70be1963b536d6032b2b7c8a9c9547884911825262f405bf6f9d40bc7c1e6577ce7fddd3ef4602395730de370d77b06b5a9174823bb
6
+ metadata.gz: c41253ac5670ae0196c0c0e28dd846be23a955e71cef9c8ee9f9e757b673b114bcb2c4f1090b869be85d6e801c99d6576afeb81c04982c37735c1b4f5e187c6a
7
+ data.tar.gz: 5e73d3802b9ca525914b8db176974c2ac81c09a778493b57d0cf7e3716fa42c981cd16ad2bf4e5ceca6d7834a9414a9bd6d38999f6caea05451aff41b4d51f0d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- umbrellio-utils (1.5.0)
4
+ umbrellio-utils (1.5.2)
5
5
  memery (~> 1)
6
6
 
7
7
  GEM
@@ -1,10 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "uri/mailto"
4
+
3
5
  module UmbrellioUtils
4
6
  module Checks
5
7
  extend self
6
8
 
7
- EMAIL_REGEXP = /\A([\w+-].?)+@[a-z\d-]+(\.[a-z]+)*\.[a-z]+\z/i
8
9
  HOLDER_NAME_REGEXP = /\A([A-Za-z0-9.'-]+ ?)+\z/
9
10
 
10
11
  def secure_compare(src, dest)
@@ -30,11 +31,11 @@ module UmbrellioUtils
30
31
  end
31
32
 
32
33
  def valid_email?(email)
33
- email.to_s =~ EMAIL_REGEXP
34
+ email.to_s.match?(URI::MailTo::EMAIL_REGEXP)
34
35
  end
35
36
 
36
37
  def valid_card_holder?(holder)
37
- holder.to_s =~ HOLDER_NAME_REGEXP
38
+ holder.to_s.match?(HOLDER_NAME_REGEXP)
38
39
  end
39
40
 
40
41
  def valid_card_cvv?(cvv)
@@ -67,7 +67,8 @@ module UmbrellioUtils::Jobs
67
67
  weight_coef = capsule.weight / total_weight.to_f
68
68
  concurrency = (max_concurrency * weight_coef).to_i
69
69
  concurrency = 1 unless concurrency > 1
70
- queues = self.queues.select { |x| x.capsule == capsule.name }.map { |x| [x.name, x.weight] }
70
+ queues =
71
+ self.queues.select { |x| x.capsule == capsule.name }.map { |x| [x.name.to_s, x.weight] }
71
72
  Entry.new(capsule.name, queues, concurrency)
72
73
  end
73
74
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UmbrellioUtils
4
- VERSION = "1.5.0"
4
+ VERSION = "1.5.2"
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: 1.5.0
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Team Umbrellio
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-09-06 00:00:00.000000000 Z
11
+ date: 2024-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: memery
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  requirements: []
90
- rubygems_version: 3.5.18
90
+ rubygems_version: 3.5.22
91
91
  signing_key:
92
92
  specification_version: 4
93
93
  summary: A set of utilities that speed up development