diff --git a/.github/workflows/rubyonrails.yml b/.github/workflows/rubyonrails.yml index daec6bb6..df5ba71f 100644 --- a/.github/workflows/rubyonrails.yml +++ b/.github/workflows/rubyonrails.yml @@ -37,7 +37,7 @@ jobs: uses: actions/checkout@v4 - name: Install Ruby and gems - uses: ruby/setup-ruby@v1.159.0 + uses: ruby/setup-ruby@v1.161.0 with: bundler-cache: true diff --git a/Gemfile b/Gemfile index 1e4dda0e..966e3170 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby '3.2.2' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '~> 7.1.1' +gem 'rails', '~> 7.1.2' # Use sqlite3 as the database for Active Record gem 'sqlite3', '~> 1.6' # Use Puma as the app server @@ -43,13 +43,13 @@ gem 'roo', '~> 2.10.0' gem 'canonical-rails', github: 'jumph4x/canonical-rails' # For environment variables -gem 'aws-sdk-ssm', '~> 1.159.0' +gem 'aws-sdk-ssm', '~> 1.160.0' # Add rate limiting on the API gem 'rack-attack', '~> 6.7.0' # GOV.UK Frontend helpers -gem 'ccs-frontend_helpers', '~> 0.1.1' +gem 'ccs-frontend_helpers', '~> 0.1.2' group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console @@ -69,7 +69,7 @@ group :development do gem 'listen', '~> 3.8' gem 'web-console', '~> 4.2.1' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring - gem 'spring', '~> 4.1.1' + gem 'spring', '~> 4.1.2' gem 'spring-watcher-listen', '~> 2.1.0' end diff --git a/Gemfile.lock b/Gemfile.lock index 918ce46a..a9f26d9e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/jumph4x/canonical-rails.git - revision: 11b9008593c9276cbb24e4710d7e43fa4c316879 + revision: 31aac4a84a1a1972fd157419f7f2e354e8b2d55d specs: canonical-rails (0.2.15) actionview (>= 4.1, <= 7.2) @@ -8,73 +8,74 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (7.1.1) - actionpack (= 7.1.1) - activesupport (= 7.1.1) + actioncable (7.1.2) + actionpack (= 7.1.2) + activesupport (= 7.1.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.1.1) - actionpack (= 7.1.1) - activejob (= 7.1.1) - activerecord (= 7.1.1) - activestorage (= 7.1.1) - activesupport (= 7.1.1) + actionmailbox (7.1.2) + actionpack (= 7.1.2) + activejob (= 7.1.2) + activerecord (= 7.1.2) + activestorage (= 7.1.2) + activesupport (= 7.1.2) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.1.1) - actionpack (= 7.1.1) - actionview (= 7.1.1) - activejob (= 7.1.1) - activesupport (= 7.1.1) + actionmailer (7.1.2) + actionpack (= 7.1.2) + actionview (= 7.1.2) + activejob (= 7.1.2) + activesupport (= 7.1.2) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.2) - actionpack (7.1.1) - actionview (= 7.1.1) - activesupport (= 7.1.1) + actionpack (7.1.2) + actionview (= 7.1.2) + activesupport (= 7.1.2) nokogiri (>= 1.8.5) + racc rack (>= 2.2.4) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - actiontext (7.1.1) - actionpack (= 7.1.1) - activerecord (= 7.1.1) - activestorage (= 7.1.1) - activesupport (= 7.1.1) + actiontext (7.1.2) + actionpack (= 7.1.2) + activerecord (= 7.1.2) + activestorage (= 7.1.2) + activesupport (= 7.1.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.1.1) - activesupport (= 7.1.1) + actionview (7.1.2) + activesupport (= 7.1.2) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.1.1) - activesupport (= 7.1.1) + activejob (7.1.2) + activesupport (= 7.1.2) globalid (>= 0.3.6) - activemodel (7.1.1) - activesupport (= 7.1.1) - activerecord (7.1.1) - activemodel (= 7.1.1) - activesupport (= 7.1.1) + activemodel (7.1.2) + activesupport (= 7.1.2) + activerecord (7.1.2) + activemodel (= 7.1.2) + activesupport (= 7.1.2) timeout (>= 0.4.0) activerecord-postgis-adapter (9.0.1) activerecord (~> 7.1.0) rgeo-activerecord (~> 7.0.0) - activestorage (7.1.1) - actionpack (= 7.1.1) - activejob (= 7.1.1) - activerecord (= 7.1.1) - activesupport (= 7.1.1) + activestorage (7.1.2) + actionpack (= 7.1.2) + activejob (= 7.1.2) + activerecord (= 7.1.2) + activesupport (= 7.1.2) marcel (~> 1.0) - activesupport (7.1.1) + activesupport (7.1.2) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) @@ -89,11 +90,11 @@ GEM rails (>= 5.0) ast (2.4.2) aws-eventstream (1.2.0) - aws-partitions (1.839.0) + aws-partitions (1.853.0) aws-sdk-cognitoidentityprovider (1.82.0) aws-sdk-core (~> 3, >= 3.184.0) aws-sigv4 (~> 1.1) - aws-sdk-core (3.185.1) + aws-sdk-core (3.187.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.5) @@ -101,16 +102,16 @@ GEM aws-sdk-kms (1.72.0) aws-sdk-core (~> 3, >= 3.184.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.136.0) + aws-sdk-s3 (1.137.0) aws-sdk-core (~> 3, >= 3.181.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.6) - aws-sdk-ssm (1.159.0) + aws-sdk-ssm (1.160.0) aws-sdk-core (~> 3, >= 3.184.0) aws-sigv4 (~> 1.1) - aws-sigv4 (1.6.0) + aws-sigv4 (1.6.1) aws-eventstream (~> 1, >= 1.0.2) - base64 (0.1.1) + base64 (0.2.0) better_html (2.0.2) actionview (>= 6.0) activesupport (>= 6.0) @@ -125,12 +126,12 @@ GEM brakeman (6.0.1) builder (3.2.4) byebug (11.1.3) - ccs-frontend_helpers (0.1.1) + ccs-frontend_helpers (0.1.2) rails (>= 6.0) concurrent-ruby (1.2.2) connection_pool (2.4.1) crass (1.0.6) - date (3.3.3) + date (3.3.4) diff-lcs (1.5.0) docile (1.4.0) domain_name (0.5.20190701) @@ -139,7 +140,7 @@ GEM dotenv-rails (2.8.1) dotenv (= 2.8.1) railties (>= 3.2) - drb (2.1.1) + drb (2.2.0) ruby2_keywords erubi (1.12.0) et-orbi (1.2.7) @@ -168,7 +169,7 @@ GEM rainbow (>= 2.2.2, < 4.0) terminal-table (>= 1.5.1) io-console (0.6.0) - irb (1.8.3) + irb (1.9.0) rdoc reline (>= 0.3.8) jbuilder (2.11.5) @@ -181,7 +182,7 @@ GEM listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.21.4) + loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -197,19 +198,19 @@ GEM mini_portile2 (2.8.5) minitest (5.20.0) msgpack (1.7.2) - mutex_m (0.1.2) - net-imap (0.4.2) + mutex_m (0.2.0) + net-imap (0.4.5) date net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.1) + net-protocol (0.2.2) timeout net-smtp (0.4.0) net-protocol netrc (0.11.0) - nio4r (2.5.9) - nokogiri (1.15.4) + nio4r (2.6.0) + nokogiri (1.15.5) mini_portile2 (~> 2.8.2) racc (~> 1.4) parallel (1.23.0) @@ -222,7 +223,7 @@ GEM puma (6.4.0) nio4r (~> 2.0) raabro (1.4.0) - racc (1.7.1) + racc (1.7.3) rack (3.0.8) rack-attack (6.7.0) rack (>= 1.0, < 4) @@ -235,20 +236,20 @@ GEM rackup (2.1.0) rack (>= 3) webrick (~> 1.8) - rails (7.1.1) - actioncable (= 7.1.1) - actionmailbox (= 7.1.1) - actionmailer (= 7.1.1) - actionpack (= 7.1.1) - actiontext (= 7.1.1) - actionview (= 7.1.1) - activejob (= 7.1.1) - activemodel (= 7.1.1) - activerecord (= 7.1.1) - activestorage (= 7.1.1) - activesupport (= 7.1.1) + rails (7.1.2) + actioncable (= 7.1.2) + actionmailbox (= 7.1.2) + actionmailer (= 7.1.2) + actionpack (= 7.1.2) + actiontext (= 7.1.2) + actionview (= 7.1.2) + activejob (= 7.1.2) + activemodel (= 7.1.2) + activerecord (= 7.1.2) + activestorage (= 7.1.2) + activesupport (= 7.1.2) bundler (>= 1.15.0) - railties (= 7.1.1) + railties (= 7.1.2) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -263,23 +264,23 @@ GEM rails-i18n (7.0.8) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (7.1.1) - actionpack (= 7.1.1) - activesupport (= 7.1.1) + railties (7.1.2) + actionpack (= 7.1.2) + activesupport (= 7.1.2) irb rackup (>= 1.0.0) rake (>= 12.2) thor (~> 1.0, >= 1.2.2) zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.0.6) + rake (13.1.0) rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - rdoc (6.5.0) + rdoc (6.6.0) psych (>= 4.0.0) regexp_parser (2.8.2) - reline (0.3.9) + reline (0.4.0) io-console (~> 0.5) rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) @@ -351,17 +352,17 @@ GEM simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) smart_properties (1.17.0) - spring (4.1.1) + spring (4.1.2) spring-watcher-listen (2.1.0) listen (>= 2.7, < 4.0) spring (>= 4) sqlite3 (1.6.8) mini_portile2 (~> 2.8.0) - stringio (3.0.8) + stringio (3.0.9) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) thor (1.3.0) - timeout (0.4.0) + timeout (0.4.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unf (0.1.4) @@ -392,12 +393,12 @@ DEPENDENCIES arask (~> 1.2.3) aws-sdk-cognitoidentityprovider (~> 1.82.0) aws-sdk-s3 (~> 1) - aws-sdk-ssm (~> 1.159.0) + aws-sdk-ssm (~> 1.160.0) bootsnap (~> 1.17.0) brakeman (~> 6.0.1) byebug (~> 11.1.3) canonical-rails! - ccs-frontend_helpers (~> 0.1.1) + ccs-frontend_helpers (~> 0.1.2) dotenv-rails (~> 2.8.1, >= 2.8.1) i18n-tasks (~> 1.0.13) jbuilder (~> 2.11, >= 2.11.5) @@ -406,7 +407,7 @@ DEPENDENCIES pg (~> 1.5.4) puma (~> 6.4) rack-attack (~> 6.7.0) - rails (~> 7.1.1) + rails (~> 7.1.2) rails-controller-testing (~> 1.0.5, >= 1.0.5) rest-client (~> 2.1) rollbar (~> 3.4.1) @@ -417,7 +418,7 @@ DEPENDENCIES rubocop-rails (~> 2.22.1) rubocop-rspec (~> 2.25.0) simplecov (~> 0.22.0, >= 0.16.1) - spring (~> 4.1.1) + spring (~> 4.1.2) spring-watcher-listen (~> 2.1.0) sqlite3 (~> 1.6) web-console (~> 4.2.1) diff --git a/app/controllers/errors_controller.rb b/app/controllers/errors_controller.rb index 65b25028..a18d3699 100644 --- a/app/controllers/errors_controller.rb +++ b/app/controllers/errors_controller.rb @@ -19,7 +19,7 @@ def internal_error def service_unavailable respond_to do |format| - format.html { render status: :service_unavailable, layout: 'error' } + format.html { render status: :ok, layout: 'error' } end end end diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb index 1e69cdd9..aba9204f 100644 --- a/app/views/layouts/_footer.html.erb +++ b/app/views/layouts/_footer.html.erb @@ -1,44 +1,48 @@ <%= render partial: '/layouts/contact_us' %> <%= ccs_footer( meta: { - items: [ - { - text: t('.cookie_policy_link'), - href: cookie_policy_path, - attributes: { - aria: { - label: t('.cookie_policy_link_aria_label') + items: unless current_page?(service_unavailable_path) + [ + { + text: t('.cookie_policy_link'), + href: cookie_policy_path, + attributes: { + aria: { + label: t('.cookie_policy_link_aria_label') + } } - } - }, - { - text: t('.cookie_settings_link'), - href: cookie_settings_path, - attributes: { - aria: { - label: t('.cookie_settings_link_aria_label') + }, + { + text: t('.cookie_settings_link'), + href: cookie_settings_path, + attributes: { + aria: { + label: t('.cookie_settings_link_aria_label') + } } - } - }, - { - text: t('.privacy_link_text'), - href: t('.privacy_link'), - attributes: { - target: '_blank', - aria: { - label: t('.privacy_link_aria_label') + }, + { + text: t('.privacy_link_text'), + href: t('.privacy_link'), + attributes: { + target: '_blank', + aria: { + label: t('.privacy_link_aria_label') + } } - } - }, - { - text: t('.accessibility_statement_link'), - href: accessibility_statement_path, - attributes: { - aria: { - label: t('.accessibility_statement_link_aria_label') + }, + { + text: t('.accessibility_statement_link'), + href: accessibility_statement_path, + attributes: { + aria: { + label: t('.accessibility_statement_link_aria_label') + } } } - } - ] + ] + else + [] + end } ) %> diff --git a/config/routes.rb b/config/routes.rb index 5f0bbf34..6e606c91 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -39,5 +39,5 @@ get '/404', to: 'errors#not_found' get '/422', to: 'errors#unacceptable' get '/500', to: 'errors#internal_error' - get '/503', '/service-unavailable', to: 'errors#service_unavailable' + get '/service-unavailable', to: 'errors#service_unavailable' end diff --git a/package.json b/package.json index 5494d199..a7c75059 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "pmp_idam", "private": true, "dependencies": { - "@rails/ujs": "^7.1.1", + "@rails/ujs": "^7.1.2", "@rails/webpacker": "5.4.4", "accessible-autocomplete": "^2.0.4", "govuk-frontend": "^4.7.0", diff --git a/yarn.lock b/yarn.lock index b85ca498..0898ce78 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1138,10 +1138,10 @@ mkdirp "^1.0.4" rimraf "^3.0.2" -"@rails/ujs@^7.1.1": - version "7.1.1" - resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-7.1.1.tgz#f8df96e406a2a824084b637880e57c257073cb05" - integrity sha512-ywGwWNiqXN3Bb1BifVQTrkWEWcAGLHW3D0JNQMQeu57LsoluRzvnenNLPsmdoDPkrmSIASDXNsJiCIpUzFj8CA== +"@rails/ujs@^7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-7.1.2.tgz#ea903bcc0224e17156015d995b6f1b83e27d64b2" + integrity sha512-c5x02djEKEVVE4qfN4XgElJS4biM0xxtIVpcJ0ZHLK116U19rowTtmD0AJ/RCb3Xaewa4GPIWLlwgeC0dCQqzw== "@rails/webpacker@5.4.4": version "5.4.4"