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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 47f7835f9402eb199565f9cd015632f06be3475948d1285622cd5a01e448b8d3
4
- data.tar.gz: 9a39c8e6f204161ec9ee46b60107471228cd098e1796dbbc9f22e1c00935dcd0
3
+ metadata.gz: c60bf9b0eb135f3c54502d2e8a9b4b11214bfbde7cee50daf7351d7453c18e39
4
+ data.tar.gz: 9fec2d1e2b92172373b7d94ec916e51cc0dba4be39b691646ad1815611543c49
5
5
  SHA512:
6
- metadata.gz: ddd1477d6edd88470a83b84a2cf6ae2f3623a4d762514d1923beefe3e2897b19f970a08f8c6594ef7c257665876521673ed2a81fa467dbad84778c4cc29e462a
7
- data.tar.gz: a76406ba099896c80b99fd6a536e5b31035a3ad35cf88598c9cd490712c98c29c2bc3e5854a40ff1a8ccec66287e225a7fb7ddb77ce6a60a5dc25167dbec345e
6
+ metadata.gz: 0aca36e3a24152411b537b4015944a3297f26ee6f8c0e30a1838d4b5f2268d681816e53f33ca5ff9733367a0c20822a8f4641a262db15f7f9d016ba8498b454d
7
+ data.tar.gz: 460280a2e361821b0df7127a541f6fea77cc1a282f758a694d3933756fb022e1e45f81e0c1f265e38478557f6673cc87c34cd1b7ad37fdb579930ecb15438871
data/.gitignore CHANGED
@@ -2,4 +2,5 @@
2
2
  pkg
3
3
  rdoc
4
4
  coverage
5
+ gemfiles/*.lock
5
6
  *.log
@@ -87,8 +87,8 @@ module ValidationGroup
87
87
  end
88
88
  end
89
89
 
90
- module Errors # included in ActiveRecord::Errors
91
- def add(attribute, msg = nil, *args, &block)
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.0
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.3.1
140
+ rubygems_version: 3.4.0.dev
127
141
  signing_key:
128
142
  specification_version: 4
129
143
  summary: Validation groups for ActiveRecord