Commit Graph

337 Commits

Author SHA1 Message Date
Adam Meehan
e645a938b6 remove skipped specs which no longer apply 2018-06-06 13:34:20 -10:00
Adam Meehan
3bc583b200 add Rails 5.1 and 5.2 appraisals 2018-06-06 13:33:44 -10:00
Adam Meehan
4a824e94cd add breaking change for multiparam value format 2018-06-06 13:32:40 -10:00
Adam Meehan
093e33fbed Move conversion module methods in Converter class
Encapsulate conversion helper methods
2018-05-19 16:28:35 +10:00
Adam Meehan
e5bb096161 Move method generation to ActiveModel only and use type system in AR
The ActiveModel type system with extensions in ActiveRecord provide
us a lot of convenience. Some general attribute code is now moved to
ActiveModel only as the AR types provide raw value capturing
(before_type_cast) and type classes to handle type specific string
value parsing if enabled.

In my view, we need to go futher and strip out more from ActiveModel
extension but at least we should have compatibility at the moment.
2018-05-19 15:22:23 +10:00
Adam Meehan
4582c96c42 Time only values are zone aware from AR 5.0 2018-05-18 09:27:16 +10:00
Adam Meehan
38899712c5 update gemfile 2018-05-18 09:14:26 +10:00
Adam Meehan
1c2f4c1b05 turn off timezone aware check specs for now 2018-05-18 09:13:46 +10:00
Adam Meehan
402a6b6e3e Change multiparamter extension to use AR type classes
Multiparamter extension used to do a lot of crappy work to ensure that
the invalid Date dates were not accepted, but also to store a
before_type_cast value in cases when it was invalid. We no longer need
to handle the before_type_cast value as ActiveRecord does that nicely.

Now we just ensure values to cast with a invalid date parts is not
accepted.
2018-05-18 08:58:00 +10:00
Adam Meehan
a1f42fce28 Remove old version checks 2018-05-16 13:12:30 +10:00
Adam Meehan
076714d648 update hash syntax in spec 2018-05-16 12:54:32 +10:00
Adam Meehan
a40a758848 Update CHANGELOG 2018-05-16 12:47:18 +10:00
Adam Meehan
941055c16e Restore usage of DateTime substitute value object
Remove initialize override. Not sure why what was added.
2018-05-16 09:27:27 +10:00
Adam Meehan
4fef42ac24 Rails 5.x compatible Tag value method signature 2018-05-16 09:06:36 +10:00
Adam Meehan
84b1885b6b cannot use POSITION in actionview to map value key 2018-05-15 19:59:59 +10:00
Adam Meehan
90501a8e56 Tag value method takes objects 2018-05-15 19:27:15 +10:00
Adam Meehan
8dc191a4cd Update TextModel method_missing with current ActiveModel methods 2018-05-15 19:26:54 +10:00
Adam Meehan
7d006bd3bd not a fix but stops stack recursion problem 2018-05-15 17:22:43 +10:00
Adam Meehan
973090df85
Merge pull request #167 from AquisTech/fix-issue166-alias_method_chain_not_working_in_rails5
Fix issue#166 alias_method_chain not working in Rails 5
2018-05-15 17:09:07 +10:00
Adam Meehan
596bc87ffd fix rails 5 gemfile 2018-05-15 16:54:53 +10:00
Adam Meehan
5f8604e393 update README with travis badge and 4.x branch 2018-05-15 16:49:38 +10:00
Adam Meehan
a20bfd31ee remove old rails 4 gem and add rails 5.0 2018-05-15 16:45:25 +10:00
AquisTech
c9ca900abf Fix issue#166 alias_method_chain not working in Rails 5 2018-05-14 19:52:24 +05:30
Adam Meehan
a88ae0829c MultiparameterAttribute does not exist anymore 2018-05-13 21:46:26 +10:00
Adam Meehan
6cc47d84e8 setting up for rails 5 work 2018-05-13 21:45:06 +10:00
Adam Meehan
a05f091a42 drop rails 4.0 and 4.1 both EOLed 2018-05-13 21:30:20 +10:00
Adam Meehan
faf708e3be force nokigiri version up 2018-05-13 21:25:31 +10:00
Adam Meehan
38bb74844d need travis bundler fix 2018-05-13 21:15:11 +10:00
Adam Meehan
e275b63203 Merge branch 'master' of github.com:adzap/validates_timeliness 2018-05-13 21:01:36 +10:00
Adam Meehan
e73e0eb30f change travis command to rspec bin 2018-05-13 21:01:12 +10:00
Adam Meehan
43554d8bf0
Merge pull request #152 from aditya-kapoor/allow-generic-msg
Allow the validator to take in the `message` option too.
2018-05-13 20:50:08 +10:00
Adam Meehan
da473b7eea
Update validator.rb
tweak message key lookup
2018-05-13 20:49:25 +10:00
Adam Meehan
fc2af73656 update travis rubies and appraisal rails 2018-05-13 20:46:53 +10:00
Adam Meehan
936c853fdd Merge branch 'master' of github.com:adzap/validates_timeliness 2018-05-13 20:39:32 +10:00
Adam Meehan
f27324a404 relax gemfile gem version 2018-05-13 20:38:23 +10:00
Adam Meehan
4221bf7709
Merge pull request #161 from pedrofurtado/patch-1
Update README.rdoc with the suggestion of a gem with i18n translations
2018-05-13 11:54:55 +10:00
Pedro Felipe de Azevedo Furtado
b51a4544ff
Update README.rdoc 2018-05-10 13:12:52 -03:00
pedrofurtado
285bc769ba
Update README.rdoc 2017-12-29 13:45:39 -02:00
Adam Meehan
a0f2759c7a Merge pull request #160 from reiz/patch-1
Add license info to the gemspec.
2017-10-03 09:42:27 +11:00
Robert Reiz
cc57b1b758 Add license info to the gemspec. 2017-10-02 16:16:36 +02:00
Adam Meehan
d30cebfc7b Update gemfiles 2017-05-14 20:43:39 +10:00
Adam Meehan
a96c24268d Update travis ruby versions 2017-05-14 20:33:33 +10:00
Adam Meehan
13fcc32a83 Test model had wrong validation method 2017-05-14 20:12:36 +10:00
Adam Meehan
e8a96fe9b5 Set ruby version in gemfile 2017-05-14 20:12:14 +10:00
Adam Meehan
f9009995fc Update rspec and rails versions 2017-05-14 19:44:13 +10:00
Adam Meehan
5419a1cc42 Merge branch 'master' of github.com:adzap/validates_timeliness 2017-05-14 19:43:14 +10:00
Adam Meehan
9dd2e87087 Merge pull request #154 from yxf/master
Fixed version checking of ActiveModel
2017-05-14 19:35:49 +10:00
yxf
8a04deebfa Fixed version checking of ActiveModel 2017-05-14 17:07:24 +08:00
Aditya Kapoor
e9c9914c4f Allow the validator to take in the message option too. This is useful in those scenarios where we have a set of generic keys which we need to show.
This would eliminate the need to keeping multiple copies for the default keys set defined by gem.

    The following seems more apt than the later one:

    ```
    validates_date :start_at, on_or_after: :today, message: 'should not be in past'
    ```

    ```
    validates_date :start_at, on_or_after: :today, on_or_after_message: 'should not be in past'
    ```
2017-03-22 13:21:59 +05:30
Adam Meehan
0219c3850d minimum timeliness 0.3.8 2017-03-07 20:33:46 +11:00