lite-validators 1.2.0 → 1.3.0

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: 2f14e123636fd7e64c95b1ec6cfff0d75a89b675433a966e5a50e8319df59d38
4
- data.tar.gz: 3c3527272a2396dd96daeb521d446cebd4679acbd2d57be410ef302d578f81e1
3
+ metadata.gz: fa69377873f2ee0d6ef14558b29db5fc92da777468505e75414b49d60a7b64b0
4
+ data.tar.gz: 455b5668ab8b970df14d560bdf2a3bf1ce2c816e05437007e043c75ea4623878
5
5
  SHA512:
6
- metadata.gz: b2251e88c3258c03ea8ffa22c9ce553f91e0ccb1d757a24c9351da415fd52c063eb23853133f84a97021cf0650f4e239b2af0ac1c87238a9567694f40564d71e
7
- data.tar.gz: '085d162120734d94783d859deb349d15c55ed42e878713334f5d98fe44543f22b40a37ae6edff6c2efce96d81394d50daa96734aca59c2c5e06952c566e60598'
6
+ metadata.gz: b8929cf7229fb4e634de7b436227c0b034ee63eecb03567466fa523f7456b714b478f7ad7393edd8c295df3d3eecde246e35214f9145c140ab01e1bdfe6fa900
7
+ data.tar.gz: 035152f46aa9d2d9125e9dbf3b305bfcf6a15977c2f1b049d785dc489ed9ea4c54e2e1baeaa85ea14fca12eeb187828c2810fd5366fb35bf9d413c5461f16a1f
data/.rubocop.yml CHANGED
@@ -1,8 +1,9 @@
1
1
  require:
2
2
  - rubocop-performance
3
+ - rubocop-rake
3
4
  - rubocop-rspec
4
5
  AllCops:
5
- TargetRubyVersion: 2.7
6
+ TargetRubyVersion: 3.0
6
7
  NewCops: enable
7
8
  DisplayCopNames: true
8
9
  DisplayStyleGuide: true
@@ -42,6 +43,8 @@ RSpec/LeakyConstantDeclaration:
42
43
  Enabled: false
43
44
  RSpec/MultipleExpectations:
44
45
  Enabled: false
46
+ Style/ArgumentsForwarding:
47
+ Enabled: false
45
48
  Style/Documentation:
46
49
  Enabled: false
47
50
  Style/ExpandPathArguments:
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.3.0] - 2021-07-19
10
+ ### Added
11
+ - Added Ruby 3.0 support
12
+
9
13
  ## [1.2.0] - 2021-07-13
10
14
  ### Updated
11
15
  - Update name validator to accept numeric values and remove double quotes
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-validators (1.2.0)
4
+ lite-validators (1.3.0)
5
5
  activemodel
6
6
 
7
7
  GEM
@@ -101,11 +101,13 @@ GEM
101
101
  rubocop-ast (>= 1.7.0, < 2.0)
102
102
  ruby-progressbar (~> 1.7)
103
103
  unicode-display_width (>= 1.4.0, < 3.0)
104
- rubocop-ast (1.7.0)
104
+ rubocop-ast (1.8.0)
105
105
  parser (>= 3.0.1.1)
106
106
  rubocop-performance (1.11.4)
107
107
  rubocop (>= 1.7.0, < 2.0)
108
108
  rubocop-ast (>= 0.4.0)
109
+ rubocop-rake (0.6.0)
110
+ rubocop (~> 1.0)
109
111
  rubocop-rspec (2.4.0)
110
112
  rubocop (~> 1.0)
111
113
  rubocop-ast (>= 1.1.0)
@@ -132,7 +134,8 @@ DEPENDENCIES
132
134
  rspec-rails
133
135
  rubocop
134
136
  rubocop-performance
137
+ rubocop-rake
135
138
  rubocop-rspec
136
139
 
137
140
  BUNDLED WITH
138
- 2.2.19
141
+ 2.2.24
@@ -2,6 +2,6 @@
2
2
 
3
3
  class Base64Validator < BaseValidator
4
4
 
5
- REGEXP = /^(?:[A-Za-z0-9+$]{4})*(?:[A-Za-z0-9+$]{2}==|[A-Za-z0-9+$]{3}=|[A-Za-z0-9+$]{4})$/.freeze
5
+ REGEXP = /^(?:[A-Za-z0-9+$]{4})*(?:[A-Za-z0-9+$]{2}==|[A-Za-z0-9+$]{3}=|[A-Za-z0-9+$]{4})$/
6
6
 
7
7
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  class CurrencyValidator < BaseValidator
4
4
 
5
- REGEXP = /^\d*+(\.\d{1,2})$/.freeze
5
+ REGEXP = /^\d*+(\.\d{1,2})$/
6
6
 
7
7
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  class CusipValidator < BaseValidator
4
4
 
5
- REGEXP = /^[0-9A-Z]{9}$/.freeze
5
+ REGEXP = /^[0-9A-Z]{9}$/
6
6
 
7
7
  private
8
8
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  class EinValidator < BaseValidator
4
4
 
5
- REGEXP = /^[1-9]\d?-\d{7}$/.freeze
5
+ REGEXP = /^[1-9]\d?-\d{7}$/
6
6
 
7
7
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  class EmailValidator < BaseValidator
4
4
 
5
- REGEXP = /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i.freeze
5
+ REGEXP = /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
6
6
 
