adzap/validates_timeliness
64.0
Adequate · 19 September 2026
496
lines of production code
Ruby
primary language
1
measurement over time
What this system is
ValidatesTimeliness is a Ruby gem that provides robust date, time, and datetime validation for Rails applications. It integrates with the ActiveModel type system to handle parsing, type casting, and timezone awareness, while offering extensions for form helpers and multiparameter attribute handling. The library supports both ActiveRecord and standalone ActiveModel contexts, allowing developers to enforce temporal constraints with customizable error messages and configuration options.
Removals
Removal of autotest RSpec2 discovery configuration
The autotest/discover.rb file has been removed, eliminating the automatic discovery configuration that previously linked the autotest tool to RSpec2. This change reflects the project's shift away from using autotest for test execution.
autotest · high confidence
Behavioural changes
Improved form redisplay and multiparameter time handling for Rails compatibility
The DateTimeSelect extension now intercepts form helpers to reuse raw parameter values, ensuring that invalid date and time inputs are redisplayed to the user for correction rather than appearing as blanks. Additionally, the multiparameter handler has been updated to integrate with ActiveModel type classes (Date, Time, DateTime), allowing these types to correctly process and validate multiparameter assignments while maintaining backward compatibility.
_lib/validates\timeliness/extensions · high confidence
Install generator now creates local configuration files
The ValidatesTimeliness install generator has been updated to copy default configuration files directly into the application during installation. Specifically, it now generates a local initializer at config/initializers/validates\_timeliness.rb and a locale file at config/locales/validates\_timeliness.en.yml, allowing users to customize these settings locally rather than relying on the gem's internal defaults.
_lib/generators/validates\timeliness · high confidence
Installer now generates a local configuration file
The installation process has been updated to generate a local \validates\_timeliness.rb\ configuration file in the application directory rather than loading a shared default. This new template includes commented-out options for extending ORMs (defaulting to Active Record), setting timezones, enabling date/time select extensions, handling multiparameter values, and configuring the parser, allowing users to customize behavior directly in their own codebase. The English locale file has also been moved into the generator templates directory to support this new installation structure.
_lib/generators/validates\timeliness/templates · high confidence
Migrates to Timeliness gem and introduces configurable ORM extension
The library now delegates core parsing and configuration to the external 'timeliness' gem, replacing the previous internal conversion module. Users can now configure whether to extend specific ORMs (like Active Record) via a new \extend\_orms\ setting and a \setup\ block, rather than having extensions applied automatically. The change also introduces configuration options for ignoring restriction errors, using shorthand symbols for date/time restrictions, and selecting between the default or plugin-based date parsers.
lib · high confidence
Refactored ORM integration to use ActiveSupport on\_load hooks and separate ActiveModel support
The ActiveRecord extension now uses an ActiveSupport on\_load hook to include validation modules, ensuring proper initialization timing, and provides a specific implementation for reading attribute values before type casting via read\_attribute\_before\_type\_cast. A new ActiveModel ORM module was added to support validations without ActiveRecord, implementing read\_timeliness\_attribute\_before\_type\_cast using the @attributes hash. These changes replace previous method override logic with a cleaner, hook-based approach that improves compatibility and reduces thread-safety issues.
_lib/validates\timeliness/orm · high confidence
ValidatesTimeliness 8.0.0 adds Rails 8 support and refactors build tooling
This release updates the gem to support Rails 8.x, as indicated by the new Appraisals configuration for rails 8.0.0 and the CHANGELOG entry for version 8.0.0. The build infrastructure has been modernized by switching from manual Rake tasks to Bundler gem helper tasks and the Appraisal gem for managing multi-version testing. Additionally, the test suite configuration has been updated to use the 'documentation' format and the 'debug' gem instead of 'byebug'.
(repo-wide) · high confidence
ValidatesTimeliness upgraded to v8.0.0 with ActiveModel type system integration
The validates\_timeliness gem has been upgraded to version 8.0.0, introducing a significant architectural shift by integrating with the ActiveModel type system. This change replaces the previous conversion module with new \AttributeMethods\ that prepend to \ActiveModel::Type::Date\, \Time\, and \DateTime\ to handle parsing and timezone awareness more robustly. The validator now utilizes a dedicated \Converter\ class for type casting and parsing, supports the \validates\_timeliness\_of\ helper, and improves handling of restriction errors and error message formatting. This update ensures better compatibility with modern Rails versions and ActiveModel validations.
_lib/validates\timeliness · high confidence
Test coverage
Added and updated test coverage for validates\_timeliness; Added and updated tests for validator options; Added test coverage for ActiveRecord validation and attribute parsing; Added test coverage for DateTimeSelect and Multiparameter extensions; Migrate test suite to RSpec 3 and modernize test infrastructure; New spec support helpers for configuration, model validation, and HTML matching.
Dependencies
Added Rails 8.0 compatibility gemfile
A new gemfile (gemfiles/rails\_8\_0.gemfile) has been added to support testing against Rails 8.0. This file pins Rails to version 8.0.0, updates rspec-rails to version 6.0, sets sqlite3 to version 2.0, and replaces the byebug gem with the debug gem, aligning the development environment with the upcoming Rails 8 release requirements.
gemfiles · high confidence
Upgrade to Rails 8 and modernize Ruby dependencies
The gem now requires ActiveModel 8.0+ and Rails 8.0+, dropping support for older Rails versions. Development dependencies have been updated to use modern versions of RSpec (6.0), SQLite3 (2.0), and the debug gem, replacing legacy tools like ruby-debug and timecop. The gemspec has been standardized to use the gemspec file for dependency management, and the source URL has been updated to HTTPS.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 64.
Lenses
- Code Health 100
- Architecture 69
- Maturity 50
- Readiness 74
- Security 94
Changes since last survey
- 300 commits — 263 feature/other, 37 fixes
By area
- (root) — 125 commits
- lib/validates_timeliness — 90 commits
- (repo) — 33 commits
- spec/validates_timeliness — 23 commits
- spec/spec_helper.rb — 7 commits
- .github/workflows — 5 commits
- spec/support — 4 commits
- lib/generators — 3 commits
- gemfiles/rails_5_0.gemfile — 2 commits
- lib/validates_timeliness.rb — 2 commits
- .github/dependabot.yml — 1 commit
- autotest/discover.rb — 1 commit
- gemfiles/rails_3_0.gemfile — 1 commit
- gemfiles/rails_4_0.gemfile — 1 commit
- gemfiles/rails_7_0.gemfile — 1 commit
- gemfiles/rails_8_0.gemfile — 1 commit
Notable commits
- fix: A fix for ActiveRecord 3.1.x and plugin parser not working together (issue #52)
- fix: Can use simple Mongoid inclusion now that fixed Concern usage is released (a while ago)
- fix: Datetime select extension fixes with help from @johncarney's fork
- fix: Fix DateTimeSelect extension for Rails 3.1.0
- fix: Fix DateTimeSelect extension to use integers from param values.
- fix: Fix read_timeliness_attribute_before_type_cast
- fix: Fix before_type_cast for non-dirty attributes (issue #52).
- fix: Fix brokena and brittle tests
- fix: Fix for Mongoid shim for reload which was nicely moved into a module to allow super
- fix: Fix for running tests in non-Australian timezones
- fix: Fix for validates :timeliness form to add attributes to plugin set
- fix: Fix issue#166 alias_method_chain not working in Rails 5
- fix: Fix load order issue for AR extension using Railite
- fix: Fix multiparameter extension to not allow partial dates as per ActiveRecord implementation.
- fix: Fix multiparameter extension to work with ActiveRecord 3.1
- fix: Fix shadowing
- fix: Fix thread lock on undefine
- fix: Fix type_cast_value for values which don't respond to to_time or to_date (renatoelias)
- fix: Fix undefine_attribute_methods spec
- fix: Fix zone in test
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
adzap/validates_timeliness was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 19 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit a36d6f7f24da8d2ebcfea9b729bf7057d852b683 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-13a154b7f5d1.