validates_timeliness 6.0.0.beta2 → 7.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +8 -19
- data/CHANGELOG.md +337 -0
- data/README.md +151 -153
- data/gemfiles/{rails_6_0.gemfile → rails_7_0.gemfile} +2 -3
- data/gemfiles/rails_edge.gemfile +0 -1
- data/lib/validates_timeliness/railtie.rb +1 -1
- data/lib/validates_timeliness/version.rb +1 -1
- data/spec/spec_helper.rb +3 -2
- data/spec/validates_timeliness/converter_spec.rb +5 -5
- data/spec/validates_timeliness/extensions/date_time_select_spec.rb +6 -2
- data/spec/validates_timeliness/orm/active_model_spec.rb +0 -0
- data/spec/validates_timeliness/validator/is_at_spec.rb +5 -1
- data/spec/validates_timeliness/validator_spec.rb +5 -1
- data/validates_timeliness.gemspec +13 -3
- metadata +18 -13
- data/CHANGELOG.rdoc +0 -222
- data/gemfiles/rails_6_1.gemfile +0 -14
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: validates_timeliness
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 7.0.0.beta1
|
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: 2022-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 7.0.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '8'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 7.0.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '8'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: timeliness
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -57,17 +57,16 @@ executables: []
|
|
57
57
|
extensions: []
|
58
58
|
extra_rdoc_files:
|
59
59
|
- README.md
|
60
|
-
- CHANGELOG.
|
60
|
+
- CHANGELOG.md
|
61
61
|
- LICENSE
|
62
62
|
files:
|
63
63
|
- ".github/dependabot.yml"
|
64
64
|
- ".github/workflows/ci.yml"
|
65
|
-
- CHANGELOG.
|
65
|
+
- CHANGELOG.md
|
66
66
|
- LICENSE
|
67
67
|
- README.md
|
68
68
|
- Rakefile
|
69
|
-
- gemfiles/
|
70
|
-
- gemfiles/rails_6_1.gemfile
|
69
|
+
- gemfiles/rails_7_0.gemfile
|
71
70
|
- gemfiles/rails_edge.gemfile
|
72
71
|
- init.rb
|
73
72
|
- lib/generators/validates_timeliness/install_generator.rb
|
@@ -95,6 +94,7 @@ files:
|
|
95
94
|
- spec/validates_timeliness/extensions/date_time_select_spec.rb
|
96
95
|
- spec/validates_timeliness/extensions/multiparameter_handler_spec.rb
|
97
96
|
- spec/validates_timeliness/helper_methods_spec.rb
|
97
|
+
- spec/validates_timeliness/orm/active_model_spec.rb
|
98
98
|
- spec/validates_timeliness/orm/active_record_spec.rb
|
99
99
|
- spec/validates_timeliness/railtie_spec.rb
|
100
100
|
- spec/validates_timeliness/validator/after_spec.rb
|
@@ -105,10 +105,14 @@ files:
|
|
105
105
|
- spec/validates_timeliness/validator_spec.rb
|
106
106
|
- spec/validates_timeliness_spec.rb
|
107
107
|
- validates_timeliness.gemspec
|
108
|
-
homepage:
|
108
|
+
homepage: https://github.com/adzap/validates_timeliness
|
109
109
|
licenses:
|
110
110
|
- MIT
|
111
|
-
metadata:
|
111
|
+
metadata:
|
112
|
+
bug_tracker_uri: https://github.com/adzap/validates_timeliness/issues
|
113
|
+
changelog_uri: https://github.com/adzap/validates_timeliness/blob/master/CHANGELOG.md
|
114
|
+
source_code_uri: https://github.com/adzap/validates_timeliness
|
115
|
+
wiki_uri: https://github.com/adzap/validates_timeliness/wiki
|
112
116
|
post_install_message:
|
113
117
|
rdoc_options: []
|
114
118
|
require_paths:
|
@@ -124,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
128
|
- !ruby/object:Gem::Version
|
125
129
|
version: 1.3.1
|
126
130
|
requirements: []
|
127
|
-
rubygems_version: 3.
|
131
|
+
rubygems_version: 3.1.6
|
128
132
|
signing_key:
|
129
133
|
specification_version: 4
|
130
134
|
summary: Date and time validation plugin for Rails which allows custom formats
|
@@ -139,6 +143,7 @@ test_files:
|
|
139
143
|
- spec/validates_timeliness/extensions/date_time_select_spec.rb
|
140
144
|
- spec/validates_timeliness/extensions/multiparameter_handler_spec.rb
|
141
145
|
- spec/validates_timeliness/helper_methods_spec.rb
|
146
|
+
- spec/validates_timeliness/orm/active_model_spec.rb
|
142
147
|
- spec/validates_timeliness/orm/active_record_spec.rb
|
143
148
|
- spec/validates_timeliness/railtie_spec.rb
|
144
149
|
- spec/validates_timeliness/validator/after_spec.rb
|
data/CHANGELOG.rdoc
DELETED
@@ -1,222 +0,0 @@
|
|
1
|
-
= 5.0.0 [2021-04-03]
|
2
|
-
* Fix DateTimeSelect extension support (AquisTech)
|
3
|
-
* Relaxed Timeliness dependency version which allows for >= 0.4.0 with
|
4
|
-
threadsafety fix for use_us_formats and use_euro_formats for hot switching
|
5
|
-
in a request.
|
6
|
-
* Add initializer to ensure Timeliness v0.4+ ambiguous date config is set
|
7
|
-
correctly when using `use_euro_formats` or `remove_use_formats'.
|
8
|
-
* Add Ruby 3 compatibility
|
9
|
-
* Add Rails 6.1 compatibility
|
10
|
-
|
11
|
-
Breaking Changes
|
12
|
-
* Update Multiparameter extension to use ActiveRecord type classes with multiparameter handling
|
13
|
-
which stores a hash of multiparamter values as the value before type cast, no longer a mushed datetime string
|
14
|
-
* Removed all custom plugin attribute methods and method overrides in favour using ActiveModel type system
|
15
|
-
|
16
|
-
= 4.1.0 [2019-06-11]
|
17
|
-
* Relaxed Timeliness dependency version to >= 0.3.10 and < 1, which allows
|
18
|
-
version 0.4 with threadsafety fix for use_us_formats and use_euro_formats
|
19
|
-
hot switching in a request.
|
20
|
-
|
21
|
-
= 4.0.2 [2016-01-07]
|
22
|
-
* Fix undefine_generated_methods ivar guard setting to false
|
23
|
-
|
24
|
-
= 4.0.1 [2016-01-06]
|
25
|
-
* Fix undefine_generated_methods thread locking bug
|
26
|
-
* Created an ActiveModel ORM, for manual require if using without any full blown ORM
|
27
|
-
|
28
|
-
= 4.0.0 [2015-12-29]
|
29
|
-
* Extracted mongoid support into https://github.com/adzap/validates_timeliness-mongoid which is broken (not supported anymore).
|
30
|
-
* Fixed Rails 4.0, 4.1 and 4.2 compatability issues
|
31
|
-
* Upgrade specs to RSpec 3
|
32
|
-
* Added travis config
|
33
|
-
* Huge thanks to @johncarney for keeping it alive with his fork (https://github.com/johncarney/validates_timeliness)
|
34
|
-
|
35
|
-
= 3.0.15 [2015-12-29]
|
36
|
-
* Fixes mongoid 3 support and removes mongoid 2 support(johnnyshields)
|
37
|
-
* Some documentation/comments tidying
|
38
|
-
* Some general tidying up
|
39
|
-
|
40
|
-
= 3.0.14 [2012-08-23]
|
41
|
-
* Fix for using validates :timeliness => {} form to correctly add attributes to timeliness validated attributes.
|
42
|
-
|
43
|
-
= 3.0.13 [2012-08-21]
|
44
|
-
* Fix ActiveRecord issues with using plugin parser by using old way of caching values.
|
45
|
-
* Allow any ActiveRecord non-column attribute to be validated
|
46
|
-
|
47
|
-
= 3.0.12 [2012-06-23]
|
48
|
-
* Fix load order issue when relying on Railtie to load ActiveRecord extension
|
49
|
-
|
50
|
-
= 3.0.11 [2012-04-01]
|
51
|
-
* Change dependency on Timeliness version due to a broken release
|
52
|
-
|
53
|
-
= 3.0.10 [2012-03-26]
|
54
|
-
* Fix for ActiveRecord shim and validation with :allow_blank => true in AR 3.1+. Fixes issue#52.
|
55
|
-
|
56
|
-
= 3.0.9 [2012-03-26]
|
57
|
-
* ActiveRecord 3.1+ suport
|
58
|
-
* Fixes for multiparameter extension with empty date values (thanks @mogox, @Sharagoz)
|
59
|
-
|
60
|
-
= 3.0.8 [2011-12-24]
|
61
|
-
* Remove deprecated InstanceMethods module when using AS::Concern (carlosantoniodasilva)
|
62
|
-
* Update Mongoid shim for v2.3 compatability.
|
63
|
-
|
64
|
-
= 3.0.7 [2011-09-21]
|
65
|
-
* Fix ActiveRecord before_type_cast extension for non-dirty attributes.
|
66
|
-
* Don't override AR before_type_cast for >= 3.1.0 which now has it's own implementation for date/time attributes.
|
67
|
-
* Fix DateTimeSelect extension to convert params to integers (#45)
|
68
|
-
* Add #change method to DateTimeSelect extension (@trusche, #45)
|
69
|
-
* Cleanup Mongoid shim.
|
70
|
-
|
71
|
-
= 3.0.6 [2011-05-09]
|
72
|
-
* Fix for AR type conversion for date columns when using plugin parser.
|
73
|
-
* Add timeliness_type_cast_code for ORM specific type casting after parsing.
|
74
|
-
|
75
|
-
= 3.0.5 [2011-01-29]
|
76
|
-
* Fix for Conversion#parse when given nil value (closes issue #34)
|
77
|
-
|
78
|
-
= 3.0.4 [2011-01-22]
|
79
|
-
* Fix :between option which was being ignored (ebeigarts)
|
80
|
-
* Use class_attribute to remove deprecated class_inheritable_accessor
|
81
|
-
* Namespace copied validator class to ActiveModel::Validations::Timeliness for :timeliness option
|
82
|
-
|
83
|
-
= 3.0.3 [2010-12-11]
|
84
|
-
* Fix validation of values which don't respond to to_date or to_time (renatoelias)
|
85
|
-
|
86
|
-
= 3.0.2 [2010-12-04]
|
87
|
-
* Fix AR multiparameter extension for Date columns
|
88
|
-
* Update to Timeliness 0.3.2 for zone abbreviation and offset support
|
89
|
-
|
90
|
-
= 3.0.1 [2010-11-02]
|
91
|
-
* Generate timeliness write methods in an included module to allow overriding in model class (josevalim)
|
92
|
-
|
93
|
-
= 3.0.0 [2010-10-18]
|
94
|
-
* Rails 3 and ActiveModel compatibility
|
95
|
-
* Uses ActiveModel::EachValidator as validator base class.
|
96
|
-
* Configuration settings stored in ValidatesTimeliness module only. ValidatesTimeliness.setup block to configure.
|
97
|
-
* Parser extracted to the Timeliness gem http://github.com/adzap/timeliness
|
98
|
-
* Parser is disabled by default. See initializer for enabling it.
|
99
|
-
* Removed RSpec matcher. Encouraged poor specs by copy-pasting from spec to model, or worse, the other way round.
|
100
|
-
* Method override for parsing and before type cast values is on validated attributes only. Old version handled all date/datetime columns, validates or not. Too intrusive.
|
101
|
-
* Add validation helpers to classes using extend_orms config setting. e.g. conf.extend_orms = [ :active_record ]
|
102
|
-
* Changed :between option so it is split into :on_or_after and :on_or_before option values. The error message for either failing check will be used instead of a between error message.
|
103
|
-
* Provides :timeliness option key for validates class method. Be sure to pass :type option as well e.g. :type => :date.
|
104
|
-
* Allows validation methods to be called on record instances as per ActiveModel API.
|
105
|
-
* Performs parsing (optional) and raw value caching (before_type_cast) on validated attributes only. It used to be all date, time and datetime attributes.
|
106
|
-
|
107
|
-
= 2.3.1 [2010-03-19]
|
108
|
-
* Fixed bug where custom attribute writer method for date/times were being overriden
|
109
|
-
|
110
|
-
= 2.3.0 [2010-02-04]
|
111
|
-
* Backwards incompatible change to :equal_to option. Fixed error message clash with :equal_to option which exists in Rails already. Option is now :is_at.
|
112
|
-
* Fixed I18n support so it returns missing translation message instead of error
|
113
|
-
* Fixed attribute method bug. Write method was bypassed when method was first generated and used Rails default parser.
|
114
|
-
* Fixed date/time selects when using enable_datetime_select_extension! when some values empty
|
115
|
-
* Fixed ISO8601 datetime format which is now split into two formats
|
116
|
-
* Changed I18n error value format to fallback to global default if missing in locale
|
117
|
-
* Refactored date/time select invalid value extension to use param values. Functionality will be extracted from plugin for v3.
|
118
|
-
|
119
|
-
= 2.2.2 [2009-09-19]
|
120
|
-
* Fixed dummy_time using make_time to respect timezone. Fixes 1.9.1 bug.
|
121
|
-
|
122
|
-
= 2.2.1 [2009-09-12]
|
123
|
-
* Fixed dummy date part for time types in Validator.type_cast_value
|
124
|
-
* No more core extensions! Removed dummy_time methods.
|
125
|
-
|
126
|
-
= 2.2.0 [2009-09-12]
|
127
|
-
* Ruby 1.9 support!
|
128
|
-
* Customise dummy date values for time types. See DUMMY DATE FOR TIME TYPES.
|
129
|
-
* Fixed matcher conflict with Shoulda. Load plugin matcher manually now see matcher section in README
|
130
|
-
* Fixed :ignore_usec when used with :with_time or :with_date
|
131
|
-
* Some clean up and refactoring
|
132
|
-
|
133
|
-
= 2.1.0 [2009-06-20]
|
134
|
-
* Added ambiguous year threshold setting in Formats class to customize the threshold for 2 digit years (See README)
|
135
|
-
* Fixed interpolation values in custom error message for Rails 2.2+
|
136
|
-
* Fixed custom I18n local override of en locale
|
137
|
-
* Dramatically simplified ActiveRecord monkey patching and hackery
|
138
|
-
|
139
|
-
= 2.0.0 [2009-04-12]
|
140
|
-
* Error value formats are now specified in the i18n locale file instead of updating plugin hash. See OTHER CUSTOMISATION section in README.
|
141
|
-
* Date/time select helper extension is disabled by default. To enable see DISPLAY INVALID VALUES IN DATE HELPERS section in README to enable.
|
142
|
-
* Added :format option to limit validation to a single format if desired
|
143
|
-
* Matcher now supports :equal_to option
|
144
|
-
* Formats.parse can take :include_offset option to include offset value from string in seconds, if string contains an offset. Offset not used in rest of plugin yet.
|
145
|
-
* Refactored to remove as much plugin code from ActiveRecord as possible.
|
146
|
-
|
147
|
-
= 1.1.7 [2009-03-26]
|
148
|
-
* Minor change to multiparameter attributes which I had not properly implemented for chaining
|
149
|
-
|
150
|
-
= 1.1.6 [2009-03-19]
|
151
|
-
* Rail 2.3 support
|
152
|
-
* Added :with_date and :with_time options. They allow an attribute to be combined with another attribute or value to make a datetime value for validation against the temporal restrictions
|
153
|
-
* Added :equal_to option
|
154
|
-
* Option key validation
|
155
|
-
* Better behaviour with other plugins using alias_method_chain on read_attribute and define_attribute_methods
|
156
|
-
* Added option to enable datetime_select extension for future use to optionally enable. Enabled by default until version 2.
|
157
|
-
* Added :ignore_usec option for datetime restrictions to be compared without microsecond
|
158
|
-
* some refactoring
|
159
|
-
|
160
|
-
= 1.1.5 [2009-01-21]
|
161
|
-
* Fixed regex for 'yy' format token which wasn't greedy enough for date formats ending with year when a datetime string parsed as date with a 4 digit year
|
162
|
-
|
163
|
-
= 1.1.4 [2009-01-13]
|
164
|
-
* Make months names respect i18n in Formats
|
165
|
-
|
166
|
-
= 1.1.3 [2009-01-13]
|
167
|
-
* Fixed bug where time and date attributes still being parsed on read using Rails default parser [reported by Brad (pvjq)]
|
168
|
-
|
169
|
-
= 1.1.2 [2009-01-12]
|
170
|
-
* Fixed bugs
|
171
|
-
* matcher failing for custom error message without interpolation keys using I18n
|
172
|
-
* validator custom error messages not being extracted
|
173
|
-
|
174
|
-
= 1.1.1 [2009-01-03]
|
175
|
-
* Fixed bug in matcher for options local variable
|
176
|
-
|
177
|
-
= 1.1.0 [2009-01-01]
|
178
|
-
* Added between option
|
179
|
-
|
180
|
-
= 1.0.0 [2008-12-06]
|
181
|
-
* Gemified!
|
182
|
-
* Refactor of plugin into a Data Mapper style validator class which makes for a cleaner implementation and possible future Merb\Data Mapper support
|
183
|
-
* Added Rails 2.2 i18n support. Plugin error messages can specified in locale files. See README.
|
184
|
-
* ignore_datetime_restriction_errors setting has been moved from AR to ValidatesTimeliness::Validator.ignore_restriction_errors
|
185
|
-
* date_time_error_value_formats setting has been moved from AR to ValidatesTimeliness::Validator.error_value_formats
|
186
|
-
* Namespaced modules and specs
|
187
|
-
* Clean up of specs
|
188
|
-
* fixed a few bugs
|
189
|
-
* accessor methods not generating properly due method name stored as symbol in generated_attributes which fails on lookup
|
190
|
-
* force value assigned to time/datetime attributes to time objects
|
191
|
-
|
192
|
-
= 0.1.0 [2008-12-06]
|
193
|
-
* Tagged plugin as version 0.1.0
|
194
|
-
|
195
|
-
= 2008-11-13
|
196
|
-
* allow uppercase meridian to be valid [reported by Alex (http://alex.digns.com/)]
|
197
|
-
|
198
|
-
= 2008-10-28
|
199
|
-
* fixed bug when dirty attributes not reflecting change when attribute changed from time value to nil [reported by Brad (pvjq)]
|
200
|
-
* fixes for Rails 2.2 compatibility. Will refactor in to Rails version specific branches in the future.
|
201
|
-
|
202
|
-
= 2008-09-24
|
203
|
-
* refactored attribute write method definitions
|
204
|
-
|
205
|
-
= 2008-08-25
|
206
|
-
* fixed bug for non-timezone write method not updating changed attributes hash [reported by Sylvestre Mergulhão]
|
207
|
-
|
208
|
-
= 2008-08-22
|
209
|
-
* fixed bug with attribute cache not clearing on write for date and time columns [reported by Sylvestre Mergulhão]
|
210
|
-
* parse method returns Date object for date column assigned string as per normal Rails behaviour
|
211
|
-
* parse method returns same object type when assigned Date or Time object as per normal Rails behaviour
|
212
|
-
|
213
|
-
= 2008-08-07
|
214
|
-
* modified matcher option value parsing to allow same value types as validation method
|
215
|
-
* fixed matcher message
|
216
|
-
|
217
|
-
= 2008-08-02
|
218
|
-
* refactored validation
|
219
|
-
* refactored matcher
|
220
|
-
|
221
|
-
= 2008-07-30
|
222
|
-
* removed setting values to nil when validation fails to preserve before_type_cast value
|
data/gemfiles/rails_6_1.gemfile
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "http://rubygems.org"
|
4
|
-
|
5
|
-
gem "rails", "~> 6.1.0"
|
6
|
-
gem "rspec"
|
7
|
-
gem "rspec-rails", "~> 3.7"
|
8
|
-
gem "sqlite3"
|
9
|
-
gem "timecop"
|
10
|
-
gem "byebug"
|
11
|
-
gem "appraisal"
|
12
|
-
gem "nokogiri", "~> 1.8"
|
13
|
-
|
14
|
-
gemspec path: "../"
|