validates_timeliness 3.0.4 → 3.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,6 @@
1
+ = 3.0.5 [2011-01-29]
2
+ * Fix for Conversion#parse when given nil value (closes issue #34)
3
+
1
4
  = 3.0.4 [2011-01-22]
2
5
  * Fix :between option which was being ignored (ebeigarts)
3
6
  * Use class_attribute to remove deprecated class_inheritable_accessor
data/Rakefile CHANGED
@@ -12,26 +12,28 @@ spec = Gem::Specification.new do |s|
12
12
  s.name = GEM_NAME
13
13
  s.version = GEM_VERSION
14
14
  s.platform = Gem::Platform::RUBY
15
- s.rubyforge_project = "validates_timeliness"
16
- s.has_rdoc = true
17
- s.extra_rdoc_files = ["README.rdoc", "CHANGELOG.rdoc", "LICENSE"]
18
15
  s.summary = %q{Date and time validation plugin for Rails which allows custom formats}
19
16
  s.description = s.summary
20
17
  s.author = "Adam Meehan"
21
18
  s.email = "adam.meehan@gmail.com"
22
19
  s.homepage = "http://github.com/adzap/validates_timeliness"
23
20
  s.require_path = 'lib'
24
- s.files = %w(validates_timeliness.gemspec LICENSE CHANGELOG.rdoc README.rdoc Rakefile) + Dir.glob("{lib,spec}/**/*")
21
+
25
22
  s.add_runtime_dependency 'timeliness', '~> 0.3.2'
23
+
24
+ s.files = `git ls-files`.split("\n") - %w{ .rspec .gitignore autotest/discover.rb Gemfile Gemfile.lock }
25
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
26
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
27
+
28
+ s.has_rdoc = true
29
+ s.extra_rdoc_files = ["README.rdoc", "CHANGELOG.rdoc", "LICENSE"]
26
30
  end
27
31
 
28
32
  desc 'Default: run specs.'
29
33
  task :default => :spec
30
34
 
31
35
  desc "Run specs"
32
- RSpec::Core::RakeTask.new do |t|
33
- t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default.
34
- end
36
+ RSpec::Core::RakeTask.new(:spec)
35
37
 
36
38
  desc "Generate code coverage"
37
39
  RSpec::Core::RakeTask.new(:coverage) do |t|
data/init.rb ADDED
@@ -0,0 +1 @@
1
+ require 'validates_timeliness'
@@ -56,6 +56,7 @@ module ValidatesTimeliness
56
56
  end
57
57
 
58
58
  def parse(value)
59
+ return nil if value.nil?
59
60
  if ValidatesTimeliness.use_plugin_parser
60
61
  Timeliness::Parser.parse(value, @type, :zone => (:current if @timezone_aware), :format => options[:format], :strict => false)
61
62
  else
@@ -1,3 +1,3 @@
1
1
  module ValidatesTimeliness
2
- VERSION = '3.0.4'
2
+ VERSION = '3.0.5'
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -6,10 +6,12 @@ require 'active_record'
6
6
  require 'action_view'
7
7
  require 'timecop'
8
8
  require 'rspec_tag_matchers'
9
- require 'model_helpers'
10
9
 
11
10
  require 'validates_timeliness'
12
- require 'test_model'
11
+
12
+ require 'support/test_model'
13
+ require 'support/model_helpers'
14
+ require 'support/config_helper'
13
15
 
14
16
  ValidatesTimeliness.setup do |c|
15
17
  c.extend_orms = [ :active_record ]
@@ -87,6 +89,8 @@ end
87
89
  Rspec.configure do |c|
88
90
  c.mock_with :rspec
89
91
  c.include(RspecTagMatchers)
92
+ c.include(ModelHelpers)
93
+ c.include(ConfigHelper)
90
94
  c.before do
91
95
  Person.reset_callbacks(:validate)
92
96
  PersonWithShim.timeliness_validated_attributes = []
