simple_validate 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +2 -0
- data/Rakefile +3 -1
- data/lib/simple_validate.rb +2 -0
- data/lib/simple_validate/errors.rb +2 -0
- data/lib/simple_validate/validates_base.rb +2 -0
- data/lib/simple_validate/validates_exclusion_of.rb +3 -0
- data/lib/simple_validate/validates_format_of.rb +3 -0
- data/lib/simple_validate/validates_inclusion_of.rb +3 -0
- data/lib/simple_validate/validates_length_of.rb +2 -0
- data/lib/simple_validate/validates_numericality_of.rb +2 -0
- data/lib/simple_validate/validates_presence_of.rb +2 -0
- data/lib/simple_validate/validates_set_base.rb +2 -0
- data/lib/simple_validate/version.rb +3 -1
- data/simple_validate.gemspec +3 -1
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4a55b4307e3f7b02f9caf048c5e892bf4230100557460d58df45b28dab196a68
|
4
|
+
data.tar.gz: 54faeafbe20dc26a0ec96e6d087fa04195ea0efdf6593fcd28a356fc4decc8b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1dab29ca30408fd05ca35e81fe8e7fc7db0029b5622369a7bbc89d9a3b8a85c92947a5c423ac0d2494c52f933569bc4ae96328cf3ed0a9ae87a422627719b400
|
7
|
+
data.tar.gz: 3c78f456e17d56a3649e4bde7475a32a084de618676bb0318c230f0572e6a727271f9afefcbc8d3f47beeda49bf7bdf16a10f1dd4d1efb43563db2330b0b1cfb
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'bundler/gem_tasks'
|
2
4
|
require 'rspec/core/rake_task'
|
3
5
|
require 'rubocop/rake_task'
|
@@ -5,4 +7,4 @@ require 'rubocop/rake_task'
|
|
5
7
|
RSpec::Core::RakeTask.new(:spec)
|
6
8
|
RuboCop::RakeTask.new
|
7
9
|
|
8
|
-
task default: %i[spec rubocop]
|
10
|
+
task default: %i[spec rubocop:auto_correct]
|
data/lib/simple_validate.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module SimpleValidate
|
2
4
|
class ValidatesFormatOf < ValidatesBase
|
3
5
|
attr_accessor :regex
|
@@ -10,6 +12,7 @@ module SimpleValidate
|
|
10
12
|
|
11
13
|
def valid?(instance)
|
12
14
|
raise ArgumentError if regex.nil? || !regex.is_a?(Regexp)
|
15
|
+
|
13
16
|
!!(instance.send(attribute) =~ regex)
|
14
17
|
end
|
15
18
|
end
|
data/simple_validate.gemspec
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
lib = File.expand_path('lib', __dir__)
|
2
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
5
|
require 'simple_validate/version'
|
@@ -18,6 +20,6 @@ Gem::Specification.new do |spec|
|
|
18
20
|
end
|
19
21
|
|
20
22
|
spec.require_paths = ['lib']
|
21
|
-
spec.add_dependency 'activesupport'
|
23
|
+
spec.add_dependency 'activesupport'
|
22
24
|
spec.add_development_dependency 'bundler'
|
23
25
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_validate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Palaniuk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,8 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '0'
|
86
86
|
requirements: []
|
87
|
-
|
88
|
-
rubygems_version: 2.6.13
|
87
|
+
rubygems_version: 3.0.3
|
89
88
|
signing_key:
|
90
89
|
specification_version: 4
|
91
90
|
summary: Validations for any plain old ruby object
|