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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc002013bf4a78cba246d4a99133e7cf50a4728125f6472621f2b8a563ea0857
4
- data.tar.gz: fd59680e5636166eeff6848fb3a2560878c583a5fc60dbea9aba9d52fa53e0de
3
+ metadata.gz: 284d18473a0007c273fc4608579b619afac6a3809dfdcd12864d6aeea30c6f17
4
+ data.tar.gz: 12d2db9663bb6c80a643d7c7365fc4d44218a64a9b69feacb6d060dc737ddd93
5
5
  SHA512:
6
- metadata.gz: b80b655d4df7e324fc42bdd2b3006e7c5cf8a0fb4fd6d0d27155a94a4ce4e9b93e7ffa1e9eb0f79fb7635a6a0bc75d34112d25a425cd553b0be2a641fb93b626
7
- data.tar.gz: 1ad906a88d910f0dae8ef4f0d09431776b43c9db85ab587b8f35ea18fd8cdb75a6dcbea666b745b7cc17dbc998f6e3274429ecc1e8fb5c47c5beabfb4ac42d23
6
+ metadata.gz: 77eb167f597fe224c293b6a9e9143c0b5eb8b443ed54539dc89e34c28e5cb7c9517e826c25660641281d6b477451cb2ff4b1187f0332e33fd0d94d7618223204
7
+ data.tar.gz: de5c7cb989b1148acf4a7af524171c7eead44663b43088da99f79bb5af7c7b1c120f28ace62cb62bcfe533979fbe9975763e59aa463acccf7ed1a951496e1f39
@@ -7,21 +7,16 @@ jobs:
7
7
  fail-fast: false
8
8
  matrix:
9
9
  include:
10
- - gemfile: rails_6_0
11
- ruby: 2.6
12
- - gemfile: rails_6_0
10
+ - gemfile: rails_7_0
13
11
  ruby: 2.7
14
- - gemfile: rails_6_0
15
- ruby: 3.0
16
- - gemfile: rails_6_1
17
- ruby: 2.6
18
- - gemfile: rails_6_1
19
- ruby: 2.7
20
- - gemfile: rails_6_1
12
+ - gemfile: rails_7_0
21
13
  ruby: 3.0
14
+ - gemfile: rails_7_0
15
+ ruby: 3.1
22
16
 
23
17
  name: ${{ matrix.gemfile }}, ruby ${{ matrix.ruby }}
24
-
18
+ env:
19
+ BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
25
20
  steps:
26
21
  - uses: actions/checkout@v2
27
22
 
@@ -29,13 +24,7 @@ jobs:
29
24
  uses: ruby/setup-ruby@v1
30
25
  with:
31
26
  ruby-version: ${{ matrix.ruby }}
32
- bundler-cache: false
33
-
34
- - name: Bundle install
35
- run: |
36
- bundle config set gemfile "${GITHUB_WORKSPACE}/gemfiles/${{ matrix.gemfile }}.gemfile"
37
- bundle install --jobs 4 --retry 3
27
+ bundler-cache: true
38
28
 
39
29
  - name: Run specs
