validation_group 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/validation_group.rb +2 -2
- data/test/test_helper.rb +3 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c60bf9b0eb135f3c54502d2e8a9b4b11214bfbde7cee50daf7351d7453c18e39
|
4
|
+
data.tar.gz: 9fec2d1e2b92172373b7d94ec916e51cc0dba4be39b691646ad1815611543c49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0aca36e3a24152411b537b4015944a3297f26ee6f8c0e30a1838d4b5f2268d681816e53f33ca5ff9733367a0c20822a8f4641a262db15f7f9d016ba8498b454d
|
7
|
+
data.tar.gz: 460280a2e361821b0df7127a541f6fea77cc1a282f758a694d3933756fb022e1e45f81e0c1f265e38478557f6673cc87c34cd1b7ad37fdb579930ecb15438871
|
data/lib/validation_group.rb
CHANGED
@@ -87,8 +87,8 @@ module ValidationGroup
|
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
90
|
-
module Errors # included in
|
91
|
-
def add(attribute,
|
90
|
+
module Errors # included in ActiveModel::Errors
|
91
|
+
def add(attribute, type = :invalid, **options)
|
92
92
|
# jeffp: setting @current_validation_fields and use of should_validate? optimizes code
|
93
93
|
add_error = @base.respond_to?(:should_validate?) ? @base.should_validate?(attribute.to_sym) : true
|
94
94
|
super if add_error
|
data/test/test_helper.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
$:.unshift(File.dirname(__FILE__) + '/../lib')
|
2
2
|
|
3
3
|
require 'rubygems'
|
4
|
+
require 'simplecov'
|
5
|
+
SimpleCov.minimum_coverage 89
|
6
|
+
SimpleCov.start 'rails'
|
4
7
|
|
5
|
-
gem 'activerecord', ENV['AR_VERSION'] ? "=#{ENV['AR_VERSION']}" : '>=2.1.0'
|
6
8
|
require 'active_record'
|
7
9
|
require 'test/unit'
|
8
10
|
require 'validation_group'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: validation_group
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Kira
|
@@ -58,6 +58,20 @@ dependencies:
|
|
58
58
|
- - ">"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0.8'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: simplecov
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
61
75
|
- !ruby/object:Gem::Dependency
|
62
76
|
name: sqlite3
|
63
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -123,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '0'
|
125
139
|
requirements: []
|
126
|
-
rubygems_version: 3.0.
|
140
|
+
rubygems_version: 3.4.0.dev
|
127
141
|
signing_key:
|
128
142
|
specification_version: 4
|
129
143
|
summary: Validation groups for ActiveRecord
|