aratak_date_validator 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_DISABLE_SHARED_GEMS: "1"
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
@@ -0,0 +1,8 @@
1
+ *.sw?
2
+ .DS_Store
3
+ coverage
4
+ rdoc
5
+ pkg
6
+ *.rbc
7
+ doc/*
8
+ .yardoc/*
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --colour
2
+ --format documentation
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm --create use ruby-1.9.2@date_validator
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
@@ -0,0 +1,49 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ date_validator (0.6.1)
5
+ activemodel (~> 3.1.0.beta1)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ activemodel (3.1.0.beta1)
11
+ activesupport (= 3.1.0.beta1)
12
+ bcrypt-ruby (~> 2.1.4)
13
+ builder (~> 3.0.0)
14
+ i18n (~> 0.6.0beta1)
15
+ activesupport (3.1.0.beta1)
16
+ multi_json (~> 1.0)
17
+ bcrypt-ruby (2.1.4)
18
+ bcrypt-ruby (2.1.4-java)
19
+ bluecloth (2.0.11)
20
+ builder (3.0.0)
21
+ diff-lcs (1.1.2)
22
+ i18n (0.6.0beta1)
23
+ multi_json (1.0.1)
24
+ rspec (2.5.0)
25
+ rspec-core (~> 2.5.0)
26
+ rspec-expectations (~> 2.5.0)
27
+ rspec-mocks (~> 2.5.0)
28
+ rspec-core (2.5.1)
29
+ rspec-expectations (2.5.0)
30
+ diff-lcs (~> 1.1.2)
31
+ rspec-mocks (2.5.0)
32
+ simplecov (0.3.6)
33
+ simplecov-html (>= 0.3.7)
34
+ simplecov-html (0.3.8)
35
+ tzinfo (0.3.23)
36
+ yard (0.6.4)
37
+
38
+ PLATFORMS
39
+ java
40
+ ruby
41
+
42
+ DEPENDENCIES
43
+ activesupport (~> 3.1.0.beta1)
44
+ bluecloth
45
+ date_validator!
46
+ rspec (~> 2.5.0)
47
+ simplecov
48
+ tzinfo (~> 0.3.0)
49
+ yard
@@ -0,0 +1,43 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+
4
+ require 'rspec/core/rake_task'
5
+ desc "Run superrtext specs"
6
+ RSpec::Core::RakeTask.new
7
+
8
+ require 'yard'
9
+ YARD::Rake::YardocTask.new(:docs) do |t|
10
+ t.files = ['lib/**/*.rb']
11
+ t.options = ['-m', 'markdown', '--no-private', '-r', 'Readme.md', '--title', 'Date Validator documentation']
12
+ end
13
+
14
+ site = 'doc'
15
+ source_branch = 'master'
16
+ deploy_branch = 'gh-pages'
17
+
18
+ desc "generate and deploy documentation website to github pages"
19
+ multitask :pages do
20
+ puts ">>> Deploying #{deploy_branch} branch to Github Pages <<<"
21
+ require 'git'
22
+ repo = Git.open('.')
23
+ puts "\n>>> Checking out #{deploy_branch} branch <<<\n"
24
+ repo.branch("#{deploy_branch}").checkout
25
+ (Dir["*"] - [site]).each { |f| rm_rf(f) }
26
+ Dir["#{site}/*"].each {|f| mv(f, "./")}
27
+ rm_rf(site)
28
+ puts "\n>>> Moving generated site files <<<\n"
29
+ Dir["**/*"].each {|f| repo.add(f) }
30
+ repo.status.deleted.each {|f, s| repo.remove(f)}
31
+ puts "\n>>> Commiting: Site updated at #{Time.now.utc} <<<\n"
32
+ message = ENV["MESSAGE"] || "Site updated at #{Time.now.utc}"
33
+ repo.commit(message)
34
+ puts "\n>>> Pushing generated site to #{deploy_branch} branch <<<\n"
35
+ repo.push
36
+ puts "\n>>> Github Pages deploy complete <<<\n"
37
+ repo.branch("#{source_branch}").checkout
38
+ end
39
+
40
+ task :doc => [:docs]
41
+
42
+ task :default => :spec
43
+ task :test => [:spec]
@@ -0,0 +1,45 @@
1
+ # date_validator
2
+
3
+ A simple date validator for Rails 3. Compatible with Ruby 1.8.7, 1.9.2 and
4
+ Rubinius 1.2.2.
5
+
6
+ $ gem sources -a http://gemcutter.org/
7
+ $ gem install date_validator
8
+
9
+ And I mean simple. In your model:
10
+
11
+ validates :expiration_date,
12
+ :date => {:after => Proc.new { Time.now },
13
+ :before => Proc.new { Time.now + 1.year } }
14
+ # Using Proc.new prevents production cache issues
15
+
16
+ If you want to check the date against another attribute, you can pass it
17
+ a Symbol instead of a block:
18
+
19
+ # Ensure the expiration date is after the packaging date
20
+ validates :expiration_date,
21
+ :date => {:after => :packaging_date}
22
+
23
+ For now the available options you can use are `:after`, `:before`,
24
+ `:after_or_equal_to` and `:before_or_equal_to`.
25
+
26
+ If you want to specify a custom message, you can do so in the options hash:
27
+
28
+ validates :start_date,
29
+ :date => {:after => Date.today, :message => 'must be after today'},
30
+ :on => :create
31
+
32
+ Pretty much self-explanatory! :)
33
+
34
+ ## Note on Patches/Pull Requests
35
+
36
+ * Fork the project.
37
+ * Make your feature addition or bug fix.
38
+ * Add tests for it. This is important so I don't break it in a
39
+ future version unintentionally.
40
+ * Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
41
+ * Send us a pull request. Bonus points for topic branches.
42
+
43
+ ## Copyright
44
+
45
+ Copyright (c) 2011 Codegram. See LICENSE for details.
@@ -0,0 +1,31 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "date_validator/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "aratak_date_validator"
7
+ s.version = DateValidator::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Oriol Gual", "Josep M. Bach", "Josep Jaume Rey"]
10
+ s.email = ["info@codegram.com", "alexey@osipenko.in.ua"]
11
+ s.homepage = "http://github.com/aratak/date_validator"
12
+ s.summary = %q{A simple, ORM agnostic, Ruby 1.9 compatible date validator for Rails 3, based on ActiveModel.}
13
+ s.description = %q{A simple, ORM agnostic, Ruby 1.9 compatible date validator for Rails 3, based on ActiveModel. Currently supporting :after, :before, :after_or_equal_to and :before_or_equal_to options.}
14
+
15
+ s.rubyforge_project = "date_validator"
16
+
17
+ s.add_runtime_dependency 'activemodel', '>= 3.0.0', '< 3.2'
18
+
19
+ s.add_development_dependency 'rspec', '~> 2.5.0'
20
+ s.add_development_dependency 'simplecov'
21
+ s.add_development_dependency 'activesupport', '>= 3.0.0', '< 3.2'
22
+ s.add_development_dependency 'tzinfo', '~> 0.3.0'
23
+
24
+ s.add_development_dependency 'yard'
25
+ s.add_development_dependency 'bluecloth'
26
+
27
+ s.files = `git ls-files`.split("\n")
28
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
29
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
30
+ s.require_paths = ["lib"]
31
+ end
@@ -0,0 +1,77 @@
1
+ require 'active_model/validations'
2
+
3
+ # ActiveModel Rails module.
4
+ module ActiveModel
5
+
6
+ # ActiveModel::Validations Rails module. Contains all the default validators.
7
+ module Validations
8
+
9
+ # Date Validator. Inherits from ActiveModel::EachValidator.
10
+ #
11
+ # Responds to the regular validator API methods `#check_validity` and
12
+ # `#validate_each`.
13
+ class DateValidator < ActiveModel::EachValidator
14
+
15
+ # Implemented checks and their associated operators.
16
+ CHECKS = { :after => :>, :after_or_equal_to => :>=,
17
+ :before => :<, :before_or_equal_to => :<=}.freeze
18
+
19
+ # Call `#initialize` on the superclass, adding a default
20
+ # `:allow_nil => false` option.
21
+ def initialize(options)
22
+ super(options.reverse_merge(:allow_nil => false))
23
+ end
24
+
25
+ # Validates the arguments passed to the validator.
26
+ #
27
+ # They must be either any kind of Time, a Proc, or a Symbol.
28
+ def check_validity!
29
+ keys = CHECKS.keys
30
+ options.slice(*keys).each do |option, value|
31
+ next if is_time?(value) || value.is_a?(Proc) || value.is_a?(Symbol) || (defined?(ActiveSupport::TimeWithZone) and value.is_a? ActiveSupport::TimeWithZone)
32
+ raise ArgumentError, ":#{option} must be a time, a date, a time_with_zone, a symbol or a proc"
33
+ end
34
+ end
35
+
36
+ # The actual validator method. It is called when ActiveRecord iterates
37
+ # over all the validators.
38
+ def validate_each(record, attr_name, value)
39
+ return if options[:allow_nil] && value.nil?
40
+
41
+ unless value
42
+ record.errors.add(attr_name, :not_a_date, options)
43
+ return
44
+ end
45
+
46
+ options.slice(*CHECKS.keys).each do |option, option_value|
47
+ option_value = option_value.call(record) if option_value.is_a?(Proc)
48
+ option_value = record.send(option_value) if option_value.is_a?(Symbol)
49
+
50
+ original_value = value
51
+ original_option_value = option_value
52
+
53
+ # To enable to_i conversion, these types must be converted to Datetimes
54
+ if defined?(ActiveSupport::TimeWithZone)
55
+ option_value = option_value.to_datetime if option_value.is_a?(ActiveSupport::TimeWithZone)
56
+ value = value.to_datetime if value.is_a?(ActiveSupport::TimeWithZone)
57
+ end
58
+
59
+ if defined?(Date)
60
+ option_value = option_value.to_datetime if option_value.is_a?(Date)
61
+ value = value.to_datetime if value.is_a?(Date)
62
+ end
63
+
64
+ unless is_time?(option_value) && value.to_i.send(CHECKS[option], option_value.to_i)
65
+ record.errors.add(attr_name, option, options.merge(:value => original_value, :date => original_option_value))
66
+ end
67
+ end
68
+ end
69
+
70
+ private
71
+
72
+ def is_time?(object)
73
+ object.is_a?(Time) || (defined?(Date) and object.is_a?(Date)) || (defined?(ActiveSupport::TimeWithZone) and object.is_a?(ActiveSupport::TimeWithZone))
74
+ end
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,15 @@
1
+ require 'active_model/validations/date_validator'
2
+ require 'active_support/i18n'
3
+
4
+ # A simple date validator for Rails 3.
5
+ #
6
+ # @example
7
+ # validates :expiration_date,
8
+ # :date => {:after => Proc.new { Time.now },
9
+ # :before => Proc.new { Time.now + 1.year } }
10
+ # # Using Proc.new prevents production cache issues
11
+ #
12
+ module DateValidator
13
+ end
14
+
15
+ I18n.load_path += Dir[File.expand_path(File.join(File.dirname(__FILE__), '../locales', '*.yml')).to_s]
@@ -0,0 +1,4 @@
1
+ module DateValidator
2
+ # The version number.
3
+ VERSION = "0.6.1"
4
+ end
@@ -0,0 +1,11 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ ca:
5
+ errors:
6
+ messages:
7
+ not_a_date: "is not a date"
8
+ after: "must be after %{date}"
9
+ after_or_equal_to: "must be after or equal to %{date}"
10
+ before: "must be before %{date}"
11
+ before_or_equal_to: "must be before or equal to %{date}"
@@ -0,0 +1,8 @@
1
+ en:
2
+ errors:
3
+ messages:
4
+ not_a_date: "is not a date"
5
+ after: "must be after %{date}"
6
+ after_or_equal_to: "must be after or equal to %{date}"
7
+ before: "must be before %{date}"
8
+ before_or_equal_to: "must be before or equal to %{date}"
@@ -0,0 +1,8 @@
1
+ es:
2
+ errors:
3
+ messages:
4
+ not_a_date: "no es una fecha"
5
+ after: "tiene que ser posterior a %{date}"
6
+ after_or_equal_to: "tiene que ser posterior o igual a %{date}"
7
+ before: "tiene que ser antes de %{date}"
8
+ before_or_equal_to: "tiene que ser antes o igual a %{date}"
@@ -0,0 +1,8 @@
1
+ nl:
2
+ errors:
3
+ messages:
4
+ not_a_date: "is geen datum"
5
+ after: "moet na %{date} liggen"
6
+ after_or_equal_to: "moet gelijk zijn aan of na %{date} liggen"
7
+ before: "moet voor %{date} liggen"
8
+ before_or_equal_to: "moet gelijk zijn of voor %{date} liggen"
@@ -0,0 +1,140 @@
1
+ require 'spec_helper'
2
+
3
+ module ActiveModel
4
+ module Validations
5
+
6
+ describe DateValidator do
7
+
8
+ before do
9
+ TestRecord.reset_callbacks(:validate)
10
+ end
11
+
12
+ it "checks validity of the arguments" do
13
+ [3, "foo", 1..6].each do |wrong_argument|
14
+ expect {
15
+ TestRecord.validates :expiration_date,
16
+ :date => {:before => wrong_argument}
17
+ }.to raise_error(ArgumentError, ":before must be a time, a date, a time_with_zone, a symbol or a proc")
18
+ end
19
+ end
20
+
21
+ it "complains when no options are provided" do
22
+ TestRecord.validates :expiration_date,
23
+ :date => {:before => Time.now}
24
+
25
+ model = TestRecord.new(nil)
26
+ model.should_not be_valid
27
+ model.errors[:expiration_date].should eq(["is not a date"])
28
+ end
29
+
30
+ [:valid,:invalid].each do |should_be|
31
+ _context = should_be == :valid ? 'when value validates correctly' : 'when value does not match validation requirements'
32
+
33
+ context _context do
34
+ [:after, :before, :after_or_equal_to, :before_or_equal_to].each do |check|
35
+ now = Time.now.to_datetime
36
+
37
+ model_date = case check
38
+ when :after then should_be == :valid ? now + 21000 : now - 1
39
+ when :before then should_be == :valid ? now - 21000 : now + 1
40
+ when :after_or_equal_to then should_be == :valid ? now : now - 21000
41
+ when :before_or_equal_to then should_be == :valid ? now : now + 21000
42
+ end
43
+
44
+ it "ensures that an attribute is #{should_be} when #{should_be == :valid ? 'respecting' : 'offending' } the #{check} check" do
45
+ TestRecord.validates :expiration_date,
46
+ :date => {:"#{check}" => now}
47
+
48
+ model = TestRecord.new(model_date)
49
+ should_be == :valid ? model.should(be_valid, "an attribute should be valid when respecting the #{check} check")\
50
+ : model.should_not(be_valid, "an attribute should be invalidwhen offending the #{check} check")
51
+ end
52
+
53
+ if _context == 'when value does not match validation requirements'
54
+ it "yields a default error message indicating that value must be #{check} validation requirements" do
55
+ TestRecord.validates :expiration_date,
56
+ :date => {:"#{check}" => now}
57
+
58
+ model = TestRecord.new(model_date)
59
+ model.should_not be_valid
60
+ model.errors[:expiration_date].should eq(["must be " + check.to_s.gsub('_',' ') + " #{now}"])
61
+ end
62
+ end
63
+ end
64
+
65
+ if _context == 'when value does not match validation requirements'
66
+ now = Time.now.to_datetime
67
+
68
+ it "allows for a custom validation message" do
69
+ TestRecord.validates :expiration_date,
70
+ :date => {:before_or_equal_to => now,
71
+ :message => 'must be after Christmas'}
72
+
73
+ model = TestRecord.new(now + 21000)
74
+ model.should_not be_valid
75
+ model.errors[:expiration_date].should eq(["must be after Christmas"])
76
+ end
77
+
78
+ it "allows custom validation message to be handled by I18n" do
79
+ custom_message = 'Custom Date Message'
80
+ I18n.backend.store_translations('en', {:errors => {:messages => {:not_a_date => custom_message}}})
81
+
82
+ TestRecord.validates :expiration_date, :date => true
83
+
84
+ model = TestRecord.new(nil)
85
+ model.should_not be_valid
86
+ model.errors[:expiration_date].should eq([custom_message])
87
+ end
88
+ end
89
+
90
+ end
91
+ end
92
+
93
+ extra_types = [:proc, :symbol]
94
+ extra_types.push(:date) if defined?(Date) and defined?(DateTime)
95
+ extra_types.push(:time_with_zone) if defined?(ActiveSupport::TimeWithZone)
96
+
97
+ extra_types.each do |type|
98
+ it "accepts a #{type} as an argument to a check" do
99
+ case type
100
+ when :proc then
101
+ expect {
102
+ TestRecord.validates :expiration_date,
103
+ :date => {:after => Proc.new{Time.now + 21000}}
104
+ }.to_not raise_error
105
+ when :symbol then
106
+ expect {
107
+ TestRecord.send(:define_method, :min_date, lambda { Time.now + 21000 })
108
+ TestRecord.validates :expiration_date, :date => {:after => :min_date}
109
+ }.to_not raise_error
110
+ when :date then
111
+ expect {
112
+ TestRecord.validates :expiration_date, :date => {:after => Time.now.to_date}
113
+ }.to_not raise_error
114
+ when :time_with_zone then
115
+ expect {
116
+ Time.zone = "Hawaii"
117
+ TestRecord.validates :expiration_date, :date => {:before => Time.zone.parse((Time.now + 21000).to_s)}
118
+ }.to_not raise_error
119
+ end
120
+ end
121
+ end
122
+
123
+ it "gracefully handles an unexpected result from a proc argument evaluation" do
124
+ TestRecord.validates :expiration_date,
125
+ :date => {:after => Proc.new{ nil }}
126
+
127
+ TestRecord.new(Time.now).should_not be_valid
128
+ end
129
+
130
+ it "gracefully handles an unexpected result from a symbol argument evaluation" do
131
+ TestRecord.send(:define_method, :min_date, lambda { nil })
132
+ TestRecord.validates :expiration_date,
133
+ :date => {:after => :min_date}
134
+
135
+ TestRecord.new(Time.now).should_not be_valid
136
+ end
137
+ end
138
+
139
+ end
140
+ end
@@ -0,0 +1,20 @@
1
+ require 'simplecov'
2
+ SimpleCov.start do
3
+ add_group "Lib", "lib"
4
+ end
5
+
6
+ require 'rspec'
7
+
8
+ require 'active_support/time' # For testing Date and TimeWithZone objects
9
+
10
+ require 'active_model'
11
+ require 'date_validator'
12
+
13
+ class TestRecord
14
+ include ActiveModel::Validations
15
+ attr_accessor :expiration_date
16
+
17
+ def initialize(expiration_date)
18
+ @expiration_date = expiration_date
19
+ end
20
+ end
metadata ADDED
@@ -0,0 +1,161 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: aratak_date_validator
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.6.1
6
+ platform: ruby
7
+ authors:
8
+ - Oriol Gual
9
+ - Josep M. Bach
10
+ - Josep Jaume Rey
11
+ autorequire:
12
+ bindir: bin
13
+ cert_chain: []
14
+
15
+ date: 2011-05-11 00:00:00 +03:00
16
+ default_executable:
17
+ dependencies:
18
+ - !ruby/object:Gem::Dependency
19
+ name: activemodel
20
+ prerelease: false
21
+ requirement: &id001 !ruby/object:Gem::Requirement
22
+ none: false
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 3.0.0
27
+ - - <
28
+ - !ruby/object:Gem::Version
29
+ version: "3.2"
30
+ type: :runtime
31
+ version_requirements: *id001
32
+ - !ruby/object:Gem::Dependency
33
+ name: rspec
34
+ prerelease: false
35
+ requirement: &id002 !ruby/object:Gem::Requirement
36
+ none: false
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 2.5.0
41
+ type: :development
42
+ version_requirements: *id002
43
+ - !ruby/object:Gem::Dependency
44
+ name: simplecov
45
+ prerelease: false
46
+ requirement: &id003 !ruby/object:Gem::Requirement
47
+ none: false
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: "0"
52
+ type: :development
53
+ version_requirements: *id003
54
+ - !ruby/object:Gem::Dependency
55
+ name: activesupport
56
+ prerelease: false
57
+ requirement: &id004 !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 3.0.0
63
+ - - <
64
+ - !ruby/object:Gem::Version
65
+ version: "3.2"
66
+ type: :development
67
+ version_requirements: *id004
68
+ - !ruby/object:Gem::Dependency
69
+ name: tzinfo
70
+ prerelease: false
71
+ requirement: &id005 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ~>
75
+ - !ruby/object:Gem::Version
76
+ version: 0.3.0
77
+ type: :development
78
+ version_requirements: *id005
79
+ - !ruby/object:Gem::Dependency
80
+ name: yard
81
+ prerelease: false
82
+ requirement: &id006 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: "0"
88
+ type: :development
89
+ version_requirements: *id006
90
+ - !ruby/object:Gem::Dependency
91
+ name: bluecloth
92
+ prerelease: false
93
+ requirement: &id007 !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: "0"
99
+ type: :development
100
+ version_requirements: *id007
101
+ description: A simple, ORM agnostic, Ruby 1.9 compatible date validator for Rails 3, based on ActiveModel. Currently supporting :after, :before, :after_or_equal_to and :before_or_equal_to options.
102
+ email:
103
+ - info@codegram.com
104
+ - alexey@osipenko.in.ua
105
+ executables: []
106
+
107
+ extensions: []
108
+
109
+ extra_rdoc_files: []
110
+
111
+ files:
112
+ - .bundle/config
113
+ - .document
114
+ - .gitignore
115
+ - .rspec
116
+ - .rvmrc
117
+ - Gemfile
118
+ - Gemfile.lock
119
+ - Rakefile
120
+ - Readme.md
121
+ - date_validator.gemspec
122
+ - lib/active_model/validations/date_validator.rb
123
+ - lib/date_validator.rb
124
+ - lib/date_validator/version.rb
125
+ - locales/ca.yml
126
+ - locales/en.yml
127
+ - locales/es.yml
128
+ - locales/nl.yml
129
+ - spec/date_validator_spec.rb
130
+ - spec/spec_helper.rb
131
+ has_rdoc: true
132
+ homepage: http://github.com/aratak/date_validator
133
+ licenses: []
134
+
135
+ post_install_message:
136
+ rdoc_options: []
137
+
138
+ require_paths:
139
+ - lib
140
+ required_ruby_version: !ruby/object:Gem::Requirement
141
+ none: false
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: "0"
146
+ required_rubygems_version: !ruby/object:Gem::Requirement
147
+ none: false
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: "0"
152
+ requirements: []
153
+
154
+ rubyforge_project: date_validator
155
+ rubygems_version: 1.6.2
156
+ signing_key:
157
+ specification_version: 3
158
+ summary: A simple, ORM agnostic, Ruby 1.9 compatible date validator for Rails 3, based on ActiveModel.
159
+ test_files:
160
+ - spec/date_validator_spec.rb
161
+ - spec/spec_helper.rb