From ee22206e898794a8f97b99c6fc9c9670ed88e5fd Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Wed, 2 Nov 2022 13:52:35 +0000 Subject: [PATCH] Bump Ruby to v3.1.2 (#339) - bump Ruby to v3.1.2 - enable creation of PRs by dependabot --- .github/dependabot.yml | 22 +++ .github/workflows/ci.yml | 2 +- .tool-versions | 4 +- Dockerfile | 4 +- Gemfile | 22 +-- Gemfile.lock | 229 ++++++++++++++++-------------- app/helpers/application_helper.rb | 4 +- 7 files changed, 161 insertions(+), 126 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..528db9c06 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,22 @@ +--- +version: 2 +updates: + - package-ecosystem: bundler + directory: "/" + schedule: + interval: weekly + day: sunday + open-pull-requests-limit: 5 + versioning-strategy: auto + labels: + - dependencies + + - package-ecosystem: npm + directory: "/" + schedule: + interval: weekly + day: sunday + open-pull-requests-limit: 5 + versioning-strategy: auto + labels: + - dependencies diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 468122853..aa2718363 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.1.0 + ruby-version: 3.1.2 - name: Set up ruby gem cache uses: actions/cache@v1 diff --git a/.tool-versions b/.tool-versions index 8cb111a29..97ae5abc2 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -ruby 3.1.0 -nodejs 17.6.0 +ruby 3.1.2 +nodejs 18.11.0 diff --git a/Dockerfile b/Dockerfile index f2f5e4b3f..ad3030b06 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # ------------------------------------------------------------------------------ # Base # ------------------------------------------------------------------------------ -FROM ruby:3.1.0-alpine as base +FROM ruby:3.1.2-alpine as base RUN apk add --no-cache --no-progress build-base less curl tzdata gcompat \ "busybox>=1.34.1-r5" \ @@ -41,7 +41,7 @@ RUN bundle config set without development test ui RUN bundle install --no-binstubs --retry=10 --jobs=4 # ------------------------------------------------------------------------------ -# Production Stage - nodejs v16.14.2, postgresql v13.6 +# Production Stage - nodejs v16.17.1, postgresql v14.5, chromium v102.0.5005.182 # ------------------------------------------------------------------------------ FROM base AS app diff --git a/Gemfile b/Gemfile index 7e1dd8113..cff9254d0 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '3.1.0' +ruby '3.1.2' # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" gem 'rails', '>= 7.0.4' @@ -10,10 +10,10 @@ gem 'rails', '>= 7.0.4' gem 'sprockets-rails' # Use postgresql as the database for Active Record -gem 'pg', '~> 1.1' +gem 'pg' # Use the Puma web server [https://github.com/puma/puma] -gem 'puma', '~> 5.6' +gem 'puma' # Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails] gem 'importmap-rails' @@ -39,20 +39,20 @@ gem 'bootsnap', require: false gem 'devise' # HTML abstraction markup language -gem 'slim-rails', '~> 3.4', '>= 3.4.0' +gem 'slim-rails' # Create models from static data such as hashes or YAML gem 'active_hash' # TODO: add ey-recovery to https://github.com/DFE-Digital/govuk-components -gem 'govuk-components', '>= 3.0.3' +gem 'govuk-components' gem 'govuk_design_system_formbuilder' # Markdown support -gem 'govspeak', '~> 6.8', '>= 6.8.2' -gem 'sassc', '~> 2.4' # govspeak assets +gem 'govspeak' +gem 'sassc' # govspeak assets -gem 'govuk_notify_rails', '~> 2.2', '>= 2.2.0' +gem 'govuk_notify_rails' # Sentry -Monitor errors gem 'sentry-rails' @@ -65,17 +65,17 @@ gem 'uk_postcode' gem 'dibber' # Track users -gem 'ahoy_matey', '~> 4.0' +gem 'ahoy_matey' # PDF generator middleware -gem 'grover', '~> 1.1' +gem 'grover' # Pa11y accessibility testing gem 'sitemap_generator' group :development, :test do # Use fake data for specs - gem 'dotenv-rails', '~> 2.7', '>= 2.7.6' + gem 'dotenv-rails' gem 'faker' gem 'foreman' gem 'pry-byebug' diff --git a/Gemfile.lock b/Gemfile.lock index 41902eb1e..e02f2f44b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -46,7 +46,7 @@ GEM erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - active_hash (3.1.0) + active_hash (3.1.1) activesupport (>= 5.0.0) activejob (7.0.4) activesupport (= 7.0.4) @@ -68,15 +68,15 @@ GEM i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) - ahoy_matey (4.0.3) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) + ahoy_matey (4.1.0) activesupport (>= 5.2) device_detector safely_block (>= 0.2.1) ast (2.4.2) backports (3.23.0) - bcrypt (3.1.17) + bcrypt (3.1.18) better_errors (2.9.1) coderay (>= 1.0.0) erubi (>= 1.0.0) @@ -84,7 +84,7 @@ GEM bindex (0.8.1) binding_of_caller (1.0.0) debug_inspector (>= 0.0.1) - bootsnap (1.11.1) + bootsnap (1.13.0) msgpack (~> 1.2) builder (3.2.4) byebug (11.1.3) @@ -104,13 +104,12 @@ GEM ruby-rc4 (>= 0.1.5) concurrent-ruby (1.1.10) crass (1.0.6) - cssbundling-rails (1.1.0) + cssbundling-rails (1.1.1) railties (>= 6.0.0) - debug (1.4.0) + debug (1.6.3) irb (>= 1.3.6) - reline (>= 0.2.7) + reline (>= 0.3.1) debug_inspector (1.1.0) - deep_merge (1.2.2) device_detector (1.0.7) devise (4.8.1) bcrypt (~> 3.0) @@ -118,14 +117,14 @@ GEM railties (>= 4.1.0) responders warden (~> 1.2.3) - dibber (0.6.0) + dibber (0.7.0) diff-lcs (1.5.0) docile (1.4.0) - dotenv (2.7.6) - dotenv-rails (2.7.6) - dotenv (= 2.7.6) + dotenv (2.8.1) + dotenv-rails (2.8.1) + dotenv (= 2.8.1) railties (>= 3.2) - dry-inflector (0.2.1) + dry-inflector (0.3.0) errbase (0.2.2) erubi (1.11.0) factory_bot (6.2.1) @@ -133,46 +132,51 @@ GEM factory_bot_rails (6.2.0) factory_bot (~> 6.2.0) railties (>= 5.0.0) - faker (2.20.0) + faker (2.23.0) i18n (>= 1.8.11, < 2) ffi (1.15.5) foreman (0.87.2) globalid (1.0.0) activesupport (>= 5.0) - govspeak (6.8.2) + govspeak (7.0.0) actionview (>= 6) addressable (>= 2.3.8, < 3) govuk_publishing_components (>= 23) htmlentities (~> 4) i18n (>= 0.7) - kramdown (>= 2.3.0) + kramdown (>= 2.3.1) nokogiri (~> 1.12) rinku (~> 2.0) sanitize (~> 6) - govuk-components (3.0.3) + govuk-components (3.2.2) + actionpack (>= 6.1) activemodel (>= 6.1) + html-attributes-utils (~> 0.9, >= 0.9.2) + pagy (~> 5.10.1) railties (>= 6.1) - view_component (~> 2.49.1) - govuk_app_config (4.5.0) + view_component (~> 2.74.1) + govuk_app_config (4.10.1) logstasher (~> 2.1) + plek (~> 4) prometheus_exporter (~> 2.0) - puma (~> 5.6) - sentry-rails (~> 5.2) - sentry-ruby (~> 5.2) + puma (>= 5.6, < 7.0) + rack-proxy (~> 0.7) + sentry-rails (~> 5.3) + sentry-ruby (~> 5.3) statsd-ruby (~> 1.5) unicorn (~> 6.1) - govuk_design_system_formbuilder (3.0.2) + govuk_design_system_formbuilder (3.1.2) actionview (>= 6.1) activemodel (>= 6.1) activesupport (>= 6.1) - deep_merge (~> 1.2.1) + html-attributes-utils (~> 0.9, >= 0.9.2) govuk_notify_rails (2.2.0) notifications-ruby-client (~> 5.1) rails (>= 4.1.0) - govuk_personalisation (0.11.2) + govuk_personalisation (0.12.0) plek (>= 1.9.0) rails (>= 6, < 8) - govuk_publishing_components (29.3.0) + govuk_publishing_components (31.2.0) govuk_app_config govuk_personalisation (>= 0.7.0) kramdown @@ -180,26 +184,29 @@ GEM rails (>= 6) rouge sprockets (>= 3) - grover (1.1.1) + grover (1.1.2) combine_pdf (~> 1.0) nokogiri (~> 1.0) + html-attributes-utils (0.9.2) + activesupport (>= 6.1.4.4) htmlentities (4.3.4) i18n (1.12.0) concurrent-ruby (~> 1.0) - importmap-rails (1.0.3) + importmap-rails (1.1.5) actionpack (>= 6.0.0) railties (>= 6.0.0) io-console (0.5.11) - irb (1.4.1) + irb (1.4.2) reline (>= 0.3.0) jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) - jsbundling-rails (1.0.2) + jsbundling-rails (1.0.3) railties (>= 6.0.0) - jwt (2.3.0) + json (2.6.2) + jwt (2.5.0) kgio (2.11.4) - kramdown (2.3.2) + kramdown (2.4.0) rexml launchy (2.5.0) addressable (~> 2.7) @@ -216,7 +223,7 @@ GEM method_source (1.0.0) mini_mime (1.1.2) minitest (5.16.3) - msgpack (1.4.5) + msgpack (1.6.0) net-imap (0.3.1) net-protocol net-pop (0.1.2) @@ -234,32 +241,36 @@ GEM racc (~> 1.4) nokogiri (1.13.9-x86_64-linux) racc (~> 1.4) - notifications-ruby-client (5.3.0) + notifications-ruby-client (5.4.0) jwt (>= 1.5, < 3) orm_adapter (0.5.0) - parallel (1.22.0) - parser (3.1.1.0) + pagy (5.10.1) + activesupport + parallel (1.22.1) + parser (3.1.2.1) ast (~> 2.4.1) - pg (1.3.4) - plek (4.0.0) - prometheus_exporter (2.0.2) + pg (1.4.4) + plek (4.1.0) + prometheus_exporter (2.0.3) webrick - pry (0.13.1) + pry (0.14.1) coderay (~> 1.1) method_source (~> 1.0) - pry-byebug (3.9.0) + pry-byebug (3.10.1) byebug (~> 11.0) - pry (~> 0.13.0) + pry (>= 0.13, < 0.15) pry-doc (1.3.0) pry (~> 0.11) yard (~> 0.9.11) pry-rails (0.3.9) pry (>= 0.10.4) - public_suffix (4.0.7) - puma (5.6.4) + public_suffix (5.0.0) + puma (6.0.0) nio4r (~> 2.0) racc (1.6.0) rack (2.2.4) + rack-proxy (0.7.4) + rack rack-test (2.0.2) rack (>= 1.3) rails (7.0.4) @@ -292,7 +303,7 @@ GEM raindrops (0.20.0) rake (13.0.6) redcarpet (3.5.1) - regexp_parser (2.5.0) + regexp_parser (2.6.0) reline (0.3.1) io-console (~> 0.5) request_store (1.5.1) @@ -302,52 +313,53 @@ GEM railties (>= 5.0) rexml (3.2.5) rinku (2.0.6) - rouge (3.28.0) - rspec-core (3.11.0) - rspec-support (~> 3.11.0) - rspec-expectations (3.11.0) + rouge (4.0.0) + rspec-core (3.12.0) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) - rspec-mocks (3.11.0) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) - rspec-rails (5.1.1) - actionpack (>= 5.2) - activesupport (>= 5.2) - railties (>= 5.2) - rspec-core (~> 3.10) - rspec-expectations (~> 3.10) - rspec-mocks (~> 3.10) - rspec-support (~> 3.10) - rspec-support (3.11.0) - rubocop (1.25.0) + rspec-support (~> 3.12.0) + rspec-rails (6.0.1) + actionpack (>= 6.1) + activesupport (>= 6.1) + railties (>= 6.1) + rspec-core (~> 3.11) + rspec-expectations (~> 3.11) + rspec-mocks (~> 3.11) + rspec-support (~> 3.11) + rspec-support (3.12.0) + rubocop (1.37.1) + json (~> 2.3) parallel (~> 1.10) - parser (>= 3.1.0.0) + parser (>= 3.1.2.1) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.15.1, < 2.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.23.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.15.1) - parser (>= 3.0.1.1) - rubocop-govuk (4.3.0) - rubocop (= 1.25.0) - rubocop-ast (= 1.15.1) - rubocop-rails (= 2.13.2) + rubocop-ast (1.23.0) + parser (>= 3.1.1.0) + rubocop-govuk (4.8.0) + rubocop (= 1.37.1) + rubocop-ast (= 1.23.0) + rubocop-rails (= 2.17.1) rubocop-rake (= 0.6.0) - rubocop-rspec (= 2.7.0) - rubocop-performance (1.13.3) + rubocop-rspec (= 2.14.1) + rubocop-performance (1.15.0) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) - rubocop-rails (2.13.2) + rubocop-rails (2.17.1) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 1.7.0, < 2.0) + rubocop (>= 1.33.0, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (2.7.0) - rubocop (~> 1.19) + rubocop-rspec (2.14.1) + rubocop (~> 1.33) ruby-progressbar (1.11.0) ruby-rc4 (0.1.5) rubyzip (2.3.2) @@ -358,18 +370,16 @@ GEM nokogiri (>= 1.12.0) sassc (2.4.0) ffi (~> 1.9) - selenium-webdriver (4.1.0) + selenium-webdriver (4.5.0) childprocess (>= 0.5, < 5.0) rexml (~> 3.2, >= 3.2.5) - rubyzip (>= 1.2.2) - sentry-rails (5.2.1) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) + sentry-rails (5.5.0) railties (>= 5.0) - sentry-ruby-core (~> 5.2.1) - sentry-ruby (5.2.1) + sentry-ruby (~> 5.5.0) + sentry-ruby (5.5.0) concurrent-ruby (~> 1.0, >= 1.0.2) - sentry-ruby-core (= 5.2.1) - sentry-ruby-core (5.2.1) - concurrent-ruby show_me_the_cookies (6.0.0) capybara (>= 2, < 4) simplecov (0.21.2) @@ -388,11 +398,11 @@ GEM slim (4.1.0) temple (>= 0.7.6, < 0.9) tilt (>= 2.0.6, < 2.1) - slim-rails (3.4.0) + slim-rails (3.5.1) actionpack (>= 3.1) railties (>= 3.1) slim (>= 3.0, < 5.0) - sprockets (4.0.3) + sprockets (4.1.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.4.2) @@ -400,24 +410,26 @@ GEM activesupport (>= 5.2) sprockets (>= 3.0.0) statsd-ruby (1.5.0) - stimulus-rails (1.0.4) + stimulus-rails (1.1.1) railties (>= 6.0.0) temple (0.8.2) thor (1.2.1) - tilt (2.0.10) + tilt (2.0.11) timeout (0.3.0) - turbo-rails (1.0.1) + turbo-rails (1.3.2) actionpack (>= 6.0.0) + activejob (>= 6.0.0) railties (>= 6.0.0) tzinfo (2.0.5) concurrent-ruby (~> 1.0) - uk_postcode (2.1.7) - unicode-display_width (2.1.0) + uk_postcode (2.1.8) + unicode-display_width (2.3.0) unicorn (6.1.0) kgio (~> 2.6) raindrops (~> 0.7) - view_component (2.49.1) + view_component (2.74.1) activesupport (>= 5.0.0, < 8.0) + concurrent-ruby (~> 1.0) method_source (~> 1.0) warden (1.2.9) rack (>= 2.0.9) @@ -427,18 +439,19 @@ GEM bindex (>= 0.4.0) railties (>= 6.0.0) webrick (1.7.0) + websocket (1.2.9) websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - yard (0.9.27) + yard (0.9.28) webrick (~> 1.7.0) yard-junk (0.0.9) backports (>= 3.18) rainbow yard - zeitwerk (2.6.1) + zeitwerk (2.6.2) PLATFORMS aarch64-linux-musl @@ -451,7 +464,7 @@ PLATFORMS DEPENDENCIES active_hash - ahoy_matey (~> 4.0) + ahoy_matey better_errors binding_of_caller bootsnap @@ -460,31 +473,31 @@ DEPENDENCIES debug devise dibber - dotenv-rails (~> 2.7, >= 2.7.6) + dotenv-rails dry-inflector factory_bot_rails faker foreman - govspeak (~> 6.8, >= 6.8.2) - govuk-components (>= 3.0.3) + govspeak + govuk-components govuk_design_system_formbuilder - govuk_notify_rails (~> 2.2, >= 2.2.0) - grover (~> 1.1) + govuk_notify_rails + grover importmap-rails jbuilder jsbundling-rails launchy - pg (~> 1.1) + pg pry-byebug pry-doc pry-rails - puma (~> 5.6) + puma rails (>= 7.0.4) redcarpet rspec-rails rubocop-govuk rubocop-performance - sassc (~> 2.4) + sassc selenium-webdriver sentry-rails sentry-ruby @@ -492,7 +505,7 @@ DEPENDENCIES simplecov site_prism sitemap_generator - slim-rails (~> 3.4, >= 3.4.0) + slim-rails sprockets-rails stimulus-rails turbo-rails @@ -502,7 +515,7 @@ DEPENDENCIES yard-junk RUBY VERSION - ruby 3.1.0p0 + ruby 3.1.2p20 BUNDLED WITH 2.3.3 diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a90baa739..70ac23456 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -21,8 +21,8 @@ def configuration_summary_list { key: { text: 'Rails version' }, value: { text: Rails.version } }, { key: { text: 'Ruby version' }, value: { text: RUBY_VERSION } }, { key: { - text: 'GOV.UK Frontend', - }, + text: 'GOV.UK Frontend', + }, value: { text: JSON .parse(File.read(Rails.root.join('package.json')))