simple_validate 1.1.2 → 1.2.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
- SHA256:
3
- metadata.gz: 4be4e322ba8383ab04495306a2ed7b71db142d32062e50f11fc6c27a60632491
4
- data.tar.gz: 1aeaad50c99f01008917a593b73fbe0c87e45e72548d5a479f4d8e646756109b
2
+ SHA1:
3
+ metadata.gz: '088622398860ce0640092a27f1f6a20cf1c6888f'
4
+ data.tar.gz: 97156629872295a0d1b1134a0d27467b74568a12
5
5
  SHA512:
6
- metadata.gz: 04b3f8dcbe4ab31acd3b65a407e1c561dcc2a6a813551b9bb7227e2b8c37b143ad157c0165099ccb0d1fd2759c81fbe7b679010274f79cde3b48c84b98eabd0a
7
- data.tar.gz: 383a7560fd119a51047ca27d0dbc790cfd1127b9b09533ad6ab590e365a419d62509dee923814a7b9aa8cf5aafc7702a5206f66354cec01635e71748e532476a
6
+ metadata.gz: bbd5436dee6f843d1c1759fe509271204ed4bd87f7c268a90c6930f345c41d6c8c8cbde5604d3d903fa33958fcecda0169007223e378a3cb1fee4bec43b0db3b
7
+ data.tar.gz: 0f863a046f6dbec9e8c311b3feb2a1019b4945f607743e3755dfba02c570bfb0c93d2c9cc619d7c8ad9f607943abc4ec188bb647e15ec8c59b6efb5205c6f327
data/Gemfile CHANGED
@@ -1,5 +1,14 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'rake'
4
- # Specify your gem's dependencies in simple_validate.gemspec
4
+
5
+ group :development do
6
+ gem 'pry'
7
+ end
8
+
9
+ group :test do
10
+ gem 'rspec'
11
+ gem 'rubocop'
12
+ end
13
+
5
14
  gemspec
data/Rakefile CHANGED
@@ -5,4 +5,4 @@ require 'rubocop/rake_task'
5
5
  RSpec::Core::RakeTask.new(:spec)
6
6
  RuboCop::RakeTask.new
7
7
 
8
- task default: %i[rubocop spec]
8
+ task default: %i[spec rubocop]
@@ -1,3 +1,3 @@
1
1
  module SimpleValidate
2
- VERSION = '1.1.2'.freeze
2
+ VERSION = '1.2.2'.freeze
3
3
  end
@@ -15,19 +15,22 @@ require 'active_support/all'
15
15
 
16
16
  module SimpleValidate
17
17
  def self.included(klass)
18
- klass.extend ClassMethods
18
+ klass.extend(ClassMethods)
19
+ klass.include(InstanceMethods)
19
20
  end
20
21
 
21
- def valid?
22
- self.class.validate(self)
23
- end
22
+ module InstanceMethods
23
+ def valid?
24
+ self.class.validate(self)
25
+ end
24
26
 
25
- def invalid?
26
- !valid?
27
- end
27
+ def invalid?
28
+ !valid?
29
+ end
28
30
 
29
- def errors
30
- @errors ||= Errors.new
31
+ def errors
32
+ @errors ||= Errors.new
33
+ end
31
34
  end
32
35
 
33
36
  module ClassMethods
@@ -1,4 +1,4 @@
1
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require 'simple_validate/version'
4
4
 
@@ -19,6 +19,5 @@ Gem::Specification.new do |spec|
19
19
 
20
20
  spec.require_paths = ['lib']
21
21
  spec.add_dependency 'activesupport', '~> 5.0'
22
- spec.add_development_dependency 'rspec'
23
- spec.add_development_dependency 'rubocop'
22
+ spec.add_development_dependency 'bundler'
24
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_validate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Palaniuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-14 00:00:00.000000000 Z
11
+ date: 2018-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -25,21 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '5.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rspec
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: rubocop
28
+ name: bundler
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - ">="
@@ -99,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
85
  version: '0'
100
86
  requirements: []
101
87
  rubyforge_project:
102
- rubygems_version: 2.7.3
88
+ rubygems_version: 2.6.13
103
89
  signing_key:
104
90
  specification_version: 4
105
91
  summary: Validations for any plain old ruby object