Adam Meehan
0444bdc650
Datetime select extension fixes with help from @johncarney's fork
2015-12-29 15:49:18 +11:00
Adam Meehan
08b16f155c
Rspec 3 syntax
2015-12-29 14:55:03 +11:00
Adam Meehan
1ddf0f1b0f
Remove all mongoid stuff and put in validates_timeliness-mongoid
2015-12-28 14:24:24 +11:00
Adam Meehan
6560a09ad2
Change Time.local_time to Time.local
2015-12-28 13:47:11 +11:00
Johnny Shields
99ae8fe7d7
Update for Mongoid 3:
...
- Now requires Mongoid 3.0 as minimum version (this is the only version to support Rails 3.2)
- Upgrade specs/helpers for Mongoid 3
- Support Mongoid aliased field names (e.g. field :foo, as: bar, type: String). Includes spec
- Support before_type_cast on Mongoid. No code change was required for this, only a spec change.
- There was one mongoid spec that was previously marked pending. I've found that it now works on Mongoid 3.
- Removed some Mongoid 2.3 and earlier hacks, which simplifies the Mongoid ORM code.
2013-07-24 11:05:01 +09:00
Adam Meehan
00ce472d3e
Merge pull request #99 from softace/fixing_build
...
Fix for running tests in non-Australian timezones
2013-06-16 15:22:33 -07:00
Jarl Friis
0d2c7ce554
Fix for running tests in non-Australian timezones
2013-04-30 19:56:19 +02:00
Alexey Chernenkov
dc0fdc0340
Range with excluded end passed to :between option should be split into :on_or_after and :before options
2013-04-30 15:37:44 +06:00
Adam Meehan
7dd579b0e0
Get rid of this silly constant for nil array value
2012-10-15 08:45:57 +11:00
Adam Meehan
2225c747e1
DRYing up some specs
2012-08-26 16:38:00 +10:00
Adam Meehan
02fbdc6028
Fix for validates :timeliness form to add attributes to plugin set
2012-08-23 18:38:33 +10:00
Adam Meehan
091e7ecfa0
Tweak AR specs
2012-08-21 10:53:54 +10:00
Adam Meehan
62557e7e04
Allow any validated attribute to pass timezone aware check in AR
2012-08-09 12:53:29 +10:00
Adam Meehan
7bcdea1738
RSpec config cleanup
2012-07-13 21:43:29 +10:00
Adam Meehan
4aa20bb002
Stricter method signature for _timeliness_raw_value_for to take string
...
Add basic validation specs to each ORM shim
2012-03-29 13:00:28 +11:00
Adam Meehan
f11255a7a3
Fix multiparameter extension to not allow partial dates as per ActiveRecord implementation.
2012-03-26 20:22:09 +11:00
Adam Meehan
43f49076fb
Changed multiparameter implementation to be more like AR 3.1 but backwards compatible
...
Specs improved to not make direct call to multiparameter method.
2012-02-02 09:00:14 +11:00
Chris Griego
64a7440de4
Fix multiparameter extension to work with ActiveRecord 3.1
2012-02-02 08:54:39 +11:00
Chris Griego
2702ec3266
The ActiveRecord extension now returns the original return value for .define_attribute_methods
...
This helps other extensions, like PermalinkFu, which depend on the return value
2012-02-02 08:44:22 +11:00
Adam Meehan
4acd0180f9
Add specs for allow_nil and allow_blank with attribute value cache active
2012-02-01 21:25:42 +11:00
Adam Meehan
3f4615e053
scope a spec to AR version
2012-02-01 21:25:05 +11:00
Adam Meehan
5be45b00db
Hook into undefine_attributes_methods to remove timeliness methods as well
2012-02-01 20:38:05 +11:00
Adam Meehan
f8aeeca0a9
A fix for ActiveRecord 3.1.x and plugin parser not working together (issue #52 )
2012-01-26 22:44:01 +11:00
Adam Meehan
907fd3e439
Fix for Mongoid shim for reload which was nicely moved into a module to allow super
2011-12-10 17:46:35 +11:00
Adam Meehan
86b7bc4829
Fix before_type_cast for non-dirty attributes (issue #52 ).
...
Only use before_type_cast implementation if earlier than 3.1.0 which has
it's own working version for date/time fields now.
2011-09-21 21:28:53 +10:00
Adam Meehan
11ae94cba6
Cleanup DateTimeSelect extension specs
2011-09-18 18:53:38 +10:00
Adam Meehan
473da0fa5e
Fix DateTimeSelect extension for Rails 3.1.0
2011-09-18 18:37:01 +10:00
Adam Meehan
e7b503ae4f
Fix DateTimeSelect extension to use integers from param values.
...
Change extension spec to use string params.
2011-09-18 18:34:23 +10:00
Adam Meehan
af9d6cdba4
Fix brokena and brittle tests
2011-09-18 18:33:30 +10:00
Adam Meehan
969edfcb83
Helper method spec
2011-09-18 18:33:29 +10:00
Adam Meehan
1faf0efa4b
Spec helper validate method setup in test models not needed
2011-09-18 18:33:29 +10:00
Thilo Rusche
b4c1a39343
added support for :discard_day in form helpers
2011-05-13 17:13:11 +01:00
Adam Meehan
ea7c9ec7be
Type caste to Date for date columns in AR after parsing string in attribute writer
2011-04-27 07:37:26 +10:00
Adam Meehan
e3dea5aebd
use activemodel scoped class name in helper method to remove need for .kind override
2011-02-24 21:12:49 +11:00
Adam Meehan
2822e368e3
Exit restriction validation on first restriction error
2011-02-24 07:58:48 +11:00
Adam Meehan
1c70af4dba
simplify data select spec
2011-02-23 20:05:09 +11:00
Adam Meehan
38457ec334
change spec config setup to use class method with_config
2011-01-29 16:33:37 +11:00
Adam Meehan
3793ef2ed4
fix for validation nil value with :format option plugin parser disabled (issue 34)
2011-01-29 16:07:56 +11:00
Adam Meehan
983e80f239
move some files into spec/support and include ModelHelpers in config
2011-01-28 19:36:02 +11:00
Adam Meehan
54ba4a038c
use namespaced validator class name for the :timeliness option
2011-01-22 10:48:40 +11:00
Edgars Beigarts
d14ae09820
Fixed :between option.
2011-01-21 11:02:59 +02:00
Adam Meehan
509336e080
Fix type_cast_value for values which don't respond to to_time or to_date (renatoelias)
2010-12-11 09:13:35 +11:00
Adam Meehan
3bf364a395
reluctantly overriding whole execute_callstack_for_multiparameter_attributes method
...
this fixes issue for Date column types. Damn method is just too
unwieldly and should be refactored in Rails.
2010-12-04 16:29:05 +11:00
José Valim
889b5a9b07
Move timeliness defined methods to a module so they can be overwritten.
2010-11-01 14:56:03 -02:00
Adam Meehan
4f421d87fc
add remove_use_formats alias to Timeliness and spec config spec
2010-10-18 11:15:50 +11:00
Adam Meehan
2c6df945ec
remove old parser and use timeliness gem
2010-10-14 18:57:53 +11:00
Adam Meehan
1bf068392e
avoid ruby 1.9.2 warning in spec
2010-10-14 07:58:23 +11:00
Adam Meehan
316086e76f
ruby 1.9.2 spec fixes for instance method checks
2010-10-14 07:55:35 +11:00
Adam Meehan
99704211a1
don't run mongoid spec if not loaded
2010-10-09 16:46:02 +11:00
Adam Meehan
f67519f091
don't to_i format values when nil in parser
2010-10-01 09:38:07 +10:00