@@ -0,0 +1,26 @@
1
+ module ConfigHelper
2
+ extend ActiveSupport::Concern
3
+
4
+ # Justin French tip
5
+ def with_config(preference_name, temporary_value)
6
+ old_value = ValidatesTimeliness.send(preference_name)
7
+ ValidatesTimeliness.send(:"#{preference_name}=", temporary_value)
8
+ yield
9
+ ensure
10
+ ValidatesTimeliness.send(:"#{preference_name}=", old_value)
11
+ end
12
+
13
+ module ClassMethods
14
+ def with_config(preference_name, temporary_value)
15
+ original_config_value = ValidatesTimeliness.send(preference_name)
16
+
17
+ before(:all) do
18
+ ValidatesTimeliness.send(:"#{preference_name}=", temporary_value)
19
+ end
20
+
21
+ after(:all) do
22
+ ValidatesTimeliness.send(:"#{preference_name}=", original_config_value)
23
+ end
24
+ end
25
+ end
26
+ end
File without changes
File without changes
@@ -41,6 +41,8 @@ describe ValidatesTimeliness::AttributeMethods do
41
41
  end
42
42
 
43
43
  context "with plugin parser" do
44
+ with_config(:use_plugin_parser, true)
45
+
44
46
  class PersonWithParser
45
47
  include TestModel
46
48
  include TestModelShim
@@ -52,10 +54,6 @@ describe ValidatesTimeliness::AttributeMethods do
52
54
  validates_datetime :birth_datetime
53
55
  end
54
56
 
55
- before :all do
56
- ValidatesTimeliness.use_plugin_parser = true
57
- end
58
-
59
57
  it 'should parse a string value' do
60
58
  Timeliness::Parser.should_receive(:parse)
61
59
  r = PersonWithParser.new
@@ -67,10 +65,6 @@ describe ValidatesTimeliness::AttributeMethods do
67
65
  r.birth_datetime = '2010-01-01 12:00'
68
66
  r.birth_datetime.zone == Time.zone.name
69
67
  end
70
-
71
- after :all do
72
- ValidatesTimeliness.use_plugin_parser = false
73
- end
74
68
  end
75
69
  end
76
70
 
@@ -3,13 +3,13 @@ require 'spec_helper'
3
3
  describe ValidatesTimeliness::Conversion do
4
4
  include ValidatesTimeliness::Conversion
5
5
 
6
+ let(:options) { Hash.new }
7
+
6
8
  before do
7
9
  Timecop.freeze(Time.mktime(2010, 1, 1, 0, 0, 0))
8
10
  end
9
11
 
10
12
  describe "#type_cast_value" do
11
- let(:options) { Hash.new }
12
-
13
13
  describe "for date type" do
14
14
  it "should return same value for date value" do
15
15
  type_cast_value(Date.new(2010, 1, 1), :date).should == Date.new(2010, 1, 1)
@@ -114,17 +114,10 @@ describe ValidatesTimeliness::Conversion do
114
114
  end
115
115
 
116
116
  describe "with custom dummy date" do
117
- before do
118
- @original_dummy_date = ValidatesTimeliness.dummy_date_for_time_type
119
- ValidatesTimeliness.dummy_date_for_time_type = [2010, 1, 1]
120
- end
121
-
122
117
  it 'should return dummy time with custom dummy date' do
123
- dummy_time(Time.utc(1999, 11, 22, 12, 34, 56)).should == Time.utc(2010, 1, 1, 12, 34, 56)
124
- end
125
-
126
- after do
127
- ValidatesTimeliness.dummy_date_for_time_type = @original_dummy_date
118
+ with_config(:dummy_date_for_time_type, [2010, 1, 1] ) do
119
+ dummy_time(Time.utc(1999, 11, 22, 12, 34, 56)).should == Time.utc(2010, 1, 1, 12, 34, 56)
120
+ end
128
121
  end
129
122
  end
130
123
  end
