From b26833c5af95bba8131f2cb4de5959af7902b9f1 Mon Sep 17 00:00:00 2001 From: jsugarman Date: Tue, 15 Jun 2021 09:02:39 +0100 Subject: [PATCH 1/4] Prepare version 4.2.0 --- CHANGELOG.md | 21 ++++++++++++++++++++- Gemfile.lock | 16 ++++++++-------- gov_uk_date_fields.gemspec | 3 ++- lib/gov_uk_date_fields/version.rb | 3 ++- 4 files changed, 32 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 825a1a3..f083c20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,25 @@ +# 4.2.0 + +* Fixes deprecation warnings when using rails 6.1, which may break in rails 6.2. + + ``` + DEPRECATION WARNING: Calling `<<` to an ActiveModel::Errors message array in order to add an error is deprecated. + Please call `ActiveModel::Errors#add` instead. + ``` + ``` + DEPRECATION WARNING: Calling `clear` to an ActiveModel::Errors message array in order to delete all errors is deprecated. + Please call `ActiveModel::Errors#delete` instead. + ``` + ``` + DEPRECATION WARNING: ActiveModel::Errors#keys is deprecated and will be removed in Rails 6.2. + To achieve the same use: + errors.attribute_names + ``` + # 4.1.0 -* Markup will produce inputs with `type="text" inputmode="numeric"`. +* Markup will produce inputs with `type="text" inputmode="numeric"`. + These are semantically correct and provides a better experience in most browsers, including mobile. More details in [this thread](https://github.com/alphagov/govuk-frontend/issues/1449#issuecomment-504006087) This change **might** break your code if you target the input (in javascript, CSS or cucumber for example) by `type="number"`. diff --git a/Gemfile.lock b/Gemfile.lock index 841290d..03d039c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - gov_uk_date_fields (4.1.0) + gov_uk_date_fields (4.2.0) rails (>= 5.0.7.2) GEM @@ -64,7 +64,7 @@ GEM mini_mime (>= 0.1.1) metaclass (0.0.4) method_source (0.8.2) - mini_mime (1.0.2) + mini_mime (1.1.0) mini_portile2 (2.4.0) minitest (5.11.3) minitest-reporters (1.1.7) @@ -74,7 +74,7 @@ GEM ruby-progressbar mocha (1.1.0) metaclass (~> 0.0.1) - nio4r (2.5.0) + nio4r (2.5.7) nokogiri (1.10.4) mini_portile2 (~> 2.4.0) pg (1.2.3) @@ -114,22 +114,22 @@ GEM method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (12.3.3) + rake (13.0.3) ruby-progressbar (1.8.1) - sprockets (3.7.2) + sprockets (4.0.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.1) + sprockets-rails (3.2.2) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - thor (0.20.3) + thor (1.1.0) thread_safe (0.3.6) tzinfo (1.2.5) thread_safe (~> 0.1) websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.4) + websocket-extensions (0.1.5) PLATFORMS ruby diff --git a/gov_uk_date_fields.gemspec b/gov_uk_date_fields.gemspec index 725f859..1c55cfe 100644 --- a/gov_uk_date_fields.gemspec +++ b/gov_uk_date_fields.gemspec @@ -7,8 +7,9 @@ require "gov_uk_date_fields/version" Gem::Specification.new do |s| s.name = "gov_uk_date_fields" s.version = GovUkDateFields::VERSION + s.date = GovUkDateFields::VERSION_RELEASED s.authors = ["Stephen Richards","Joel Sugarman"] - s.email = ["stephen@stephenrichards.eu"] + s.email = ["stephen.richards@digital.justice.gov.uk","joel.sugarman@digital.justice.gov.uk"] s.homepage = "https://github.com/ministryofjustice/gov_uk_date_fields" s.summary = "Enable day-month-year text edit fields for form date entry" s.description = "Provides acts_as_gov_uk_date to mark Rails model attributes " + diff --git a/lib/gov_uk_date_fields/version.rb b/lib/gov_uk_date_fields/version.rb index b9b8d3a..ca2de29 100644 --- a/lib/gov_uk_date_fields/version.rb +++ b/lib/gov_uk_date_fields/version.rb @@ -1,3 +1,4 @@ module GovUkDateFields - VERSION = "4.1.0" + VERSION = "4.2.0" + VERSION_RELEASED = "2021-06-16" end From afa36060899da8e20281bf52b71f7f1d1b3345a9 Mon Sep 17 00:00:00 2001 From: jsugarman Date: Wed, 16 Jun 2021 08:47:59 +0100 Subject: [PATCH 2/4] Add manifest to test app Fixes ``` Sprockets::Railtie::ManifestNeededError: Expected to find a manifest file in `app/assets/config/manifest.js` But did not, please create this file and use it to link any assets that need to be rendered by your app: Example: //= link_tree ../images //= link_directory ../javascripts .js //= link_directory ../stylesheets .css and restart your server ``` --- test/dummy/app/assets/config/manifest.js | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 test/dummy/app/assets/config/manifest.js diff --git a/test/dummy/app/assets/config/manifest.js b/test/dummy/app/assets/config/manifest.js new file mode 100644 index 0000000..b16e53d --- /dev/null +++ b/test/dummy/app/assets/config/manifest.js @@ -0,0 +1,3 @@ +//= link_tree ../images +//= link_directory ../javascripts .js +//= link_directory ../stylesheets .css From 8ad986f979e5f99dd17f7576a2424fde5a878ef5 Mon Sep 17 00:00:00 2001 From: jsugarman Date: Wed, 16 Jun 2021 09:35:13 +0100 Subject: [PATCH 3/4] Drop support for end-of-life rails version, below 5.2 --- CHANGELOG.md | 2 ++ gov_uk_date_fields.gemspec | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f083c20..76dcea4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # 4.2.0 +* BREAKING CHANGE: drop support for [End of life rails versions](https://endoflife.date/rails), name less that Rails 5.2 + * Fixes deprecation warnings when using rails 6.1, which may break in rails 6.2. ``` diff --git a/gov_uk_date_fields.gemspec b/gov_uk_date_fields.gemspec index 1c55cfe..90c959e 100644 --- a/gov_uk_date_fields.gemspec +++ b/gov_uk_date_fields.gemspec @@ -21,5 +21,5 @@ Gem::Specification.new do |s| s.require_paths = ["lib"] s.test_files = Dir["test/**/*"] - s.add_dependency 'rails', '>= 5.0.7.2' + s.add_dependency 'rails', '>= 5.2' end From 76da342d861bdcf7ba80ca208cc3af955f0cfc42 Mon Sep 17 00:00:00 2001 From: jsugarman Date: Wed, 16 Jun 2021 09:43:14 +0100 Subject: [PATCH 4/4] Update rails dependency to 5.2+ --- Gemfile.lock | 130 +++++++++++++++++++++++++++------------------------ 1 file changed, 69 insertions(+), 61 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 03d039c..005260e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,71 +2,76 @@ PATH remote: . specs: gov_uk_date_fields (4.2.0) - rails (>= 5.0.7.2) + rails (>= 5.2) GEM remote: https://rubygems.org/ specs: - actioncable (5.0.7.2) - actionpack (= 5.0.7.2) - nio4r (>= 1.2, < 3.0) - websocket-driver (~> 0.6.1) - actionmailer (5.0.7.2) - actionpack (= 5.0.7.2) - actionview (= 5.0.7.2) - activejob (= 5.0.7.2) + actioncable (5.2.6) + actionpack (= 5.2.6) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailer (5.2.6) + actionpack (= 5.2.6) + actionview (= 5.2.6) + activejob (= 5.2.6) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.0.7.2) - actionview (= 5.0.7.2) - activesupport (= 5.0.7.2) - rack (~> 2.0) - rack-test (~> 0.6.3) + actionpack (5.2.6) + actionview (= 5.2.6) + activesupport (= 5.2.6) + rack (~> 2.0, >= 2.0.8) + rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.0.7.2) - activesupport (= 5.0.7.2) + actionview (5.2.6) + activesupport (= 5.2.6) builder (~> 3.1) - erubis (~> 2.7.0) + erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.0.7.2) - activesupport (= 5.0.7.2) + activejob (5.2.6) + activesupport (= 5.2.6) globalid (>= 0.3.6) - activemodel (5.0.7.2) - activesupport (= 5.0.7.2) - activerecord (5.0.7.2) - activemodel (= 5.0.7.2) - activesupport (= 5.0.7.2) - arel (~> 7.0) - activesupport (5.0.7.2) + activemodel (5.2.6) + activesupport (= 5.2.6) + activerecord (5.2.6) + activemodel (= 5.2.6) + activesupport (= 5.2.6) + arel (>= 9.0) + activestorage (5.2.6) + actionpack (= 5.2.6) + activerecord (= 5.2.6) + marcel (~> 1.0.0) + activesupport (5.2.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) ansi (1.5.0) - arel (7.1.4) + arel (9.0.0) awesome_print (1.7.0) - builder (3.2.3) + builder (3.2.4) byebug (10.0.2) coderay (1.1.2) - concurrent-ruby (1.1.4) - crass (1.0.4) - erubis (2.7.0) + concurrent-ruby (1.1.9) + crass (1.0.6) + erubi (1.10.0) globalid (0.4.2) activesupport (>= 4.2.0) - i18n (0.9.5) + i18n (1.8.10) concurrent-ruby (~> 1.0) - loofah (2.2.3) + loofah (2.10.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) + marcel (1.0.1) metaclass (0.0.4) method_source (0.8.2) mini_mime (1.1.0) - mini_portile2 (2.4.0) - minitest (5.11.3) + mini_portile2 (2.5.3) + minitest (5.14.4) minitest-reporters (1.1.7) ansi builder @@ -75,8 +80,9 @@ GEM mocha (1.1.0) metaclass (~> 0.0.1) nio4r (2.5.7) - nokogiri (1.10.4) - mini_portile2 (~> 2.4.0) + nokogiri (1.11.7) + mini_portile2 (~> 2.5.0) + racc (~> 1.4) pg (1.2.3) pry (0.11.0) coderay (~> 1.1.0) @@ -84,36 +90,38 @@ GEM pry-byebug (3.6.0) byebug (~> 10.0) pry (~> 0.10) - rack (2.0.6) - rack-test (0.6.3) - rack (>= 1.0) - rails (5.0.7.2) - actioncable (= 5.0.7.2) - actionmailer (= 5.0.7.2) - actionpack (= 5.0.7.2) - actionview (= 5.0.7.2) - activejob (= 5.0.7.2) - activemodel (= 5.0.7.2) - activerecord (= 5.0.7.2) - activesupport (= 5.0.7.2) + racc (1.5.2) + rack (2.2.3) + rack-test (1.1.0) + rack (>= 1.0, < 3) + rails (5.2.6) + actioncable (= 5.2.6) + actionmailer (= 5.2.6) + actionpack (= 5.2.6) + actionview (= 5.2.6) + activejob (= 5.2.6) + activemodel (= 5.2.6) + activerecord (= 5.2.6) + activestorage (= 5.2.6) + activesupport (= 5.2.6) bundler (>= 1.3.0) - railties (= 5.0.7.2) + railties (= 5.2.6) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.1) actionpack (~> 5.x) actionview (~> 5.x) activesupport (~> 5.x) - rails-dom-testing (2.0.2) - activesupport (>= 4.2.0, < 6.0) - nokogiri (~> 1.6) - rails-html-sanitizer (1.0.4) - loofah (~> 2.2, >= 2.2.2) - railties (5.0.7.2) - actionpack (= 5.0.7.2) - activesupport (= 5.0.7.2) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.3.0) + loofah (~> 2.3) + railties (5.2.6) + actionpack (= 5.2.6) + activesupport (= 5.2.6) method_source rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) + thor (>= 0.19.0, < 2.0) rake (13.0.3) ruby-progressbar (1.8.1) sprockets (4.0.2) @@ -125,9 +133,9 @@ GEM sprockets (>= 3.0.0) thor (1.1.0) thread_safe (0.3.6) - tzinfo (1.2.5) + tzinfo (1.2.9) thread_safe (~> 0.1) - websocket-driver (0.6.5) + websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5)