Commit Graph

254 Commits

Author SHA1 Message Date
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
Adam Meehan
d0f2158ae5 Update Gemfile 2015-11-10 18:49:03 +11:00
Adam Meehan
bb830baea2 Rails 4.0 and 4.1 compat for #setup method removal 2015-11-10 17:52:34 +11:00
Adam Meehan
4d48c3578b Merge pull request #128 from monkbroc/patch-1
Generate attribute methods once instead of on each object creation
2015-09-25 09:13:02 +10:00
Julien Vanier
7d37882327 Generate attribute methods once instead of on each object creation
This is a memory and performance improvement change.

The attribute methods for timeliness are generated at each object creation instead of once, at first creation like AR attribute methods. Since creating those methods uses `module_eval` it's quite slow when it's done each `Model.new`.

For more details on the performance improvement, see the same change on John Carney's fork: https://github.com/johncarney/validates_timeliness/pull/6
2015-09-24 14:58:12 -04:00
Adam Meehan
12f6d2a467 Merge pull request #104 from johnnyshields/mongoid-3
Update to Mongoid 3
2015-09-12 17:23:20 +10:00
Adam Meehan
913bd4ccfa Merge pull request #123 from obfuscoder/master
Fix typo in comment of initializer template
2015-09-12 09:51:44 +10:00
Obfuscoder
f1b8925a36 Fix typo in comment of initializer template 2014-11-02 20:59:50 +01:00
Adam Meehan
f983dcc9dc Merge pull request #109 from RudyOnRails/patch-1
typo
2013-11-07 09:45:10 -08:00
Kevin Musiorski
7be1539cee typo 2013-11-06 13:59:17 -06: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
Adam Meehan
3d798697e1 Merge pull request #98 from 907th/master
Range with excluded end passed to :between option should be split into :on_or_after and :before options
2013-04-30 04:45:54 -07: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
dd3b6b5514 Merge pull request #95 from will-ob/fix/require-active-model
Require 'active_model'
2013-04-25 22:01:51 -07:00
Will O'Brien
609fafe7bb Require 'active_model'
Apparently classes are lazily required when using autoload. Prompted by
'uninitialized constant ActiveModel::Validations'
2013-04-25 22:42:28 -04:00
Adam Meehan
df9677f5bf timeliness minimum dep 0.3.7 2012-10-15 20:37:05 +11:00
Adam Meehan
b463b4356a Update rdoc require 2012-10-15 08:46:11 +11:00
Adam Meehan
7dd579b0e0 Get rid of this silly constant for nil array value 2012-10-15 08:45:57 +11:00
Adam Meehan
5becd7886b Removing silly class variables from config module 2012-09-14 18:44:35 +10:00
Adam Meehan
2225c747e1 DRYing up some specs 2012-08-26 16:38:00 +10:00
Adam Meehan
a1dfbf5d7d v3.0.14 2012-08-23 18:40:47 +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
4fe22458d3 Add mongoid appraisals 2012-08-23 18:37:38 +10:00
Adam Meehan
8c698be4c4 v3.0.13 2012-08-21 10:56:46 +10:00
Adam Meehan
091e7ecfa0 Tweak AR specs 2012-08-21 10:53:54 +10:00
Adam Meehan
8168bcbd3a Ignore more lock files 2012-08-19 22:59:40 +10:00
Adam Meehan
973bbfa82c Moving back to plugin cache for ActiveRecord
This simplifies the code a lot and fixes the issues with date and time
colummns when using the plugin parser.

Add appraisals for all rails 3 versions
2012-08-19 22:57:19 +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
fd73c4eccd README touch ups 2012-08-09 11:55:53 +10:00
Adam Meehan
7bcdea1738 RSpec config cleanup 2012-07-13 21:43:29 +10:00
Adam Meehan
8898b8686c v3.0.12 2012-06-23 19:06:38 +10:00
Adam Meehan
aad2db8662 Remove unused cargo culted generator method 2012-06-23 18:58:33 +10:00
Adam Meehan
8e08cbf6e4 Fix load order issue for AR extension using Railite 2012-06-23 18:58:01 +10:00
Adam Meehan
8dd607975b v3.0.11 2012-04-01 16:48:53 +10:00
Adam Meehan
b6acda539f v3.0.10 2012-03-29 13:45:40 +11: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
df12d6dad0 v3.0.9 2012-03-26 22:00:12 +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
a6a3dff4d4 Revert "Move AR railtie hook outside of initializer to avoid late inclusion of shim"
This reverts commit 48fd72ae5b.
2012-02-24 11:52:58 +11:00
Adam Meehan
ff594d5873 Tighten up mongoid shim for reload override in 1.8.x and 1.9.x 2012-02-06 22:48:29 +11:00
Adam Meehan
8c1ba048df Refactor timeliness method definition 2012-02-06 22:47:08 +11:00
Adam Meehan
48fd72ae5b Move AR railtie hook outside of initializer to avoid late inclusion of shim 2012-02-06 22:45:01 +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
20549c7acd Setup bundler in the rake file 2012-02-01 21:30:57 +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