7
7
  private
8
8
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  class HexValidator < BaseValidator
4
4
 
5
- REGEXP = /^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.freeze
5
+ REGEXP = /^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/
6
6
 
7
7
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  class ImeiValidator < BaseValidator
4
4
 
5
- REGEXP = /\A[\d.:\-\s]+\z/i.freeze
5
+ REGEXP = /\A[\d.:\-\s]+\z/i
6
6
 
7
7
  private
8
8
 
@@ -3,7 +3,7 @@
3
3
  class IsinValidator < BaseValidator
4
4
 
5
5
  # rubocop:disable Layout/LineLength
6
- REGEXP = /^((AF|AX|AL|DZ|AS|AD|AO|AI|AQ|AG|AR|AM|AW|AU|AT|AZ|BS|BH|BD|BB|BY|BE|BZ|BJ|BM|BT|BO|BQ|BA|BW|BV|BR|IO|BN|BG|BF|BI|KH|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|IL|IT|JM|JP|JE|JO|KZ|KE|KI|KP|KR|KW|KG|LA|LV|LB|LS|LR|LY|LI|LT|LU|MO|MK|MG|MW|MY|MV|ML|MT|MH|MQ|MR|MU|YT|MX|FM|MD|MC|MN|ME|MS|MA|MZ|MM|NA|NR|NP|NL|NC|NZ|NI|NE|NG|NU|NF|MP|NO|OM|PK|PW|PS|PA|PG|PY|PE|PH|PN|PL|PT|PR|QA|RE|RO|RU|RW|BL|SH|KN|LC|MF|PM|VC|WS|SM|ST|SA|SN|RS|SC|SL|SG|SX|SK|SI|SB|SO|ZA|GS|SS|ES|LK|SD|SR|SJ|SZ|SE|CH|SY|TW|TJ|TZ|TH|TL|TG|TK|TO|TT|TN|TR|TM|TC|TV|UG|UA|AE|GB|US|UM|UY|UZ|VU|VE|VN|VG|VI|WF|EH|YE|ZM|ZW{2})([A-Z0-9]{9}))(\d{1})$/
7
7
  # rubocop:enable Layout/LineLength
8
8
 
9
9
  private
@@ -2,6 +2,6 @@
2
2
 
3
3
  class NameValidator < BaseValidator
4
4
 
5
- REGEXP = /^([A-Za-z0-9'-]+\s+){1,4}[A-Za-z0-9'-]*\z/.freeze
5
+ REGEXP = /^([A-Za-z0-9'-]+\s+){1,4}[A-Za-z0-9'-]*\z/
6
6
 
7
7
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  class PhoneNumberValidator < BaseValidator
4
4
 
5
- REGEXP = %r{^[0-9+()#.\s/ext-]+$}.freeze
5
+ REGEXP = %r{^[0-9+()#.\s/ext-]+$}
6
6
 
7
7
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  class SedolValidator < BaseValidator
4
4
 
5
- REGEXP = /^([A-Z0-9]{6})(\d{1})$/.freeze
5
+ REGEXP = /^([A-Z0-9]{6})(\d{1})$/
6
6
  WEIGHTS = [
7
7
  1, 3, 1, 7, 3, 9, 1
8
8
  ].freeze
@@ -2,6 +2,6 @@
2
2
 
3
3
  class SlugValidator < BaseValidator
4
4
 
5
- REGEXP = /^[A-Za-z0-9_-]+$/i.freeze
5
+ REGEXP = /^[A-Za-z0-9_-]+$/i
6
6
 
7
7
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  class SsnValidator < BaseValidator
4
4
 
5
- REGEXP = /^\A(\d{3}-\d{2}-\d{4}|\d{9})\Z$/.freeze
5
+ REGEXP = /^\A(\d{3}-\d{2}-\d{4}|\d{9})\Z$/
6
6
 
7
7
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  class UsernameValidator < BaseValidator
4
4
 
5
- REGEXP = /^[A-Za-z0-9._-]{1,255}$/.freeze
5
+ REGEXP = /^[A-Za-z0-9._-]{1,255}$/
6
6
 
7
7
  end
@@ -3,7 +3,7 @@
3
3
  module Lite
4
4
  module Validators
5
5
 
6
- VERSION = '1.2.0'
6
+ VERSION = '1.3.0'
7
7
 
8
8
  end
9
9
  end
@@ -47,5 +47,6 @@ Gem::Specification.new do |spec|
47
47
  spec.add_development_dependency 'rspec-rails'
48
48
  spec.add_development_dependency 'rubocop'
49
49
  spec.add_development_dependency 'rubocop-performance'
50
+ spec.add_development_dependency 'rubocop-rake'
50
51
  spec.add_development_dependency 'rubocop-rspec'
51
52
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lite-validators
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-13 00:00:00.000000000 Z
11
+ date: 2021-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -136,6 +136,20 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rubocop-rake
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: rubocop-rspec
141
155
  requirement: !ruby/object:Gem::Requirement
@@ -260,7 +274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
260
274
  - !ruby/object:Gem::Version
261
275
  version: '0'
262
276
  requirements: []
263
- rubygems_version: 3.2.19
277
+ rubygems_version: 3.2.24
264
278
  signing_key:
265
279
  specification_version: 4
266
280
  summary: Collection of ActiveModel/ActiveRecord validators