lite-validators 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +7 -0
  2. data/.fasterer.yml +19 -0
  3. data/.gitignore +11 -0
  4. data/.rspec +4 -0
  5. data/.rubocop.yml +31 -0
  6. data/.travis.yml +24 -0
  7. data/CHANGELOG.md +11 -0
  8. data/CODE_OF_CONDUCT.md +74 -0
  9. data/Gemfile +6 -0
  10. data/Gemfile.lock +128 -0
  11. data/LICENSE.txt +21 -0
  12. data/README.md +88 -0
  13. data/Rakefile +8 -0
  14. data/_config.yml +1 -0
  15. data/bin/console +15 -0
  16. data/bin/setup +8 -0
  17. data/config/locales/en.yml +23 -0
  18. data/docs/ALPHA.md +29 -0
  19. data/docs/ALPHA_NUMERIC.md +29 -0
  20. data/docs/BASE64.md +18 -0
  21. data/docs/BOOLEAN.md +19 -0
  22. data/docs/COMPARE.md +30 -0
  23. data/docs/COORDINATE.md +27 -0
  24. data/docs/CREDIT_CARD.md +29 -0
  25. data/docs/CSV.md +44 -0
  26. data/docs/CURRENCY.md +18 -0
  27. data/docs/CUSIP.md +20 -0
  28. data/docs/EMAIL.md +26 -0
  29. data/docs/FILE_CONTENT_TYPE.md +26 -0
  30. data/docs/FILE_EXTENSION.md +25 -0
  31. data/docs/FILE_SIZE.md +38 -0
  32. data/docs/HEX.md +18 -0
  33. data/docs/IMEI.md +20 -0
  34. data/docs/IP_ADDRESS.md +26 -0
  35. data/docs/ISBN.md +18 -0
  36. data/docs/ISIN.md +20 -0
  37. data/docs/MAC_ADDRESS.md +21 -0
  38. data/docs/NAME.md +18 -0
  39. data/docs/PASSWORD.md +26 -0
  40. data/docs/PHONE_NUMBER.md +18 -0
  41. data/docs/SEDOL.md +20 -0
  42. data/docs/SLUG.md +18 -0
  43. data/docs/SSN.md +18 -0
  44. data/docs/TIME_ZONE.md +17 -0
  45. data/docs/TYPE.md +28 -0
  46. data/docs/URL.md +28 -0
  47. data/docs/USERNAME.md +18 -0
  48. data/docs/UUID.md +28 -0
  49. data/lib/lite/validators/alpha_numeric_validator.rb +11 -0
  50. data/lib/lite/validators/alpha_validator.rb +34 -0
  51. data/lib/lite/validators/base64_validator.rb +9 -0
  52. data/lib/lite/validators/base_validator.rb +54 -0
  53. data/lib/lite/validators/boolean_validator.rb +15 -0
  54. data/lib/lite/validators/compare_validator.rb +41 -0
  55. data/lib/lite/validators/coordinate_validator.rb +37 -0
  56. data/lib/lite/validators/credit_card_validator.rb +144 -0
  57. data/lib/lite/validators/csv_validator.rb +73 -0
  58. data/lib/lite/validators/currency_validator.rb +7 -0
  59. data/lib/lite/validators/cusip_validator.rb +27 -0
  60. data/lib/lite/validators/email_validator.rb +19 -0
  61. data/lib/lite/validators/file_content_type_validator.rb +38 -0
  62. data/lib/lite/validators/file_extension_validator.rb +41 -0
  63. data/lib/lite/validators/file_size_validator.rb +75 -0
  64. data/lib/lite/validators/hex_validator.rb +7 -0
  65. data/lib/lite/validators/imei_validator.rb +27 -0
  66. data/lib/lite/validators/ip_address_validator.rb +39 -0
  67. data/lib/lite/validators/isbn_validator.rb +16 -0
  68. data/lib/lite/validators/isin_validator.rb +36 -0
  69. data/lib/lite/validators/mac_address_validator.rb +18 -0
  70. data/lib/lite/validators/name_validator.rb +7 -0
  71. data/lib/lite/validators/password_validator.rb +29 -0
  72. data/lib/lite/validators/phone_number_validator.rb +7 -0
  73. data/lib/lite/validators/sedol_validator.rb +23 -0
  74. data/lib/lite/validators/slug_validator.rb +7 -0
  75. data/lib/lite/validators/ssn_validator.rb +7 -0
  76. data/lib/lite/validators/time_zone_validator.rb +13 -0
  77. data/lib/lite/validators/type_validator.rb +41 -0
  78. data/lib/lite/validators/url_validator.rb +61 -0
  79. data/lib/lite/validators/username_validator.rb +7 -0
  80. data/lib/lite/validators/uuid_validator.rb +37 -0
  81. data/lib/lite/validators/version.rb +9 -0
  82. data/lib/lite/validators.rb +12 -0
  83. data/lite-validators.gemspec +51 -0
  84. metadata +265 -0
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ class IsinValidator < BaseValidator
4
+
5
+ # rubocop:disable Metrics/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|CM|CA|CV|KY|CF|TD|CL|CN|CX|CC|CO|KM|CG|CD|CK|CR|CI|HR|CU|CW|CY|CZ|DK|DJ|DM|DO|EC|EG|SV|GQ|ER|EE|ET|FK|FO|FJ|FI|FR|GF|PF|TF|GA|GM|GE|DE|GH|GI|GR|GL|GD|GP|GU|GT|GG|GN|GW|GY|HT|HM|VA|HN|HK|HU|IS|IN|ID|IR|IQ|IE|IM|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})$/.freeze
7
+ # rubocop:enable Metrics/LineLength
8
+
9
+ private
10
+
11
+ def valid_attr?
12
+ valid_regexp? && valid_checksum?
13
+ end
14
+
15
+ # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
16
+ def valid_checksum?
17
+ characters = value.chars
18
+ digits = characters.map { |chr| /[A-Z]/.match?(chr) ? (chr.ord - 55) : chr.to_i }
19
+ even_values = digits.values_at(*digits.each_index.select(&:even?))
20
+ odd_values = digits.values_at(*digits.each_index.select(&:odd?))
21
+
22
+ longest, shortest = if even_values.last == characters.map(&:to_i)
23
+ [even_values, odd_values]
24
+ else
25
+ [odd_values, even_values]
26
+ end
27
+
28
+ longest = longest.map { |int| int * 2 }
29
+ values = longest.concat(shortest).to_s.scan(/./).map(&:to_i)
30
+ total = values.inject(&:+)
31
+
32
+ (10 - (total % 10)) % 10
33
+ end
34
+ # rubocop:enable Metrics/AbcSize, Metrics/MethodLength
35
+
36
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ class MacAddressValidator < BaseValidator
4
+
5
+ REGEXP ||= [
6
+ /^([\h]{2}[-|\.:|\s]){5}[\h]{2}?$/i,
7
+ /^([\h]{4}[-|\.:|\s]){2}[\h]{4}?$/i,
8
+ /^([\h]{6}[-|\.:|\s])[\h]{6}?$/i,
9
+ /^[\h]{12}?$/i
10
+ ].freeze
11
+
12
+ private
13
+
14
+ def valid_regexp?
15
+ REGEXP.any? { |regexp| value.to_s =~ regexp }
16
+ end
17
+
18
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class NameValidator < BaseValidator
4
+
5
+ REGEXP ||= /^([A-Za-z'"-]+\s+){1,4}[A-Za-z'"-]*\z/.freeze
6
+
7
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ class PasswordValidator < BaseValidator
4
+
5
+ REGEXP ||= {
6
+ strong: /\A(?=.{4,255})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[[:^alnum:]])/x,
7
+ weak: /^[A-Za-z0-9.,<>:;!@#$%^&*?_~-]{1,255}$/
8
+ }.freeze
9
+
10
+ def validate_each(record, attribute, value)
11
+ assert_valid_strength!
12
+ super
13
+ end
14
+
15
+ private
16
+
17
+ def assert_valid_strength!
18
+ assert_valid_option!(:strength, REGEXP.keys)
19
+ end
20
+
21
+ def strength
22
+ options[:strength] || :weak
23
+ end
24
+
25
+ def valid_regexp?
26
+ value.to_s =~ REGEXP[strength]
27
+ end
28
+
29
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class PhoneNumberValidator < BaseValidator
4
+
5
+ REGEXP ||= %r{^[0-9+\(\)#\.\s/ext-]+$}.freeze
6
+
7
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ class SedolValidator < BaseValidator
4
+
5
+ REGEXP ||= /^([A-Z0-9]{6})(\d{1})$/.freeze
6
+ WEIGHTS ||= [
7
+ 1, 3, 1, 7, 3, 9, 1
8
+ ].freeze
9
+
10
+ private
11
+
12
+ def valid_attr?
13
+ valid_regexp? && valid_checksum?
14
+ end
15
+
16
+ def valid_checksum?
17
+ total = 0
18
+ digits = value.chars.map { |dgt| /[A-Z]/.match?(dgt) ? (dgt.ord - 55) : dgt.to_i }
19
+ digits.each_with_index { |dgt, idx| total += (WEIGHTS[idx] * dgt) }
20
+ (10 - total % 10) % 10
21
+ end
22
+
23
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class SlugValidator < BaseValidator
4
+
5
+ REGEXP ||= /^[A-Za-z0-9_-]+$/i.freeze
6
+
7
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class SsnValidator < BaseValidator
4
+
5
+ REGEXP ||= /^\A([\d]{3}\-[\d]{2}\-[\d]{4}|[\d]{9})\Z$/.freeze
6
+
7
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/core_ext/time/zones'
4
+
5
+ class TimeZoneValidator < BaseValidator
6
+
7
+ private
8
+
9
+ def valid_attr?
10
+ !ActiveSupport::TimeZone[value].nil?
11
+ end
12
+
13
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ # NOTE: Implements pseudo-boolean class
4
+ class Boolean; end
5
+
6
+ class TypeValidator < BaseValidator
7
+
8
+ def validate_each(record, attribute, value)
9
+ assert_valid_is_or_is_not!
10
+ super
11
+ end
12
+
13
+ private
14
+
15
+ def assert_valid_is_or_is_not!
16
+ return if options.key?(:is) || options.key?(:is_not)
17
+
18
+ raise ArgumentError, 'Missing ":is" or ":is_not" attribute for comparison.'
19
+ end
20
+
21
+ # rubocop:disable Naming/PredicateName
22
+ def is_or_is_not
23
+ options[:is] || options[:is_not]
24
+ end
25
+ # rubocop:enable Naming/PredicateName
26
+
27
+ def valid_attr?
28
+ return !valid_type? if options.key?(:is_not)
29
+
30
+ valid_type?
31
+ end
32
+
33
+ def valid_type?
34
+ if is_or_is_not == Boolean
35
+ value.is_a?(TrueClass) || value.is_a?(FalseClass)
36
+ else
37
+ [*is_or_is_not].any? { |klass| value.is_a?(klass) }
38
+ end
39
+ end
40
+
41
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'uri'
4
+
5
+ class UrlValidator < BaseValidator
6
+
7
+ SCHEMES ||= %w[
8
+ http https
9
+ ].freeze
10
+
11
+ def validate_each(record, attribute, value)
12
+ assign_attr_readers(record, attribute, URI.parse(value.to_s))
13
+ valid?
14
+ rescue URI::InvalidURIError
15
+ record.errors.add(attribute, *error_message)
16
+ end
17
+
18
+ private
19
+
20
+ def scheme
21
+ options[:scheme] || UrlValidator::SCHEMES
22
+ end
23
+
24
+ def error_message_for(option)
25
+ options[:message] || I18n.t("errors.messages.url.#{option}")
26
+ end
27
+
28
+ def valid_attr?
29
+ valid_uri? && valid_domain? && valid_scheme? && valid_root?
30
+ end
31
+
32
+ # rubocop:disable Metrics/AbcSize
33
+ def valid_domain?
34
+ return true unless options[:domain]
35
+
36
+ value_downcased = value.host.to_s.downcase
37
+ check = [*options[:domain]].any? { |domain| value_downcased.end_with?(".#{domain.downcase}") }
38
+ record.errors.add(attribute, error_message_for(:domain)) unless check
39
+ end
40
+
41
+ def valid_root?
42
+ return true unless options[:root_only]
43
+
44
+ check = ['', '/'].include?(value.path) && value.query.blank? && value.fragment.blank?
45
+ record.errors.add(attribute, error_message_for(:root)) unless check
46
+ end
47
+
48
+ def valid_scheme?
49
+ return true unless options[:scheme]
50
+
51
+ value_downcased = value.scheme.to_s.downcase
52
+ check = [*scheme].any? { |sch| value_downcased == sch.to_s.downcase }
53
+ record.errors.add(attribute, error_message_for(:scheme)) unless check
54
+ end
55
+ # rubocop:enable Metrics/AbcSize
56
+
57
+ def valid_uri?
58
+ value.is_a?(URI::Generic)
59
+ end
60
+
61
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class UsernameValidator < BaseValidator
4
+
5
+ REGEXP ||= /^[a-z0-9_-]{1,255}$/.freeze
6
+
7
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ class UuidValidator < BaseValidator
4
+
5
+ VERSIONS ||= {
6
+ any: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,
7
+ 3 => /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,
8
+ 4 => /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
9
+ 5 => /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i
10
+ }.freeze
11
+
12
+ def validate_each(record, attribute, value)
13
+ assert_valid_version!
14
+ super
15
+ end
16
+
17
+ private
18
+
19
+ def assert_valid_version!
20
+ return unless options.key?(:version)
21
+
22
+ assert_valid_option!(:version, VERSIONS.keys)
23
+ end
24
+
25
+ def version
26
+ options[:version] || :any
27
+ end
28
+
29
+ def valid_regexp?
30
+ if options.key?(:version)
31
+ value.to_s =~ VERSIONS[version]
32
+ else
33
+ VERSIONS.any? { |_, regexp| value.to_s =~ regexp }
34
+ end
35
+ end
36
+
37
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lite
4
+ module Validators
5
+
6
+ VERSION ||= '1.0.0'
7
+
8
+ end
9
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_model'
4
+ require 'lite/validators/version'
5
+
6
+ %w[
7
+ base alpha alpha_numeric base64 boolean compare coordinate credit_card currency cusip email
8
+ file_content_type file_extension file_size csv hex imei ip_address isbn isin mac_address name
9
+ password phone_number sedol slug ssn time_zone type url username uuid
10
+ ].each do |name|
11
+ require "lite/validators/#{name}_validator"
12
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('../lib', __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'lite/validators/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = 'lite-validators'
9
+ spec.version = Lite::Validators::VERSION
10
+ spec.authors = ['Juan Gomez']
11
+ spec.email = %w[j.gomez@drexed.com]
12
+
13
+ spec.summary = 'Collection of ActiveModel/ActiveRecord validators'
14
+ spec.homepage = 'http://drexed.github.io/lite-validators'
15
+ spec.license = 'MIT'
16
+
17
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
19
+ if spec.respond_to?(:metadata)
20
+ spec.metadata.merge(
21
+ 'allowed_push_host' => 'https://rubygems.org',
22
+ 'changelog_uri' => 'https://github.com/drexed/lite-validators/blob/master/CHANGELOG.md',
23
+ 'homepage_uri' => spec.homepage,
24
+ 'source_code_uri' => 'https://github.com/drexed/lite-validators'
25
+ )
26
+ else
27
+ raise 'RubyGems 2.0 or newer is required to protect against ' \
28
+ 'public gem pushes.'
29
+ end
30
+
31
+ # Specify which files should be added to the gem when it is released.
32
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
33
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
34
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
35
+ end
36
+ spec.bindir = 'exe'
37
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
38
+ spec.require_paths = %w[lib]
39
+
40
+ spec.add_runtime_dependency 'activemodel'
41
+
42
+ spec.add_development_dependency 'actionpack'
43
+ spec.add_development_dependency 'bundler'
44
+ spec.add_development_dependency 'fasterer'
45
+ spec.add_development_dependency 'rake'
46
+ spec.add_development_dependency 'rspec'
47
+ spec.add_development_dependency 'rspec-rails'
48
+ spec.add_development_dependency 'rubocop'
49
+ spec.add_development_dependency 'rubocop-performance'
50
+ spec.add_development_dependency 'rubocop-rspec'
51
+ end
metadata ADDED
@@ -0,0 +1,265 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: lite-validators
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Juan Gomez
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-06-30 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activemodel
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: actionpack
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: fasterer
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec-rails
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rubocop-performance
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rubocop-rspec
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'
153
+ description:
154
+ email:
155
+ - j.gomez@drexed.com
156
+ executables: []
157
+ extensions: []
158
+ extra_rdoc_files: []
159
+ files:
160
+ - ".fasterer.yml"
161
+ - ".gitignore"
162
+ - ".rspec"
163
+ - ".rubocop.yml"
164
+ - ".travis.yml"
165
+ - CHANGELOG.md
166
+ - CODE_OF_CONDUCT.md
167
+ - Gemfile
168
+ - Gemfile.lock
169
+ - LICENSE.txt
170
+ - README.md
171
+ - Rakefile
172
+ - _config.yml
173
+ - bin/console
174
+ - bin/setup
175
+ - config/locales/en.yml
176
+ - docs/ALPHA.md
177
+ - docs/ALPHA_NUMERIC.md
178
+ - docs/BASE64.md
179
+ - docs/BOOLEAN.md
180
+ - docs/COMPARE.md
181
+ - docs/COORDINATE.md
182
+ - docs/CREDIT_CARD.md
183
+ - docs/CSV.md
184
+ - docs/CURRENCY.md
185
+ - docs/CUSIP.md
186
+ - docs/EMAIL.md
187
+ - docs/FILE_CONTENT_TYPE.md
188
+ - docs/FILE_EXTENSION.md
189
+ - docs/FILE_SIZE.md
190
+ - docs/HEX.md
191
+ - docs/IMEI.md
192
+ - docs/IP_ADDRESS.md
193
+ - docs/ISBN.md
194
+ - docs/ISIN.md
195
+ - docs/MAC_ADDRESS.md
196
+ - docs/NAME.md
197
+ - docs/PASSWORD.md
198
+ - docs/PHONE_NUMBER.md
199
+ - docs/SEDOL.md
200
+ - docs/SLUG.md
201
+ - docs/SSN.md
202
+ - docs/TIME_ZONE.md
203
+ - docs/TYPE.md
204
+ - docs/URL.md
205
+ - docs/USERNAME.md
206
+ - docs/UUID.md
207
+ - lib/lite/validators.rb
208
+ - lib/lite/validators/alpha_numeric_validator.rb
209
+ - lib/lite/validators/alpha_validator.rb
210
+ - lib/lite/validators/base64_validator.rb
211
+ - lib/lite/validators/base_validator.rb
212
+ - lib/lite/validators/boolean_validator.rb
213
+ - lib/lite/validators/compare_validator.rb
214
+ - lib/lite/validators/coordinate_validator.rb
215
+ - lib/lite/validators/credit_card_validator.rb
216
+ - lib/lite/validators/csv_validator.rb
217
+ - lib/lite/validators/currency_validator.rb
218
+ - lib/lite/validators/cusip_validator.rb
219
+ - lib/lite/validators/email_validator.rb
220
+ - lib/lite/validators/file_content_type_validator.rb
221
+ - lib/lite/validators/file_extension_validator.rb
222
+ - lib/lite/validators/file_size_validator.rb
223
+ - lib/lite/validators/hex_validator.rb
224
+ - lib/lite/validators/imei_validator.rb
225
+ - lib/lite/validators/ip_address_validator.rb
226
+ - lib/lite/validators/isbn_validator.rb
227
+ - lib/lite/validators/isin_validator.rb
228
+ - lib/lite/validators/mac_address_validator.rb
229
+ - lib/lite/validators/name_validator.rb
230
+ - lib/lite/validators/password_validator.rb
231
+ - lib/lite/validators/phone_number_validator.rb
232
+ - lib/lite/validators/sedol_validator.rb
233
+ - lib/lite/validators/slug_validator.rb
234
+ - lib/lite/validators/ssn_validator.rb
235
+ - lib/lite/validators/time_zone_validator.rb
236
+ - lib/lite/validators/type_validator.rb
237
+ - lib/lite/validators/url_validator.rb
238
+ - lib/lite/validators/username_validator.rb
239
+ - lib/lite/validators/uuid_validator.rb
240
+ - lib/lite/validators/version.rb
241
+ - lite-validators.gemspec
242
+ homepage: http://drexed.github.io/lite-validators
243
+ licenses:
244
+ - MIT
245
+ metadata: {}
246
+ post_install_message:
247
+ rdoc_options: []
248
+ require_paths:
249
+ - lib
250
+ required_ruby_version: !ruby/object:Gem::Requirement
251
+ requirements:
252
+ - - ">="
253
+ - !ruby/object:Gem::Version
254
+ version: '0'
255
+ required_rubygems_version: !ruby/object:Gem::Requirement
256
+ requirements:
257
+ - - ">="
258
+ - !ruby/object:Gem::Version
259
+ version: '0'
260
+ requirements: []
261
+ rubygems_version: 3.0.4
262
+ signing_key:
263
+ specification_version: 4
264
+ summary: Collection of ActiveModel/ActiveRecord validators
265
+ test_files: []