Commit Graph

52 Commits

Author SHA1 Message Date
Adam Meehan
4e8007bc65 added ignore_datetime_restriction_errors class option and docs
bit more for chronic parser
2008-07-21 13:02:21 +10:00
Adam Meehan
1836e4f6ca removed setting of time parts to 0 for date type in parse as any time parts should be valid as well
format proc now returns time array with nil values as 0
2008-07-21 10:31:06 +10:00
Adam Meehan
7a16d35e31 tweaked readme
changed mixed validation spec to datetime value out of Time range
2008-07-20 10:53:09 +10:00
Adam Meehan
9cf994564e fixed fallback for out of range dates which Rails does not handle automatically
aliased timeliness_date_time_parse to parse_date_time for nicer interface
2008-07-20 09:06:39 +10:00
Adam Meehan
70ba75a4ae added switching to euro date formats instead of US 2008-07-20 08:38:34 +10:00
Adam Meehan
5f55fad076 added :before option to add_formats to insert above existing format 2008-07-20 07:45:22 +10:00
Adam Meehan
5983622ac8 moved extact_date_time_values method in to Formats and added specs
changed Formats to a class
2008-07-19 19:47:03 +10:00
Adam Meehan
1d2720ca67 added less than exhaustive datetime format validation specs 2008-07-19 17:25:01 +10:00
Adam Meehan
8ab82411ca added format add and remove methods
fixed slashes and 'd' token matching
specs for time and date format validation
2008-07-19 17:17:53 +10:00
Adam Meehan
ec46a3bd35 added specs for formats and more docs
renamed valid_time_formats etc to time_formats
2008-07-18 16:29:26 +10:00
Adam Meehan
33c298163e moved format proc helper methods into formats module so they work 2008-07-17 16:25:54 +10:00
Adam Meehan
0dcc255901 changed parsing to use hash of regexp with optional processor blocks. Allows easy addition and removal of preffered formats 2008-07-17 14:29:59 +10:00
Adam Meehan
1a0a35836f fixed dummy time and added spec 2008-07-11 17:41:07 +10:00
Adam Meehan
20ed2b1633 ignore time part for dates in validation 2008-07-11 17:23:37 +10:00
Adam Meehan
c283d2eed9 rename base to multiparameter attributes 2008-07-11 16:31:19 +10:00
Adam Meehan
7f1ada4d0e refactored specs into type validations, added some more examples for boundary checks 2008-07-08 10:44:43 +10:00
Adam Meehan
8c5b372716 added birth_time attribute 2008-07-08 10:38:14 +10:00
Adam Meehan
d6cf8f0889 fixed require for rspec-rails 2008-07-07 15:24:37 +10:00
Adam Meehan
a5daef2069 added library require file for rspec-rails 2008-07-07 15:17:11 +10:00
Adam Meehan
771f42f076 added rspec-rails for view method specs 2008-07-07 15:16:30 +10:00
Adam Meehan
494f3bdef4 added time_travel plugin for validation specs to fix time from Time.now 2008-07-07 15:12:28 +10:00
Adam Meehan
bb42ef215f added full spec 2008-07-07 15:10:08 +10:00
Adam Meehan
5edfa5f2fc renamed module DateHelper to InstanceTag 2008-07-07 09:50:29 +10:00
Adam Meehan
6ffb7e5780 doc tweaks and minor stuff 2008-07-01 11:34:49 +10:00
Adam Meehan
d035de1d7c refactored restrictions validation into own method
added validates_*type methods for forcing the value type used when doing restriction validation
2008-07-01 11:31:17 +10:00
Adam Meehan
64a402676e added version display for AR 2008-06-30 22:38:30 +10:00
Adam Meehan
8b69ec8134 changed schema to be version agnostic 2008-06-30 22:37:51 +10:00
Adam Meehan
a69e018992 added dirty attribute handling 2008-06-30 22:37:13 +10:00
Adam Meehan
39e16d2fde fixed error on database write with saving cached values for time attributes which have been converted 2008-06-30 16:30:13 +10:00
Adam Meehan
ed23c4a9a4 refactored to convert and cache user input value on write to distinguish from values in read raw from database which allows correct timezone conversion
added override for read_attribute to check for failed time type cast which should save nil value
2008-06-30 15:38:33 +10:00
Adam Meehan
ec12d60224 changed spec_helper rails version selection to use VERSION
added RAILS_VER constant for version checking
fixed rspec module include requirement for 1.1.4 in specs
2008-06-27 09:56:45 +10:00
Adam Meehan
685b0054fe set time zone aware attributes on in spec helper for AR 2008-05-22 07:35:01 +10:00
Adam Meehan
fb463ca7a0 fixed time object passed to strict_time_type_cast error 2008-05-21 17:03:19 +10:00
Adam Meehan
a9b033e539 added strict_time_type_cast method to handle casting
refactored to be simler and rely on read_atribute method conversion
rather than use new reader method definer got time (Rails 2.1)
2008-05-21 16:55:10 +10:00
Adam Meehan
7fadc2c164 tightened up specs for attribute methods 2008-05-21 10:02:13 +10:00
Adam Meehan
c6312329ec changed rails version detection to be tighter to avoid rails RC problem
added rspec on rails validate_timeliness_of matcher
2008-05-15 11:00:07 +10:00
Adam Meehan
10856b32d0 added vendored_rails check for time zone setting 2008-05-14 11:22:44 +10:00
Adam Meehan
f30b09cf5b added time zone config for Time class needed when running specs using
vendored rails
2008-05-14 11:18:55 +10:00
Adam Meehan
8e4c4098b7 added spec for values before epoch 2008-05-14 09:09:41 +10:00
Adam Meehan
fd8b8bad2e changed AR version constant to Rails 2008-05-14 08:59:55 +10:00
Adam Meehan
d22aa94b89 changed version check to Rails constant as AR VERSION not loaded by
default
changed time component validation to use dummy date parts to avoid pre
epoch issues
2008-05-14 08:54:50 +10:00
Adam Meehan
4ee24faad4 switched to using Rails::VERSION constant instead of AR which doesn't
seem to be available on rails boot
2008-05-05 09:41:16 +10:00
Adam Meehan
d3e278069e added validations specs 2008-05-05 09:12:36 +10:00
Adam Meehan
9a8a82c699 fixed restriction value conversion and added nil check 2008-05-03 18:12:51 +10:00
Adam Meehan
cae3d8cb84 added specs for validation 2008-05-03 15:52:40 +10:00
Adam Meehan
8751eddac6 adds module for rails 2.0.x to add reader method for date checking
includes right module based on AR version
better vendored rails check in spec_helper
2008-05-03 13:03:01 +10:00
Adam Meehan
3cf6e64747 fixed up AR 2.0.x timezone support 2008-05-03 08:44:41 +10:00
Adam Meehan
9eddf9c130 outputs whether gem or vendor AR being used 2008-05-03 08:17:45 +10:00
Adam Meehan
b8283a7c9c outputs AR version being tested 2008-05-03 08:12:44 +10:00
Adam Meehan
fe7310fc10 fixed read method to use value before type cast
added AR version checks in specs
include AR from vendor if in Rails app
2008-05-03 08:08:28 +10:00