Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix NoMethodError: undefined method `hour' for 1:Integer
We have to `require "active_support/time"` to define these helper methods, which are used to set the Cache-Control header in the [test][] and [development][] environments. I don't know why bumping the govuk_publishing_components gem from v23.10.1 to v23.12.1 has caused this issue in both [Static][] and [Feedback][] (nor why the tests passed on the PR and only subsequently failed after merge). Looking at the Gemfile.lock changes in Static (in 7c79e8d), there's no obvious culprit there. I tried reverting the versions of all dependencies except govuk_publishing_components, but the issue remained. Looking at the [diff between the gem versions][diff], there are no code changes that could have caused this, but there are a number of Gemfile.lock changes including a minor bump in `activesupport`, from 6.0 to 6.1, but we've already [upgraded activesupport via a rails bump][rails-bump], so I'm not sure why that would be an issue. It won't be a good use of time to investigate too much further, so I'm happy that this is a harmless change which unblocks us from deploying an important fix. Trello: https://trello.com/c/YhIIykse/2291-3-fix-cross-site-scripting-vulnerabilities [diff]: https://github.com/alphagov/govuk_publishing_components/compare/v23.10.1..v23.12.1 [development]: https://github.com/alphagov/static/blob/8d40903636dba086f855e3f18a99fa02af5055b8/config/environments/development.rb#L23 [test]: https://github.com/alphagov/static/blob/c2b5079b83094b540ad600663fe656a87bb50df9/config/environments/test.rb#L19 [Static]: #2379 [Feedback]: alphagov/feedback#1149 [rails-bump]: 962f64a
- Loading branch information