@@ -206,4 +199,36 @@ describe ValidatesTimeliness::Conversion do
206
199
  end
207
200
  end
208
201
  end
202
+
203
+ describe "#parse" do
204
+ context "use_plugin_parser setting is true" do
205
+ with_config(:use_plugin_parser, true)
206
+
207
+ it 'should use timeliness' do
208
+ Timeliness::Parser.should_receive(:parse)
209
+ parse('2000-01-01')
210
+ end
211
+ end
212
+
213
+ context "use_plugin_parser setting is false" do
214
+ with_config(:use_plugin_parser, false)
215
+
216
+ it 'should use Time.zone.parse attribute is timezone aware' do
217
+ @timezone_aware = true
218
+ Time.zone.should_receive(:parse)
219
+ parse('2000-01-01')
220
+ end
221
+
222
+ it 'should use value#to_time if use_plugin_parser setting is false and attribute is not timezone aware' do
223
+ @timezone_aware = false
224
+ value = '2000-01-01'
225
+ value.should_receive(:to_time)
226
+ parse(value)
227
+ end
228
+ end
229
+
230
+ it 'should return nil if value is nil' do
231
+ parse(nil).should be_nil
232
+ end
233
+ end
209
234
  end
@@ -4,9 +4,7 @@ describe ValidatesTimeliness::Extensions::DateTimeSelect do
4
4
  include ActionView::Helpers::DateHelper
5
5
  attr_reader :person, :params
6
6
 
7
- before :all do
8
- ValidatesTimeliness.use_plugin_parser = true
9
- end
7
+ with_config(:use_plugin_parser, true)
10
8
 
11
9
  before do
12
10
  @person = Person.new
@@ -177,8 +175,4 @@ describe ValidatesTimeliness::Extensions::DateTimeSelect do
177
175
  output.should_not have_tag('select[id=person_birth_time_6i] option[selected=selected]')
178
176
  end
179
177
  end
180
-
181
- after :all do
182
- ValidatesTimeliness.use_plugin_parser = false
183
- end
184
178
  end
@@ -33,16 +33,14 @@ describe ValidatesTimeliness, 'ActiveRecord' do
33
33
  end
34
34
 
35
35
  context "with plugin parser" do
36
+ with_config(:use_plugin_parser, true)
37
+
36
38
  class EmployeeWithParser < ActiveRecord::Base
37
39
  set_table_name 'employees'
38
40
  validates_date :birth_date
39
41
  validates_datetime :birth_datetime
40
42
  end
41
43
 
42
- before :all do
43
- ValidatesTimeliness.use_plugin_parser = true
44
- end
45
-
46
44
  it 'should parse a string value' do
47
45
  Timeliness::Parser.should_receive(:parse)
48
46
  r = EmployeeWithParser.new
@@ -54,11 +52,6 @@ describe ValidatesTimeliness, 'ActiveRecord' do
54
52
  r.birth_datetime = '2010-06-01 12:00'
55
53
  r.birth_datetime.utc_offset.should == 10.hours
56
54
  end
57
-
58
- after :all do
59
- Time.zone = 'Australia/Melbourne'
60
- ValidatesTimeliness.use_plugin_parser = false
61
- end
62
55
  end
63
56
  end
64
57
 
@@ -12,20 +12,20 @@ Mongoid.configure do |config|
12
12
  config.persist_in_safe_mode = false
13
13
  end
14
14
 
15
- class Article
16
- ::ValidatesTimeliness.use_plugin_parser = true
17
- include Mongoid::Document
18
- field :publish_date, :type => Date
19
- field :publish_time, :type => Time
20
- field :publish_datetime, :type => DateTime
21
- validates_date :publish_date, :allow_nil => true
22
- validates_time :publish_time, :allow_nil => true
23
- validates_datetime :publish_datetime, :allow_nil => true
24
- ::ValidatesTimeliness.use_plugin_parser = false
25
- end
26
-
27
15
  describe ValidatesTimeliness, 'Mongoid' do