40
- run: |
41
- bundle exec rspec
30
+ run: bundle exec rspec
data/CHANGELOG.md ADDED
@@ -0,0 +1,337 @@
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
+
6
+ in a request.
7
+ * Add initializer to ensure Timeliness v0.4+ ambiguous date config is set
8
+ correctly when using `use_euro_formats` or `remove_use_formats'.
9
+ * Add Ruby 3 compatibility
10
+ * Add Rails 6.1 compatibility
11
+
12
+
13
+ Breaking Changes
14
+ * Update Multiparameter extension to use ActiveRecord type classes with
15
+ multiparameter handling which stores a hash of multiparamter values as the
16
+ value before type cast, no longer a mushed datetime string
17
+ * Removed all custom plugin attribute methods and method overrides in favour
18
+ using ActiveModel type system
19
+
20
+
21
+ # 4.1.0 [2019-06-11]
22
+ * Relaxed Timeliness dependency version to >= 0.3.10 and < 1, which allows
23
+ version 0.4 with threadsafety fix for use_us_formats and use_euro_formats
24
+ hot switching in a request.
25
+
26
+
27
+ # 4.0.2 [2016-01-07]
28
+ * Fix undefine_generated_methods ivar guard setting to false
29
+
30
+
31
+ # 4.0.1 [2016-01-06]
32
+ * Fix undefine_generated_methods thread locking bug
33
+ * Created an ActiveModel ORM, for manual require if using without any full
34
+ blown ORM
35
+
36
+
37
+ # 4.0.0 [2015-12-29]
38
+ * Extracted mongoid support into
39
+ https://github.com/adzap/validates_timeliness-mongoid which is broken (not
40
+ supported anymore).
41
+ * Fixed Rails 4.0, 4.1 and 4.2 compatability issues
42
+ * Upgrade specs to RSpec 3
43
+ * Added travis config
44
+ * Huge thanks to @johncarney for keeping it alive with his fork
45
+ (https://github.com/johncarney/validates_timeliness)
46
+
47
+
48
+ # 3.0.15 [2015-12-29]
49
+ * Fixes mongoid 3 support and removes mongoid 2 support(johnnyshields)
50
+ * Some documentation/comments tidying
51
+ * Some general tidying up
52
+
53
+
54
+ # 3.0.14 [2012-08-23]
55
+ * Fix for using validates :timeliness => {} form to correctly add attributes
56
+ to timeliness validated attributes.
57
+
58
+
59
+ # 3.0.13 [2012-08-21]
60
+ * Fix ActiveRecord issues with using plugin parser by using old way of
61
+ caching values.
62
+ * Allow any ActiveRecord non-column attribute to be validated
63
+
64
+
65
+ # 3.0.12 [2012-06-23]
66
+ * Fix load order issue when relying on Railtie to load ActiveRecord
67
+ extension
68
+
69
+
70
+ # 3.0.11 [2012-04-01]
71
+ * Change dependency on Timeliness version due to a broken release
72
+
73
+
74
+ # 3.0.10 [2012-03-26]
75
+ * Fix for ActiveRecord shim and validation with :allow_blank => true in AR
76
+ 3.1+. Fixes issue#52.
77
+
78
+
79
+ # 3.0.9 [2012-03-26]
80
+ * ActiveRecord 3.1+ suport
81
+ * Fixes for multiparameter extension with empty date values (thanks @mogox,
82
+ @Sharagoz)
83
+
84
+
85
+ # 3.0.8 [2011-12-24]
86
+ * Remove deprecated InstanceMethods module when using AS::Concern
87
+ (carlosantoniodasilva)
88
+ * Update Mongoid shim for v2.3 compatability.
89
+
90
+
91
+ # 3.0.7 [2011-09-21]
92
+ * Fix ActiveRecord before_type_cast extension for non-dirty attributes.
93
+ * Don't override AR before_type_cast for >= 3.1.0 which now has it's own
94
+ implementation for date/time attributes.
95
+ * Fix DateTimeSelect extension to convert params to integers (#45)
96
+ * Add #change method to DateTimeSelect extension (@trusche, #45)
97
+ * Cleanup Mongoid shim.
98
+
99
+
100
+ # 3.0.6 [2011-05-09]
101
+ * Fix for AR type conversion for date columns when using plugin parser.
102
+ * Add timeliness_type_cast_code for ORM specific type casting after parsing.
103
+
104
+
105
+ # 3.0.5 [2011-01-29]
106
+ * Fix for Conversion#parse when given nil value (closes issue #34)
107
+
108
+
109
+ # 3.0.4 [2011-01-22]
110
+ * Fix :between option which was being ignored (ebeigarts)
111
+ * Use class_attribute to remove deprecated class_inheritable_accessor
112
+ * Namespace copied validator class to ActiveModel::Validations::Timeliness
113
+ for :timeliness option
114
+
115
+
116
+ # 3.0.3 [2010-12-11]
117
+ * Fix validation of values which don't respond to to_date or to_time
118
+ (renatoelias)
119
+
120
+
121
+ # 3.0.2 [2010-12-04]
122
+ * Fix AR multiparameter extension for Date columns
123
+ * Update to Timeliness 0.3.2 for zone abbreviation and offset support
124
+
125
+
126
+ # 3.0.1 [2010-11-02]
127
+ * Generate timeliness write methods in an included module to allow
128
+ overriding in model class (josevalim)
129
+
130
+
131
+ # 3.0.0 [2010-10-18]
132
+ * Rails 3 and ActiveModel compatibility
133
+ * Uses ActiveModel::EachValidator as validator base class.
134
+ * Configuration settings stored in ValidatesTimeliness module only.
135
+ ValidatesTimeliness.setup block to configure.
136
+ * Parser extracted to the Timeliness gem http://github.com/adzap/timeliness
137
+ * Parser is disabled by default. See initializer for enabling it.
138
+ * Removed RSpec matcher. Encouraged poor specs by copy-pasting from spec to
139
+ model, or worse, the other way round.
140
+ * Method override for parsing and before type cast values is on validated
141
+ attributes only. Old version handled all date/datetime columns, validates
142
+ or not. Too intrusive.
143
+ * Add validation helpers to classes using extend_orms config setting. e.g.
144
+ conf.extend_orms = [ :active_record ]
145
+ * Changed :between option so it is split into :on_or_after and :on_or_before
146
+ option values. The error message for either failing check will be used
147
+ instead of a between error message.
148
+ * Provides :timeliness option key for validates class method. Be sure to
149
+ pass :type option as well e.g. :type => :date.
150
+ * Allows validation methods to be called on record instances as per
151
+ ActiveModel API.
152
+ * Performs parsing (optional) and raw value caching (before_type_cast) on
153
+ validated attributes only. It used to be all date, time and datetime
154
+ attributes.
155
+
156
+
157
+ # 2.3.1 [2010-03-19]
158
+ * Fixed bug where custom attribute writer method for date/times were being
159
+ overriden
160
+
161
+
162
+ # 2.3.0 [2010-02-04]
163
+ * Backwards incompatible change to :equal_to option. Fixed error message
164
+ clash with :equal_to option which exists in Rails already. Option is now
165
+ :is_at.
166
+ * Fixed I18n support so it returns missing translation message instead of
167
+ error
168
+ * Fixed attribute method bug. Write method was bypassed when method was
169
+ first generated and used Rails default parser.
170
+ * Fixed date/time selects when using enable_datetime_select_extension! when
171
+ some values empty
172
+ * Fixed ISO8601 datetime format which is now split into two formats
173
+ * Changed I18n error value format to fallback to global default if missing
174
+ in locale
175
+ * Refactored date/time select invalid value extension to use param values.
176
+ Functionality will be extracted from plugin for v3.
177
+
178
+
179
+ # 2.2.2 [2009-09-19]
180
+ * Fixed dummy_time using make_time to respect timezone. Fixes 1.9.1 bug.
181
+
182
+
183
+ # 2.2.1 [2009-09-12]
184
+ * Fixed dummy date part for time types in Validator.type_cast_value
185
+ * No more core extensions! Removed dummy_time methods.
186
+
187
+
188
+ # 2.2.0 [2009-09-12]
189
+ * Ruby 1.9 support!
190
+ * Customise dummy date values for time types. See DUMMY DATE FOR TIME TYPES.
191
+ * Fixed matcher conflict with Shoulda. Load plugin matcher manually now see
192
+ matcher section in README
193
+ * Fixed :ignore_usec when used with :with_time or :with_date
194
+ * Some clean up and refactoring
195
+
196
+
197
+ # 2.1.0 [2009-06-20]
198
+ * Added ambiguous year threshold setting in Formats class to customize the
199
+ threshold for 2 digit years (See README)
200
+ * Fixed interpolation values in custom error message for Rails 2.2+
201
+ * Fixed custom I18n local override of en locale
202
+ * Dramatically simplified ActiveRecord monkey patching and hackery
203
+
204
+
205
+ # 2.0.0 [2009-04-12]
206
+ * Error value formats are now specified in the i18n locale file instead of
207
+ updating plugin hash. See OTHER CUSTOMISATION section in README.
208
+ * Date/time select helper extension is disabled by default. To enable see
209
+ DISPLAY INVALID VALUES IN DATE HELPERS section in README to enable.
210
+ * Added :format option to limit validation to a single format if desired
211
+ * Matcher now supports :equal_to option
212
+ * Formats.parse can take :include_offset option to include offset value from
213
+ string in seconds, if string contains an offset. Offset not used in rest
214
+ of plugin yet.
215
+ * Refactored to remove as much plugin code from ActiveRecord as possible.
216
+
217
+
218
+ # 1.1.7 [2009-03-26]
219
+ * Minor change to multiparameter attributes which I had not properly
220
+ implemented for chaining
221
+
222
+
223
+ # 1.1.6 [2009-03-19]
224
+ * Rail 2.3 support
225
+ * Added :with_date and :with_time options. They allow an attribute to be
226
+ combined with another attribute or value to make a datetime value for
227
+ validation against the temporal restrictions
228
+ * Added :equal_to option
229
+ * Option key validation
230
+ * Better behaviour with other plugins using alias_method_chain on
231
+ read_attribute and define_attribute_methods
232
+ * Added option to enable datetime_select extension for future use to
233
+ optionally enable. Enabled by default until version 2.
234
+ * Added :ignore_usec option for datetime restrictions to be compared without
235
+ microsecond
236
+ * some refactoring
237
+
238
+
239
+ # 1.1.5 [2009-01-21]
240
+ * Fixed regex for 'yy' format token which wasn't greedy enough for date
241
+ formats ending with year when a datetime string parsed as date with a 4
242
+ digit year
243
+
244
+
245
+ # 1.1.4 [2009-01-13]
246
+ * Make months names respect i18n in Formats
247
+
248
+
249
+ # 1.1.3 [2009-01-13]
250
+ * Fixed bug where time and date attributes still being parsed on read using
251
+ Rails default parser [reported by Brad (pvjq)]
252
+
253
+
254
+ # 1.1.2 [2009-01-12]
255
+ * Fixed bugs
256
+ * matcher failing for custom error message without interpolation keys
257
+ using I18n
258
+ * validator custom error messages not being extracted
259
+
260
+
261
+
262
+ # 1.1.1 [2009-01-03]
263
+ * Fixed bug in matcher for options local variable
264
+
265
+
266
+ # 1.1.0 [2009-01-01]
267
+ * Added between option
268
+
269
+
270
+ # 1.0.0 [2008-12-06]
271
+ * Gemified!
272
+ * Refactor of plugin into a Data Mapper style validator class which makes
273
+ for a cleaner implementation and possible future MerbData Mapper support
274
+ * Added Rails 2.2 i18n support. Plugin error messages can specified in
275
+ locale files. See README.
276
+ * ignore_datetime_restriction_errors setting has been moved from AR to
277
+ ValidatesTimeliness::Validator.ignore_restriction_errors
278
+ * date_time_error_value_formats setting has been moved from AR to
279
+ ValidatesTimeliness::Validator.error_value_formats
280
+ * Namespaced modules and specs
281
+ * Clean up of specs
282
+ * fixed a few bugs
283
+ * accessor methods not generating properly due method name stored as
284
+ symbol in generated_attributes which fails on lookup
285
+ * force value assigned to time/datetime attributes to time objects
286
+
287
+
288
+
289
+ # 0.1.0 [2008-12-06]
290
+ * Tagged plugin as version 0.1.0
291
+
292
+
293
+ # 2008-11-13
294
+ * allow uppercase meridian to be valid [reported by Alex
295
+ (http://alex.digns.com/)]
296
+
297
+
298
+ # 2008-10-28
299
+ * fixed bug when dirty attributes not reflecting change when attribute
300
+ changed from time value to nil [reported by Brad (pvjq)]
301
+ * fixes for Rails 2.2 compatibility. Will refactor in to Rails version
302
+ specific branches in the future.
303
+
304
+
305
+ # 2008-09-24
306
+ * refactored attribute write method definitions
307
+
308
+
309
+ # 2008-08-25
310
+ * fixed bug for non-timezone write method not updating changed attributes
311
+ hash [reported by Sylvestre Mergulhão]
312
+
313
+
314
+ # 2008-08-22
315
+ * fixed bug with attribute cache not clearing on write for date and time
316
+ columns [reported by Sylvestre Mergulhão]
317
+ * parse method returns Date object for date column assigned string as per
318
+ normal Rails behaviour
319
+ * parse method returns same object type when assigned Date or Time object as
320
+ per normal Rails behaviour
321
+
322
+
323
+ # 2008-08-07
324
+ * modified matcher option value parsing to allow same value types as
325
+ validation method
326
+ * fixed matcher message
327
+
328
+
329
+ # 2008-08-02
330
+ * refactored validation
331
+ * refactored matcher
332
+
333
+
334
+ # 2008-07-30
335
+ * removed setting values to nil when validation fails to preserve
336
+ before_type_cast value
337
+