validates_timeliness 4.1.1 → 5.0.0.alpha1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +8 -12
- data/CHANGELOG.rdoc +7 -11
- data/README.rdoc +4 -5
- data/gemfiles/rails_5_0.gemfile +18 -0
- data/gemfiles/rails_5_1.gemfile +18 -0
- data/gemfiles/rails_5_2.gemfile +18 -0
- data/lib/validates_timeliness.rb +1 -1
- data/lib/validates_timeliness/attribute_methods.rb +32 -71
- data/lib/validates_timeliness/{conversion.rb → converter.rb} +26 -14
- data/lib/validates_timeliness/extensions.rb +2 -2
- data/lib/validates_timeliness/extensions/date_time_select.rb +23 -27
- data/lib/validates_timeliness/extensions/multiparameter_handler.rb +47 -66
- data/lib/validates_timeliness/orm/active_model.rb +53 -2
- data/lib/validates_timeliness/orm/active_record.rb +1 -83
- data/lib/validates_timeliness/railtie.rb +0 -8
- data/lib/validates_timeliness/validator.rb +18 -15
- data/lib/validates_timeliness/version.rb +1 -1
- data/spec/spec_helper.rb +2 -2
- data/spec/support/test_model.rb +4 -2
- data/spec/validates_timeliness/attribute_methods_spec.rb +0 -15
- data/spec/validates_timeliness/{conversion_spec.rb → converter_spec.rb} +64 -49
- data/spec/validates_timeliness/extensions/date_time_select_spec.rb +27 -27
- data/spec/validates_timeliness/extensions/multiparameter_handler_spec.rb +10 -10
- data/spec/validates_timeliness/orm/active_record_spec.rb +72 -136
- data/validates_timeliness.gemspec +1 -1
- metadata +15 -21
- data/gemfiles/rails_4_2.gemfile +0 -14
- data/spec/validates_timeliness/railtie_spec.rb +0 -22
@@ -17,5 +17,5 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
18
|
s.extra_rdoc_files = ["README.rdoc", "CHANGELOG.rdoc", "LICENSE"]
|
19
19
|
|
20
|
-
s.add_runtime_dependency(%q<timeliness>, ["
|
20
|
+
s.add_runtime_dependency(%q<timeliness>, ["~> 0.3.8"])
|
21
21
|
end
|
metadata
CHANGED
@@ -1,35 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: validates_timeliness
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.0.alpha1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Meehan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: timeliness
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.3.
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '1'
|
19
|
+
version: 0.3.8
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- - "
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 0.3.10
|
30
|
-
- - "<"
|
24
|
+
- - "~>"
|
31
25
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
26
|
+
version: 0.3.8
|
33
27
|
description: Adds validation methods to ActiveModel for validating dates and times.
|
34
28
|
Works with multiple ORMS.
|
35
29
|
email: adam.meehan@gmail.com
|
@@ -45,14 +39,16 @@ files:
|
|
45
39
|
- LICENSE
|
46
40
|
- README.rdoc
|
47
41
|
- Rakefile
|
48
|
-
- gemfiles/
|
42
|
+
- gemfiles/rails_5_0.gemfile
|
43
|
+
- gemfiles/rails_5_1.gemfile
|
44
|
+
- gemfiles/rails_5_2.gemfile
|
49
45
|
- init.rb
|
50
46
|
- lib/generators/validates_timeliness/install_generator.rb
|
51
47
|
- lib/generators/validates_timeliness/templates/en.yml
|
52
48
|
- lib/generators/validates_timeliness/templates/validates_timeliness.rb
|
53
49
|
- lib/validates_timeliness.rb
|
54
50
|
- lib/validates_timeliness/attribute_methods.rb
|
55
|
-
- lib/validates_timeliness/
|
51
|
+
- lib/validates_timeliness/converter.rb
|
56
52
|
- lib/validates_timeliness/extensions.rb
|
57
53
|
- lib/validates_timeliness/extensions/date_time_select.rb
|
58
54
|
- lib/validates_timeliness/extensions/multiparameter_handler.rb
|
@@ -68,12 +64,11 @@ files:
|
|
68
64
|
- spec/support/tag_matcher.rb
|
69
65
|
- spec/support/test_model.rb
|
70
66
|
- spec/validates_timeliness/attribute_methods_spec.rb
|
71
|
-
- spec/validates_timeliness/
|
67
|
+
- spec/validates_timeliness/converter_spec.rb
|
72
68
|
- spec/validates_timeliness/extensions/date_time_select_spec.rb
|
73
69
|
- spec/validates_timeliness/extensions/multiparameter_handler_spec.rb
|
74
70
|
- spec/validates_timeliness/helper_methods_spec.rb
|
75
71
|
- spec/validates_timeliness/orm/active_record_spec.rb
|
76
|
-
- spec/validates_timeliness/railtie_spec.rb
|
77
72
|
- spec/validates_timeliness/validator/after_spec.rb
|
78
73
|
- spec/validates_timeliness/validator/before_spec.rb
|
79
74
|
- spec/validates_timeliness/validator/is_at_spec.rb
|
@@ -97,12 +92,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
97
92
|
version: '0'
|
98
93
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
99
94
|
requirements:
|
100
|
-
- - "
|
95
|
+
- - ">"
|
101
96
|
- !ruby/object:Gem::Version
|
102
|
-
version:
|
97
|
+
version: 1.3.1
|
103
98
|
requirements: []
|
104
99
|
rubyforge_project:
|
105
|
-
rubygems_version: 2.7.
|
100
|
+
rubygems_version: 2.7.3
|
106
101
|
signing_key:
|
107
102
|
specification_version: 4
|
108
103
|
summary: Date and time validation plugin for Rails which allows custom formats
|
@@ -113,12 +108,11 @@ test_files:
|
|
113
108
|
- spec/support/tag_matcher.rb
|
114
109
|
- spec/support/test_model.rb
|
115
110
|
- spec/validates_timeliness/attribute_methods_spec.rb
|
116
|
-
- spec/validates_timeliness/
|
111
|
+
- spec/validates_timeliness/converter_spec.rb
|
117
112
|
- spec/validates_timeliness/extensions/date_time_select_spec.rb
|
118
113
|
- spec/validates_timeliness/extensions/multiparameter_handler_spec.rb
|
119
114
|
- spec/validates_timeliness/helper_methods_spec.rb
|
120
115
|
- spec/validates_timeliness/orm/active_record_spec.rb
|
121
|
-
- spec/validates_timeliness/railtie_spec.rb
|
122
116
|
- spec/validates_timeliness/validator/after_spec.rb
|
123
117
|
- spec/validates_timeliness/validator/before_spec.rb
|
124
118
|
- spec/validates_timeliness/validator/is_at_spec.rb
|
data/gemfiles/rails_4_2.gemfile
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "rails", "~> 4.2.8"
|
6
|
-
gem "rspec", "~> 3.6.0"
|
7
|
-
gem "rspec-rails", "~> 3.6.0"
|
8
|
-
gem "timecop"
|
9
|
-
gem "byebug"
|
10
|
-
gem "appraisal"
|
11
|
-
gem "sqlite3", "~> 1.3.0"
|
12
|
-
gem "nokogiri", "1.6.7"
|
13
|
-
|
14
|
-
gemspec path: "../"
|
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'validates_timeliness/railtie'
|
2
|
-
|
3
|
-
RSpec.describe ValidatesTimeliness::Railtie do
|
4
|
-
context "intializers" do
|
5
|
-
context "validates_timeliness.initialize_timeliness_ambiguous_date_format" do
|
6
|
-
it 'should set the timeliness default ambiguous date format from the current format' do
|
7
|
-
expect(Timeliness.configuration.ambiguous_date_format).to eq :us
|
8
|
-
ValidatesTimeliness.parser.use_euro_formats
|
9
|
-
|
10
|
-
initializer("validates_timeliness.initialize_timeliness_ambiguous_date_format").run
|
11
|
-
|
12
|
-
expect(Timeliness.configuration.ambiguous_date_format).to eq :euro
|
13
|
-
end
|
14
|
-
end if Timeliness.respond_to?(:ambiguous_date_format)
|
15
|
-
|
16
|
-
def initializer(name)
|
17
|
-
ValidatesTimeliness::Railtie.initializers.find { |i|
|
18
|
-
i.name == name
|
19
|
-
} || raise("Initializer #{name} not found")
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|