28
16
 
17
+ class Article
18
+ ::ValidatesTimeliness.use_plugin_parser = true
19
+ include Mongoid::Document
20
+ field :publish_date, :type => Date
21
+ field :publish_time, :type => Time
22
+ field :publish_datetime, :type => DateTime
23
+ validates_date :publish_date, :allow_nil => true
24
+ validates_time :publish_time, :allow_nil => true
25
+ validates_datetime :publish_datetime, :allow_nil => true
26
+ ::ValidatesTimeliness.use_plugin_parser = false
27
+ end
28
+
29
29
  context "validation methods" do
30
30
  it 'should be defined on the class' do
31
31
  Article.should respond_to(:validates_date)
@@ -52,9 +52,7 @@ describe ValidatesTimeliness, 'Mongoid' do
52
52
  end
53
53
 
54
54
  context "with plugin parser" do
55
- before :all do
56
- ValidatesTimeliness.use_plugin_parser = true
57
- end
55
+ with_config(:use_plugin_parser, false)
58
56
 
59
57
  it 'should parse a string value' do
60
58
  Timeliness::Parser.should_receive(:parse)
@@ -67,10 +65,6 @@ describe ValidatesTimeliness, 'Mongoid' do
67
65
  r.publish_datetime = '2010-01-01 12:00'
68
66
  r.publish_datetime.should == Time.utc(2010,1,1,12,0)
69
67
  end
70
-
71
- after :all do
72
- ValidatesTimeliness.use_plugin_parser = false
73
- end
74
68
  end
75
69
  end
76
70
 
@@ -1,8 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe ValidatesTimeliness::Validator, ":after option" do
4
- include ModelHelpers
5
-
6
4
  describe "for date type" do
7
5
  before do
8
6
  Person.validates_date :birth_date, :after => Date.new(2010, 1, 1)
@@ -1,8 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe ValidatesTimeliness::Validator, ":before option" do
4
- include ModelHelpers
5
-
6
4
  describe "for date type" do
7
5
  before do
8
6
  Person.validates_date :birth_date, :before => Date.new(2010, 1, 1)
@@ -1,8 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe ValidatesTimeliness::Validator, ":is_at option" do
4
- include ModelHelpers
5
-
6
4
  before do
7
5
  Timecop.freeze(Time.local_time(2010, 1, 1, 0, 0, 0))
8
6
  end
@@ -1,8 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe ValidatesTimeliness::Validator, ":on_or_after option" do
4
- include ModelHelpers
5
-
6
4
  describe "for date type" do
7
5
  before do
8
6
  Person.validates_date :birth_date, :on_or_after => Date.new(2010, 1, 1)
@@ -1,8 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe ValidatesTimeliness::Validator, ":on_or_before option" do
4
- include ModelHelpers
5
-
6
4
  describe "for date type" do
7
5
  before do
8
6
  Person.validates_date :birth_date, :on_or_before => Date.new(2010, 1, 1)
@@ -1,7 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe ValidatesTimeliness::Validator do
4
- include ModelHelpers
5
4
  NIL = [nil]
6
5
 
7
6
  before do
@@ -118,9 +117,7 @@ describe ValidatesTimeliness::Validator do
118
117
 
119
118
  let(:person) { PersonWithFormatOption.new }
120
119
 
121
- before(:all) do
122
- ValidatesTimeliness.use_plugin_parser = true
123
- end
120
+ with_config(:use_plugin_parser, true)
124
121
 
125
122
  it "should be valid when value matches format" do
126
123
  person.birth_date = '11-12-1913'
@@ -133,10 +130,6 @@ describe ValidatesTimeliness::Validator do
133
130
  person.valid?
134
131
  person.errors[:birth_date].should include('is not a valid date')
135
132
  end
136
-
137
- after(:all) do
138
- ValidatesTimeliness.use_plugin_parser = false
139
- end
140
133
  end
141
134
 
142
135
  describe "restriction value errors" do
@@ -147,19 +140,17 @@ describe ValidatesTimeliness::Validator do
147
140
  end
148
141
 
149
142
  it "should be added when ignore_restriction_errors is false" do
150
- ValidatesTimeliness.ignore_restriction_errors = false
151
- person.valid?
152
- person.errors[:birth_date].first.should match("Error occurred validating birth_date for :is_at restriction")
143
+ with_config(:ignore_restriction_errors, false) do
144
+ person.valid?
145
+ person.errors[:birth_date].first.should match("Error occurred validating birth_date for :is_at restriction")
146
+ end
153
147
  end
154
148
 
155
149
  it "should not be added when ignore_restriction_errors is true" do
156
- ValidatesTimeliness.ignore_restriction_errors = true
157
- person.valid?
158
- person.errors[:birth_date].should be_empty
159
- end
160
-
161
- after :all do
162
- ValidatesTimeliness.ignore_restriction_errors = false
150
+ with_config(:ignore_restriction_errors, true) do
151
+ person.valid?
152
+ person.errors[:birth_date].should be_empty
153
+ end
163
154
  end
164
155
  end
165
156
 
@@ -2,20 +2,20 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{validates_timeliness}
5
- s.version = "3.0.4"
5
+ s.version = "3.0.5"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Adam Meehan"]
9
- s.date = %q{2011-01-22}
9
+ s.date = %q{2011-01-29}
10
10
  s.description = %q{Date and time validation plugin for Rails which allows custom formats}
11
11
  s.email = %q{adam.meehan@gmail.com}
12
12
  s.extra_rdoc_files = ["README.rdoc", "CHANGELOG.rdoc", "LICENSE"]
13
- s.files = ["validates_timeliness.gemspec", "LICENSE", "CHANGELOG.rdoc", "README.rdoc", "Rakefile", "lib/generators", "lib/generators/validates_timeliness", "lib/generators/validates_timeliness/install_generator.rb", "lib/generators/validates_timeliness/templates", "lib/generators/validates_timeliness/templates/en.yml", "lib/generators/validates_timeliness/templates/validates_timeliness.rb", "lib/validates_timeliness", "lib/validates_timeliness/attribute_methods.rb", "lib/validates_timeliness/conversion.rb", "lib/validates_timeliness/extensions", "lib/validates_timeliness/extensions/date_time_select.rb", "lib/validates_timeliness/extensions/multiparameter_handler.rb", "lib/validates_timeliness/extensions.rb", "lib/validates_timeliness/helper_methods.rb", "lib/validates_timeliness/orm", "lib/validates_timeliness/orm/active_record.rb", "lib/validates_timeliness/orm/mongoid.rb", "lib/validates_timeliness/railtie.rb", "lib/validates_timeliness/validator.rb", "lib/validates_timeliness/version.rb", "lib/validates_timeliness.rb", "spec/model_helpers.rb", "spec/spec_helper.rb", "spec/test_model.rb", "spec/validates_timeliness", "spec/validates_timeliness/attribute_methods_spec.rb", "spec/validates_timeliness/conversion_spec.rb", "spec/validates_timeliness/extensions", "spec/validates_timeliness/extensions/date_time_select_spec.rb", "spec/validates_timeliness/extensions/multiparameter_handler_spec.rb", "spec/validates_timeliness/helper_methods_spec.rb", "spec/validates_timeliness/orm", "spec/validates_timeliness/orm/active_record_spec.rb", "spec/validates_timeliness/orm/mongoid_spec.rb", "spec/validates_timeliness/validator", "spec/validates_timeliness/validator/after_spec.rb", "spec/validates_timeliness/validator/before_spec.rb", "spec/validates_timeliness/validator/is_at_spec.rb", "spec/validates_timeliness/validator/on_or_after_spec.rb", "spec/validates_timeliness/validator/on_or_before_spec.rb", "spec/validates_timeliness/validator_spec.rb", "spec/validates_timeliness_spec.rb"]
13
+ s.files = ["CHANGELOG.rdoc", "LICENSE", "README.rdoc", "Rakefile", "init.rb", "lib/generators/validates_timeliness/install_generator.rb", "lib/generators/validates_timeliness/templates/en.yml", "lib/generators/validates_timeliness/templates/validates_timeliness.rb", "lib/validates_timeliness.rb", "lib/validates_timeliness/attribute_methods.rb", "lib/validates_timeliness/conversion.rb", "lib/validates_timeliness/extensions.rb", "lib/validates_timeliness/extensions/date_time_select.rb", "lib/validates_timeliness/extensions/multiparameter_handler.rb", "lib/validates_timeliness/helper_methods.rb", "lib/validates_timeliness/orm/active_record.rb", "lib/validates_timeliness/orm/mongoid.rb", "lib/validates_timeliness/railtie.rb", "lib/validates_timeliness/validator.rb", "lib/validates_timeliness/version.rb", "spec/spec_helper.rb", "spec/support/config_helper.rb", "spec/support/model_helpers.rb", "spec/support/test_model.rb", "spec/validates_timeliness/attribute_methods_spec.rb", "spec/validates_timeliness/conversion_spec.rb", "spec/validates_timeliness/extensions/date_time_select_spec.rb", "spec/validates_timeliness/extensions/multiparameter_handler_spec.rb", "spec/validates_timeliness/helper_methods_spec.rb", "spec/validates_timeliness/orm/active_record_spec.rb", "spec/validates_timeliness/orm/mongoid_spec.rb", "spec/validates_timeliness/validator/after_spec.rb", "spec/validates_timeliness/validator/before_spec.rb", "spec/validates_timeliness/validator/is_at_spec.rb", "spec/validates_timeliness/validator/on_or_after_spec.rb", "spec/validates_timeliness/validator/on_or_before_spec.rb", "spec/validates_timeliness/validator_spec.rb", "spec/validates_timeliness_spec.rb", "validates_timeliness.gemspec"]
14
14
  s.homepage = %q{http://github.com/adzap/validates_timeliness}
15
15
  s.require_paths = ["lib"]
16
- s.rubyforge_project = %q{validates_timeliness}
17
16
  s.rubygems_version = %q{1.3.7}
18
17
  s.summary = %q{Date and time validation plugin for Rails which allows custom formats}
18
+ s.test_files = ["spec/spec_helper.rb", "spec/support/config_helper.rb", "spec/support/model_helpers.rb", "spec/support/test_model.rb", "spec/validates_timeliness/attribute_methods_spec.rb", "spec/validates_timeliness/conversion_spec.rb", "spec/validates_timeliness/extensions/date_time_select_spec.rb", "spec/validates_timeliness/extensions/multiparameter_handler_spec.rb", "spec/validates_timeliness/helper_methods_spec.rb", "spec/validates_timeliness/orm/active_record_spec.rb", "spec/validates_timeliness/orm/mongoid_spec.rb", "spec/validates_timeliness/validator/after_spec.rb", "spec/validates_timeliness/validator/before_spec.rb", "spec/validates_timeliness/validator/is_at_spec.rb", "spec/validates_timeliness/validator/on_or_after_spec.rb", "spec/validates_timeliness/validator/on_or_before_spec.rb", "spec/validates_timeliness/validator_spec.rb", "spec/validates_timeliness_spec.rb"]
19
19
 
20
20
  if s.respond_to? :specification_version then
21
21
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validates_timeliness
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 4
10
- version: 3.0.4
9
+ - 5
10
+ version: 3.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Adam Meehan
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-22 00:00:00 +11:00
18
+ date: 2011-01-29 00:00:00 +11:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -45,29 +45,30 @@ extra_rdoc_files:
45
45
  - CHANGELOG.rdoc
46
46
  - LICENSE
47
47
  files:
48
- - validates_timeliness.gemspec
49
- - LICENSE
50
48
  - CHANGELOG.rdoc
49
+ - LICENSE
51
50
  - README.rdoc
52
51
  - Rakefile
52
+ - init.rb
53
53
  - lib/generators/validates_timeliness/install_generator.rb
54
54
  - lib/generators/validates_timeliness/templates/en.yml
55
55
  - lib/generators/validates_timeliness/templates/validates_timeliness.rb
56
+ - lib/validates_timeliness.rb
56
57
  - lib/validates_timeliness/attribute_methods.rb
57
58
  - lib/validates_timeliness/conversion.rb
59
+ - lib/validates_timeliness/extensions.rb
58
60
  - lib/validates_timeliness/extensions/date_time_select.rb
59
61
  - lib/validates_timeliness/extensions/multiparameter_handler.rb
60
- - lib/validates_timeliness/extensions.rb
61
62
  - lib/validates_timeliness/helper_methods.rb
62
63
  - lib/validates_timeliness/orm/active_record.rb
63
64
  - lib/validates_timeliness/orm/mongoid.rb
64
65
  - lib/validates_timeliness/railtie.rb
65
66
  - lib/validates_timeliness/validator.rb
66
67
  - lib/validates_timeliness/version.rb
67
- - lib/validates_timeliness.rb
68
- - spec/model_helpers.rb
69
68
  - spec/spec_helper.rb
70
- - spec/test_model.rb
69
+ - spec/support/config_helper.rb
70
+ - spec/support/model_helpers.rb
71
+ - spec/support/test_model.rb
71
72
  - spec/validates_timeliness/attribute_methods_spec.rb
72
73
  - spec/validates_timeliness/conversion_spec.rb
73
74
  - spec/validates_timeliness/extensions/date_time_select_spec.rb
@@ -82,6 +83,7 @@ files:
82
83
  - spec/validates_timeliness/validator/on_or_before_spec.rb
83
84
  - spec/validates_timeliness/validator_spec.rb
84
85
  - spec/validates_timeliness_spec.rb
86
+ - validates_timeliness.gemspec
85
87
  has_rdoc: true
86
88
  homepage: http://github.com/adzap/validates_timeliness
87
89
  licenses: []
@@ -111,10 +113,27 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
113
  version: "0"
112
114
  requirements: []
113
115
 
114
- rubyforge_project: validates_timeliness
116
+ rubyforge_project:
115
117
  rubygems_version: 1.3.7
116
118
  signing_key:
117
119
  specification_version: 3
118
120
  summary: Date and time validation plugin for Rails which allows custom formats
119
- test_files: []
120
-
121
+ test_files:
122
+ - spec/spec_helper.rb
123
+ - spec/support/config_helper.rb
124
+ - spec/support/model_helpers.rb
125
+ - spec/support/test_model.rb
126
+ - spec/validates_timeliness/attribute_methods_spec.rb
127
+ - spec/validates_timeliness/conversion_spec.rb
128
+ - spec/validates_timeliness/extensions/date_time_select_spec.rb
129
+ - spec/validates_timeliness/extensions/multiparameter_handler_spec.rb
130
+ - spec/validates_timeliness/helper_methods_spec.rb
131
+ - spec/validates_timeliness/orm/active_record_spec.rb
132
+ - spec/validates_timeliness/orm/mongoid_spec.rb
133
+ - spec/validates_timeliness/validator/after_spec.rb
134
+ - spec/validates_timeliness/validator/before_spec.rb
135
+ - spec/validates_timeliness/validator/is_at_spec.rb
136
+ - spec/validates_timeliness/validator/on_or_after_spec.rb
137
+ - spec/validates_timeliness/validator/on_or_before_spec.rb
138
+ - spec/validates_timeliness/validator_spec.rb
139
+ - spec/validates_timeliness_spec.rb