diff --git a/CHANGELOG b/CHANGELOG index 01ed40c..284f10e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,28 +1,40 @@ -[2008-11-13] - - allow uppercase meridian to be valid [reported by Alex (http://alex.digns.com/)] += 1.0.0 [2008-12-06] +- Gemified! +- Refactor of plugin into a Data Mapper style validator class which makes for a cleaner implementation and possible future Data Mapper support +- Added Rails 2.2 i18n support. Plugin error messages can specified in locale files. See README. +- ignore_datetime_restriction_errors setting has been moved from AR to ValidatesTimeliness::Validator.ignore_restriction_errors +- date_time_error_value_formats setting has been moved from AR to ValidatesTimeliness::Validator.error_value_formats +- Namespaced modules and specs +- Clean up of specs -[2008-10-28] - - fixed bug when dirty attributes not reflecting change when attribute changed from time value to nil [reported by Brad (pvjq)] - - fixes for Rails 2.2 compatibility. Will refactor in to Rails version specific branches in the future. += 0.1.0 [2008-12-06] +- Tagged plugin as version 0.1.0 -[2008-09-24] - - refactored attribute write method definitions += 2008-11-13 +- allow uppercase meridian to be valid [reported by Alex (http://alex.digns.com/)] -[2008-08-25] - - fixed bug for non-timezone write method not updating changed attributes hash [reported by Sylvestre Mergulhão] += 2008-10-28 +- fixed bug when dirty attributes not reflecting change when attribute changed from time value to nil [reported by Brad (pvjq)] +- fixes for Rails 2.2 compatibility. Will refactor in to Rails version specific branches in the future. -[2008-08-22] - - fixed bug with attribute cache not clearing on write for date and time columns [reported by Sylvestre Mergulhão] - - parse method returns Date object for date column assigned string as per normal Rails behaviour - - parse method returns same object type when assigned Date or Time object as per normal Rails behaviour += 2008-09-24 +- refactored attribute write method definitions -[2008-08-07] - - modified matcher option value parsing to allow same value types as validation method - - fixed matcher message += 2008-08-25 +- fixed bug for non-timezone write method not updating changed attributes hash [reported by Sylvestre Mergulhão] -[2008-08-02] - - refactored validation - - refactored matcher += 2008-08-22 +- fixed bug with attribute cache not clearing on write for date and time columns [reported by Sylvestre Mergulhão] +- parse method returns Date object for date column assigned string as per normal Rails behaviour +- parse method returns same object type when assigned Date or Time object as per normal Rails behaviour -[2008-07-30] - - removed setting values to nil when validation fails to preserve before_type_cast value += 2008-08-07 +- modified matcher option value parsing to allow same value types as validation method +- fixed matcher message + += 2008-08-02 +- refactored validation +- refactored matcher + += 2008-07-30 +- removed setting values to nil when validation fails to preserve before_type_cast value diff --git a/README.rdoc b/README.rdoc index 3a6ef10..08e51f2 100644 --- a/README.rdoc +++ b/README.rdoc @@ -27,9 +27,15 @@ think should be a valid date or time string. == INSTALLATION: +As plugin (from master) + ./script/plugin git://github.com/adzap/validates_timeliness - +As gem + + sudo gem install validates_timeliness + + == USAGE: To validate a model with a date, time or datetime attribute you just use the diff --git a/Rakefile b/Rakefile index 612eb44..2c41979 100644 --- a/Rakefile +++ b/Rakefile @@ -16,7 +16,7 @@ spec = Gem::Specification.new do |s| s.version = GEM_VERSION s.platform = Gem::Platform::RUBY s.has_rdoc = true - s.extra_rdoc_files = ["README.rdoc", "LICENSE", 'TODO'] + s.extra_rdoc_files = ["README.rdoc", "LICENSE", "TODO", "CHANGELOG"] s.summary = SUMMARY s.description = s.summary s.author = AUTHOR @@ -28,7 +28,7 @@ spec = Gem::Specification.new do |s| s.require_path = 'lib' s.autorequire = GEM - s.files = %w(LICENSE README.rdoc Rakefile TODO) + Dir.glob("{lib,spec}/**/*") + s.files = %w(LICENSE README.rdoc Rakefile TODO CHANGELOG) + Dir.glob("{lib,spec}/**/*") end task :default => :spec diff --git a/validates_timeliness.gemspec b/validates_timeliness.gemspec index 3531977..4a0ed16 100644 --- a/validates_timeliness.gemspec +++ b/validates_timeliness.gemspec @@ -10,8 +10,8 @@ Gem::Specification.new do |s| s.date = %q{2008-12-06} s.description = %q{Date and time validation plugin for Rails 2.x which allows custom formats} s.email = %q{adam.meehan@gmail.com} - s.extra_rdoc_files = ["README.rdoc", "LICENSE", "TODO"] - s.files = ["LICENSE", "README.rdoc", "Rakefile", "TODO", "lib/validates_timeliness", "lib/validates_timeliness/core_ext", "lib/validates_timeliness/core_ext/date.rb", "lib/validates_timeliness/core_ext/date_time.rb", "lib/validates_timeliness/core_ext/time.rb", "lib/validates_timeliness/action_view", "lib/validates_timeliness/action_view/instance_tag.rb", "lib/validates_timeliness/locale", "lib/validates_timeliness/locale/en.yml", "lib/validates_timeliness/validation_methods.rb", "lib/validates_timeliness/active_record", "lib/validates_timeliness/active_record/attribute_methods.rb", "lib/validates_timeliness/active_record/multiparameter_attributes.rb", "lib/validates_timeliness/formats.rb", "lib/validates_timeliness/validator.rb", "lib/validates_timeliness/spec", "lib/validates_timeliness/spec/rails", "lib/validates_timeliness/spec/rails/matchers", "lib/validates_timeliness/spec/rails/matchers/validate_timeliness.rb", "lib/validates_timeliness.rb", "spec/core_ext", "spec/core_ext/dummy_time_spec.rb", "spec/validator_spec.rb", "spec/action_view", "spec/action_view/instance_tag_spec.rb", "spec/ginger_scenarios.rb", "spec/validation_methods_spec.rb", "spec/spec_helper.rb", "spec/formats_spec.rb", "spec/active_record", "spec/active_record/attribute_methods_spec.rb", "spec/active_record/multiparameter_attributes_spec.rb", "spec/time_travel", "spec/time_travel/time_travel.rb", "spec/time_travel/time_extensions.rb", "spec/time_travel/MIT-LICENSE", "spec/spec", "spec/spec/rails", "spec/spec/rails/matchers", "spec/spec/rails/matchers/validate_timeliness_spec.rb", "spec/resources", "spec/resources/person.rb", "spec/resources/sqlite_patch.rb", "spec/resources/schema.rb", "spec/resources/application.rb"] + s.extra_rdoc_files = ["README.rdoc", "LICENSE", "TODO", "CHANGELOG"] + s.files = ["LICENSE", "README.rdoc", "Rakefile", "TODO", "CHANGELOG", "lib/validates_timeliness", "lib/validates_timeliness/core_ext", "lib/validates_timeliness/core_ext/date.rb", "lib/validates_timeliness/core_ext/date_time.rb", "lib/validates_timeliness/core_ext/time.rb", "lib/validates_timeliness/action_view", "lib/validates_timeliness/action_view/instance_tag.rb", "lib/validates_timeliness/locale", "lib/validates_timeliness/locale/en.yml", "lib/validates_timeliness/validation_methods.rb", "lib/validates_timeliness/active_record", "lib/validates_timeliness/active_record/attribute_methods.rb", "lib/validates_timeliness/active_record/multiparameter_attributes.rb", "lib/validates_timeliness/formats.rb", "lib/validates_timeliness/validator.rb", "lib/validates_timeliness/spec", "lib/validates_timeliness/spec/rails", "lib/validates_timeliness/spec/rails/matchers", "lib/validates_timeliness/spec/rails/matchers/validate_timeliness.rb", "lib/validates_timeliness.rb", "spec/core_ext", "spec/core_ext/dummy_time_spec.rb", "spec/validator_spec.rb", "spec/action_view", "spec/action_view/instance_tag_spec.rb", "spec/ginger_scenarios.rb", "spec/validation_methods_spec.rb", "spec/spec_helper.rb", "spec/formats_spec.rb", "spec/active_record", "spec/active_record/attribute_methods_spec.rb", "spec/active_record/multiparameter_attributes_spec.rb", "spec/time_travel", "spec/time_travel/time_travel.rb", "spec/time_travel/time_extensions.rb", "spec/time_travel/MIT-LICENSE", "spec/spec", "spec/spec/rails", "spec/spec/rails/matchers", "spec/spec/rails/matchers/validate_timeliness_spec.rb", "spec/resources", "spec/resources/person.rb", "spec/resources/sqlite_patch.rb", "spec/resources/schema.rb", "spec/resources/application.rb"] s.has_rdoc = true s.homepage = %q{http://duckpunching.com} s.require_paths = ["lib"]