conditional_validation 0.0.5 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YjYyY2ZlNmExOTAxMDAyNDJjZjU2Y2E5Y2QzYzE0Yjk5MzE5YjIwOA==
5
- data.tar.gz: !binary |-
6
- OTQ4YmUzOTUzM2FmMjgzZmM5MzFkOWNmOTgzODBhZTAwNDBjZDNjZg==
2
+ SHA1:
3
+ metadata.gz: 85f47600c28259d876df108d8465339eb32dd021
4
+ data.tar.gz: 05fbb9cf2672e68ff8297b548dc78c4152084931
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- YWM4NmIxNDNhMzJmOWEyNjJjMjA3YTFmODVkMmQwNGFlNWI2Mzc4ZWVlZDk2
10
- ZWFiZGZhOTIxMWM2ZDQxMjE2NmU5ZWZlZDIwZjNjZDUwMTJjNmJkOGJjYWI4
11
- MmVmYzEyYTNiMGZlZDM4OWRjMGJhZjZmYzIzODc4OWFlOTY4NDg=
12
- data.tar.gz: !binary |-
13
- YjE3NDlmODBlYzY5MDU1NWEwNDY0ZWFkY2UxM2I1YjBkMzcwODY5ZjRjZTE1
14
- YThiNmVmZjJjMzM3ZjQ1ZTk2NjQ3ODYzYjZkMGZhYzU3MDkxYWVhMTEwZWE2
15
- ZDcwYTMzZWE5ODljMjI0N2FiZmU3NzE3Y2JmNjJhYjczNzBiMWI=
6
+ metadata.gz: 9f8f40b43dd9967e175a8780b37074ecf2b359368f8d2061945b98e8fa48d45124f1db0f12c4fc5b1cc045b6f92fbc6995b0f1722c348e561e497b7c336a81b2
7
+ data.tar.gz: 3486772d09179433722a3d53f6db3726ae0a86520c68348e2bb45ed8280c3e8fb5fbe3f8e77d207b169c6889a798a4c951c21b672fe60b2a3a86c7d393bb4443
data/README.md CHANGED
@@ -2,9 +2,13 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/conditional_validation.png)](http://badge.fury.io/rb/conditional_validation)
4
4
 
5
- Conditional Validation allows controllers to communicate with models about
6
- whether or not certain validations should be run. This is great for multi-page
7
- wizards and context-dependent validations.
5
+ Conditional Validation allows validation flags to be enabled to determine when
6
+ certain validations should be run on a model. The idea being that, while models
7
+ tend to have a set of core validations that should always be run, some
8
+ validations may be specific to a certain context or state of the object. Typical
9
+ use-case, then, is to flag a model's non-core validations to run from specific
10
+ controller actions, while they default to not run from all others.
11
+
8
12
 
9
13
  ## Compatibility
10
14
 
@@ -12,15 +16,16 @@ Tested with:
12
16
 
13
17
  * Ruby: MRI 1.9.3
14
18
  * Ruby: MRI 2.0.0 +
15
- * Rails: 3.0.0 +
16
- * Rails: 4.0.0 +
19
+ * Rails: 3+
20
+ * Rails: 4+
21
+
17
22
 
18
23
  ## Installation
19
24
 
20
25
  Add this line to your application's Gemfile:
21
26
 
22
27
  ```ruby
23
- gem "conditional_validation"
28
+ gem 'conditional_validation'
24
29
  ```
25
30
 
26
31
  And then execute:
@@ -29,31 +34,35 @@ And then execute:
29
34
  bundle
30
35
  ```
31
36
 
37
+
32
38
  ## Usage
33
39
 
34
- First, define a validation accessor:
40
+ First, define a validation flag:
35
41
 
36
42
  ```ruby
37
43
  # app/models/some_model.rb
38
44
  class SomeModel
39
- validation_accessor :some_grouping_name
45
+ validation_flag :<flag_name>
40
46
  end
41
47
  ```
42
48
 
43
- Then, this model will receive the following methods for conditional validation:
49
+ Then, the following methods will be defined on SomeModel for conditional
50
+ validation:
44
51
 
45
52
  ```ruby
46
- enable_some_grouping_name_validation # Enables conditional validation
47
- disable_some_grouping_name_validation # Disables conditional validation
48
- validate_on_some_grouping_name? # Check if conditional validation is enabled
53
+ enable_<flag_name>_validation # Enables conditional validation
54
+ disable_<flag_name>_validation # Disables conditional validation
55
+ validate_on_<flag_name>? # Check if conditional validation is enabled
49
56
  ```
50
57
 
51
- <b>A "Real World" Example</b>
58
+
59
+ ### A "Real World" Example
52
60
 
53
61
  ```ruby
54
62
  # app/models/user.rb
55
63
  User < ActiveRecord::Base
56
- validation_accessor :address_attributes # Initialize conditional validation on address attributes
64
+ # Initialize conditional validation on address attributes
65
+ validation_flag :address_attributes
57
66
 
58
67
  with_options if: :validate_on_address_attributes? do |obj|
59
68
  obj.validates :street, presence: true
@@ -64,18 +73,20 @@ end
64
73
 
65
74
  # app/controllers/user_controller.rb
66
75
  def update
67
- current_user.enable_address_attributes_validation # Enable conditional validation on address attributes
76
+ # Enable conditional validation on address attributes
77
+ current_user.enable_address_attributes_validation
68
78
  if current_user.save
69
- current_user.disable_address_attributes_validation # Not necessarily needed, but disables conditional validation on address attributes
79
+ # Not typically needed, but disables conditional validation on address attributes
80
+ current_user.disable_address_attributes_validation
70
81
  # ...
71
82
  end
72
83
  end
73
84
  ```
74
85
 
75
- <b>Method Chaining</b>
86
+ ### Method Chaining
76
87
 
77
88
  The enable and disable methods allow for method chaining so that multiple
78
- validation accessors may be enabled/disabled at once:
89
+ validation flags may be enabled/disabled at once:
79
90
 
80
91
  ```ruby
81
92
  if current_user.enable_address_attributes_validation.enable_some_other_validation.save
@@ -83,6 +94,7 @@ if current_user.enable_address_attributes_validation.enable_some_other_validatio
83
94
  end
84
95
  ```
85
96
 
97
+
86
98
  ## Author
87
99
 
88
100
  - Paul Dobbins
@@ -1,3 +1,4 @@
1
+ require "conditional_validation/validation_flag"
1
2
  require "conditional_validation/validation_accessor"
2
3
 
3
4
  module ConditionalValidation
@@ -6,8 +6,10 @@ module ConditionalValidation
6
6
  # Macro method for defining an attr_accessor and various
7
7
  # enable/disable/predicate methods that wrap the attr_acessor for
8
8
  # determining when to run a set of validation on an ActiveRecord model.
9
+ #
9
10
  # @param args [*accessors] the section names for which to define
10
11
  # validation accessors for
12
+ #
11
13
  # @example
12
14
  # class User
13
15
  # validation_accessor :address_attributes
@@ -18,24 +20,30 @@ module ConditionalValidation
18
20
  # # disable_address_attributes_validation
19
21
  # # validate_on_address_attributes?
20
22
  def validation_accessor(*accessors)
21
- attr_accessor *accessors.map { |accessor| "_#{accessor}_validation_accessor" }
23
+ attr_accessor *accessors.map { |accessor|
24
+ "_#{accessor}_validation_accessor"
25
+ }
22
26
 
23
27
  accessors.each do |accessor|
24
- define_method "enable_#{accessor}_validation" do
25
- self.send("_#{accessor}_validation_accessor=", true)
26
- self
27
- end
28
+ class_eval <<-METHODS, __FILE__, __LINE__ + 1
29
+ def enable_#{accessor}_validation
30
+ self._#{accessor}_validation_accessor = true
31
+ self
32
+ end
28
33
 
29
- define_method "disable_#{accessor}_validation" do
30
- self.send("_#{accessor}_validation_accessor=", false)
31
- self
32
- end
34
+ def disable_#{accessor}_validation
35
+ self._#{accessor}_validation_accessor = false
36
+ self
37
+ end
33
38
 
34
- define_method "validate_on_#{accessor}?" do
35
- !!self.send("_#{accessor}_validation_accessor")
36
- end
39
+ def validate_on_#{accessor}?
40
+ !!_#{accessor}_validation_accessor
41
+ end
42
+ METHODS
37
43
  end
38
44
  end
45
+ deprecate validation_accessor: :validation_flag,
46
+ deprecator: ActiveSupport::Deprecation.new('1.0', 'Conditional Validation')
39
47
  end
40
48
  end
41
49
  end
@@ -0,0 +1,47 @@
1
+ module ConditionalValidation
2
+ module ValidationFlag
3
+ extend ActiveSupport::Concern
4
+
5
+ module ClassMethods
6
+ # Macro method for defining an attr_accessor and
7
+ # enable/disable/predicate methods that wrap the attr_acessor for
8
+ # determining when to run a set of validation on an ActiveRecord model.
9
+ #
10
+ # @param [*Array] flags the section names for which to define
11
+ # validation flags for
12
+ #
13
+ # @example
14
+ # class User
15
+ # validation_flag :address_attributes
16
+ # end
17
+ #
18
+ # # => Defines the following methods on instances of the User class:
19
+ # # enable_address_attributes_validation
20
+ # # disable_address_attributes_validation
21
+ # # validate_on_address_attributes?
22
+ def validation_flag(*flags)
23
+ attr_accessor *flags.map { |flag| "_#{flag}_validation_flag" }
24
+
25
+ flags.each do |flag|
26
+ class_eval <<-METHODS, __FILE__, __LINE__ + 1
27
+ def enable_#{flag}_validation
28
+ self._#{flag}_validation_flag = true
29
+ self
30
+ end
31
+
32
+ def disable_#{flag}_validation
33
+ self._#{flag}_validation_flag = false
34
+ self
35
+ end
36
+
37
+ def validate_on_#{flag}?
38
+ !!_#{flag}_validation_flag
39
+ end
40
+ METHODS
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
46
+
47
+ ActiveRecord::Base.send(:include, ConditionalValidation::ValidationFlag)
@@ -1,3 +1,3 @@
1
1
  module ConditionalValidation
2
- VERSION = "0.0.5"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -1,56 +1,100 @@
1
1
  require 'test_helper'
2
2
 
3
3
  describe ConditionalValidation do
4
- describe "validation_accessor macro" do
5
- it "is available to ActiveRecord models" do
6
- class SomeClass < ActiveRecord::Base
4
+ describe "#validation_flag" do
5
+ # User is defined in test/dummy/app/models/user.rb and is setup with
6
+ # validation_flags already.
7
+ subject { User.new }
8
+
9
+ it "is available to ActiveRecord models by default" do
10
+ class SomeClass < ActiveRecord::Base; end
11
+ SomeClass.must_respond_to(:validation_flag)
12
+ end
13
+
14
+ it "defines validation_flag methods" do
15
+ [:enable_flag_attributes_validation,
16
+ :disable_flag_attributes_validation,
17
+ :validate_on_flag_attributes?].each do |method|
18
+ subject.must_respond_to(method)
19
+ end
20
+ end
21
+
22
+ it "does not define validation_flag methods for unrequested validation_flags" do
23
+ [:"enable_unknown_attributes_validation",
24
+ :"disable_unknown_attributes_validation",
25
+ :"validate_on_unknown_attributes?"].each do |method|
26
+ subject.wont_respond_to(method)
27
+ end
28
+ end
29
+
30
+ describe "validation_flag methods" do
31
+ it "allows method chaining" do
32
+ subject.enable_flag_attributes_validation.must_equal subject
33
+ subject.disable_flag_attributes_validation.must_equal subject
34
+ end
35
+
36
+ it "requests validation when enabled" do
37
+ refute subject.validate_on_flag_attributes?
38
+
39
+ subject.enable_flag_attributes_validation
40
+ assert subject.validate_on_flag_attributes?
41
+ end
42
+
43
+ it "does not request validation when disabled" do
44
+ subject.enable_flag_attributes_validation
45
+ assert subject.validate_on_flag_attributes?
46
+
47
+ subject.disable_flag_attributes_validation
48
+ refute subject.validate_on_flag_attributes?
7
49
  end
8
- assert { SomeClass.respond_to?(:validation_accessor) }
9
50
  end
10
51
  end
11
52
 
12
- describe "when a model is using the validation_accessor macro" do
13
- before do
14
- @user = User.new # Defined in test/dummy app
53
+ describe "#validation_accessor" do
54
+ # User is defined in test/dummy/app/models/user.rb and is setup with
55
+ # validation_flags already.
56
+ subject { User.new }
57
+
58
+ it "is available to ActiveRecord models by default" do
59
+ class SomeClass < ActiveRecord::Base; end
60
+ SomeClass.must_respond_to(:validation_accessor)
15
61
  end
16
62
 
17
63
  it "defines validation_accessor methods" do
18
- [:enable_address_attributes_validation,
19
- :disable_address_attributes_validation,
20
- :validate_on_address_attributes?].each do |method|
21
- assert { @user.respond_to?(method) }
64
+ [:enable_accessor_attributes_validation,
65
+ :disable_accessor_attributes_validation,
66
+ :validate_on_accessor_attributes?].each do |method|
67
+ subject.must_respond_to(method)
22
68
  end
23
69
  end
24
70
 
25
71
  it "does not define validation_accessor methods for unrequested validation_accessors" do
26
- %w[unknown_attributes test2].each do |accessor_name|
27
- [:"enable_#{accessor_name}_validation",
28
- :"disable_#{accessor_name}_validation",
29
- :"validate_on_#{accessor_name}?"].each do |method|
30
- deny { @user.respond_to?(method) }
31
- end
72
+ [:"enable_unknown_attributes_validation",
73
+ :"disable_unknown_attributes_validation",
74
+ :"validate_on_unknown_attributes?"].each do |method|
75
+ subject.wont_respond_to(method)
32
76
  end
33
77
  end
34
78
 
35
- it "allows method chaining when using the getter/setter methods" do
36
- assert { @user.enable_address_attributes_validation == @user }
37
- assert { @user.disable_address_attributes_validation == @user }
38
- end
79
+ describe "validation_accessor methods" do
80
+ it "allows method chaining" do
81
+ subject.enable_accessor_attributes_validation.must_equal subject
82
+ subject.disable_accessor_attributes_validation.must_equal subject
83
+ end
39
84
 
40
- describe "conditional validation" do
41
85
  it "requests validation when enabled" do
42
- deny { @user.validate_on_address_attributes? }
86
+ refute subject.validate_on_accessor_attributes?
43
87
 
44
- @user.enable_address_attributes_validation
45
- assert { @user.validate_on_address_attributes? }
88
+ subject.enable_accessor_attributes_validation
89
+ assert subject.validate_on_accessor_attributes?
46
90
  end
47
91
 
48
- it "does not request validation when disabled again" do
49
- @user.enable_address_attributes_validation
50
- assert { @user.validate_on_address_attributes? }
92
+ it "does not request validation when disabled" do
93
+ subject.enable_accessor_attributes_validation
94
+ assert subject.validate_on_accessor_attributes?
51
95
 
52
- @user.disable_address_attributes_validation
53
- deny { @user.validate_on_address_attributes? }
96
+ subject.disable_accessor_attributes_validation
97
+ refute subject.validate_on_accessor_attributes?
54
98
  end
55
99
  end
56
100
  end
@@ -1,9 +1,21 @@
1
1
  class User < ActiveRecord::Base
2
- validation_accessor :address_attributes, :other_attributes
2
+ attr_accessor :flag_name
3
+
4
+ validation_flag :flag_attributes, :other_flag_attributes
3
5
 
4
6
  validates :name, presence: true
5
- with_options if: :validate_on_address_attributes? do |user|
6
- user.validates :address, presence: true
7
- user.validates :city, presence: true
7
+
8
+ with_options if: :validate_on_flag_attributes? do |user|
9
+ user.validates :flag_name, presence: true
10
+ end
11
+
12
+
13
+ # DEPRECATED
14
+ attr_accessor :accessor_name
15
+
16
+ validation_accessor :accessor_attributes, :other_accessor_attributes
17
+
18
+ with_options if: :validate_on_accessor_attributes? do |user|
19
+ user.validates :accessor_name, presence: true
8
20
  end
9
21
  end
@@ -2,8 +2,6 @@ class CreateUsers < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :users do |t|
4
4
  t.string :name
5
- t.string :address
6
- t.string :city
7
5
 
8
6
  t.timestamps
9
7
  end
@@ -12,3 +12,6 @@ Migrating to CreateUsers (20131119215801)
12
12
   (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
13
13
   (0.1ms) SELECT version FROM "schema_migrations"
14
14
   (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20131119215801')
15
+ DEPRECATION WARNING: validation_accessor is deprecated and will be removed from Rails 4.1 (validation_accessor is deprecated in favor of validation_flag and will be removed in v1.0.0.). (called from <class:User> at /Users/pdobb/Code/conditional_validation/test/dummy/app/models/user.rb:11)
16
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
17
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
@@ -2,11 +2,7 @@
2
2
  # http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
3
3
 
4
4
  one:
5
- name: MyString
6
- address: MyString
7
- city: MyString
5
+ name: User1
8
6
 
9
7
  two:
10
- name: MyString
11
- address: MyString
12
- city: MyString
8
+ name: User2
data/test/test_helper.rb CHANGED
@@ -1,19 +1,14 @@
1
- # Configure Rails Environment
2
1
  ENV["RAILS_ENV"] = "test"
3
2
 
4
3
  require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
4
  require "rails/test_help"
6
5
  require "minitest/rails"
7
- require "minitest/ansi"
8
- require "wrong/adapters/minitest"
9
-
10
- MiniTest::ANSI.use!
11
- Wrong.config.color
12
6
 
13
7
  Rails.backtrace_cleaner.remove_silencers!
8
+ ActiveSupport::Deprecation.silenced = true
14
9
 
15
10
  # Load support files
16
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
11
+ Dir[Rails.root.join("test/support/**/*.rb")].each { |f| require f }
17
12
 
18
13
  # Load fixtures from the engine
19
14
  if ActiveSupport::TestCase.method_defined?(:fixture_path=)
metadata CHANGED
@@ -1,100 +1,75 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conditional_validation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Dobbins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-26 00:00:00.000000000 Z
11
+ date: 2014-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 3.0.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
26
  version: 3.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sqlite3
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest-rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: minitest-ansi
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: wrong
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
- description: Validation Accessor allows controllers to communicate with models about
84
- whether or not certain validations should be run.
55
+ description: Conditional Validation allows validation flags to be enabled to determine
56
+ when certain validations should be run on a model.
85
57
  email:
86
58
  - pdobbins@gmail.com
87
59
  executables: []
88
60
  extensions: []
89
61
  extra_rdoc_files: []
90
62
  files:
91
- - lib/conditional_validation/validation_accessor.rb
92
- - lib/conditional_validation/version.rb
93
- - lib/conditional_validation.rb
94
63
  - MIT-LICENSE
95
- - Rakefile
96
64
  - README.md
65
+ - Rakefile
66
+ - lib/conditional_validation.rb
67
+ - lib/conditional_validation/validation_accessor.rb
68
+ - lib/conditional_validation/validation_flag.rb
69
+ - lib/conditional_validation/version.rb
97
70
  - test/conditional_validation_test.rb
71
+ - test/dummy/README.rdoc
72
+ - test/dummy/Rakefile
98
73
  - test/dummy/app/assets/javascripts/application.js
99
74
  - test/dummy/app/assets/stylesheets/application.css
100
75
  - test/dummy/app/controllers/application_controller.rb
@@ -104,6 +79,7 @@ files:
104
79
  - test/dummy/bin/bundle
105
80
  - test/dummy/bin/rails
106
81
  - test/dummy/bin/rake
82
+ - test/dummy/config.ru
107
83
  - test/dummy/config/application.rb
108
84
  - test/dummy/config/boot.rb
109
85
  - test/dummy/config/database.yml
@@ -120,7 +96,6 @@ files:
120
96
  - test/dummy/config/initializers/wrap_parameters.rb
121
97
  - test/dummy/config/locales/en.yml
122
98
  - test/dummy/config/routes.rb
123
- - test/dummy/config.ru
124
99
  - test/dummy/db/development.sqlite3
125
100
  - test/dummy/db/migrate/20131119215801_create_users.rb
126
101
  - test/dummy/db/schema.rb
@@ -131,8 +106,6 @@ files:
131
106
  - test/dummy/public/422.html
132
107
  - test/dummy/public/500.html
133
108
  - test/dummy/public/favicon.ico
134
- - test/dummy/Rakefile
135
- - test/dummy/README.rdoc
136
109
  - test/dummy/test/fixtures/users.yml
137
110
  - test/dummy/test/models/user_test.rb
138
111
  - test/test_helper.rb
@@ -146,20 +119,20 @@ require_paths:
146
119
  - lib
147
120
  required_ruby_version: !ruby/object:Gem::Requirement
148
121
  requirements:
149
- - - ! '>='
122
+ - - ">="
150
123
  - !ruby/object:Gem::Version
151
124
  version: '0'
152
125
  required_rubygems_version: !ruby/object:Gem::Requirement
153
126
  requirements:
154
- - - ! '>='
127
+ - - ">="
155
128
  - !ruby/object:Gem::Version
156
129
  version: '0'
157
130
  requirements: []
158
131
  rubyforge_project:
159
- rubygems_version: 2.1.11
132
+ rubygems_version: 2.4.1
160
133
  signing_key:
161
134
  specification_version: 4
162
- summary: Add conditional validation methods to a model.
135
+ summary: Add conditional validation flags to a model.
163
136
  test_files:
164
137
  - test/conditional_validation_test.rb
165
138
  - test/dummy/app/assets/javascripts/application.js
@@ -203,3 +176,4 @@ test_files:
203
176
  - test/dummy/test/fixtures/users.yml
204
177
  - test/dummy/test/models/user_test.rb
205
178
  - test/test_helper.rb
179
+ has_rdoc: