Skip to content

Commit

Permalink
Merge pull request #1170 from alphagov/dependabot/bundler/rails-and-g…
Browse files Browse the repository at this point in the history
…retel-7.1.1

Bump rails and gretel
  • Loading branch information
KludgeKML authored Oct 31, 2023
2 parents c200155 + b3656b8 commit d88488e
Show file tree
Hide file tree
Showing 10 changed files with 124 additions and 91 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source "https://rubygems.org"

ruby "~> 3.2.0"

gem "rails", "7.0.8"
gem "rails", "7.1.1"

gem "addressable"
gem "aws-sdk-s3"
Expand Down
177 changes: 103 additions & 74 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,70 +1,78 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
actioncable (7.1.1)
actionpack (= 7.1.1)
activesupport (= 7.1.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.8)
actionpack (= 7.0.8)
activejob (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
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)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.8)
actionpack (= 7.0.8)
actionview (= 7.0.8)
activejob (= 7.0.8)
activesupport (= 7.0.8)
actionmailer (7.1.1)
actionpack (= 7.1.1)
actionview (= 7.1.1)
activejob (= 7.1.1)
activesupport (= 7.1.1)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.8)
actionview (= 7.0.8)
activesupport (= 7.0.8)
rack (~> 2.0, >= 2.2.4)
rails-dom-testing (~> 2.2)
actionpack (7.1.1)
actionview (= 7.1.1)
activesupport (= 7.1.1)
nokogiri (>= 1.8.5)
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.8)
actionpack (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
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)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.8)
activesupport (= 7.0.8)
actionview (7.1.1)
activesupport (= 7.1.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (7.0.8)
activesupport (= 7.0.8)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.1)
activesupport (= 7.1.1)
globalid (>= 0.3.6)
activemodel (7.0.8)
activesupport (= 7.0.8)
activerecord (7.0.8)
activemodel (= 7.0.8)
activesupport (= 7.0.8)
activestorage (7.0.8)
actionpack (= 7.0.8)
activejob (= 7.0.8)
activerecord (= 7.0.8)
activesupport (= 7.0.8)
activemodel (7.1.1)
activesupport (= 7.1.1)
activerecord (7.1.1)
activemodel (= 7.1.1)
activesupport (= 7.1.1)
timeout (>= 0.4.0)
activestorage (7.1.1)
actionpack (= 7.1.1)
activejob (= 7.1.1)
activerecord (= 7.1.1)
activesupport (= 7.1.1)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.8)
activesupport (7.1.1)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
Expand Down Expand Up @@ -94,6 +102,7 @@ GEM
erubi (>= 1.0.0)
rack (>= 0.9.0)
rouge (>= 1.0.0)
bigdecimal (3.1.4)
bindex (0.8.1)
binding_of_caller (1.0.0)
debug_inspector (>= 0.0.1)
Expand Down Expand Up @@ -138,6 +147,8 @@ GEM
docile (1.4.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
drb (2.1.1)
ruby2_keywords
erubi (1.12.0)
execjs (2.8.1)
factory_bot (6.2.0)
Expand Down Expand Up @@ -222,9 +233,9 @@ GEM
capybara (>= 3.36)
puma
selenium-webdriver (>= 4.0)
gretel (4.5.0)
actionview (>= 5.1, < 7.1)
railties (>= 5.1, < 7.1)
gretel (4.6.0)
actionview (>= 5.1, < 7.2)
railties (>= 5.1, < 7.2)
hashdiff (1.0.1)
hashie (5.0.0)
http-accept (1.7.0)
Expand All @@ -233,6 +244,10 @@ GEM
httpclient (2.8.3)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
io-console (0.6.0)
irb (1.8.3)
rdoc
reline (>= 0.3.8)
jbuilder (2.11.5)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
Expand All @@ -248,7 +263,7 @@ GEM
logstasher (2.1.5)
activesupport (>= 5.2)
request_store
loofah (2.21.3)
loofah (2.21.4)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
Expand All @@ -263,14 +278,15 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0808)
mini_mime (1.1.5)
mini_portile2 (2.8.4)
mini_portile2 (2.8.5)
minitest (5.20.0)
mlanett-redis-lock (0.2.7)
redis
msgpack (1.7.2)
multi_json (1.15.0)
multi_xml (0.6.0)
net-imap (0.3.7)
mutex_m (0.1.2)
net-imap (0.4.3)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -279,7 +295,7 @@ GEM
timeout
net-scp (4.0.0)
net-ssh (>= 2.6.5, < 8.0.0)
net-smtp (0.3.3)
net-smtp (0.4.0)
net-protocol
net-ssh (7.1.0)
netrc (0.11.0)
Expand Down Expand Up @@ -516,6 +532,8 @@ GEM
method_source (~> 1.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
psych (5.1.1.1)
stringio
public_suffix (5.0.3)
puma (6.4.0)
nio4r (~> 2.0)
Expand All @@ -525,43 +543,53 @@ GEM
rack (~> 2.2, >= 2.2.4)
rack-proxy (0.7.7)
rack
rack-session (1.0.1)
rack (< 3)
rack-test (2.1.0)
rack (>= 1.3)
rails (7.0.8)
actioncable (= 7.0.8)
actionmailbox (= 7.0.8)
actionmailer (= 7.0.8)
actionpack (= 7.0.8)
actiontext (= 7.0.8)
actionview (= 7.0.8)
activejob (= 7.0.8)
activemodel (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
rackup (1.0.0)
rack (< 3)
webrick
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)
bundler (>= 1.15.0)
railties (= 7.0.8)
railties (= 7.1.1)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
method_source
railties (7.1.1)
actionpack (= 7.1.1)
activesupport (= 7.1.1)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rainbow (3.1.1)
rake (13.0.6)
rake (13.1.0)
rdoc (6.5.0)
psych (>= 4.0.0)
redis (5.0.8)
redis-client (>= 0.17.0)
redis-client (0.17.1)
connection_pool
regexp_parser (2.8.2)
reline (0.3.9)
io-console (~> 0.5)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
Expand Down Expand Up @@ -673,7 +701,8 @@ GEM
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
statsd-ruby (1.5.0)
thor (1.2.2)
stringio (3.0.8)
thor (1.3.0)
tilt (2.0.10)
timecop (0.9.8)
timeout (0.4.0)
Expand Down Expand Up @@ -741,7 +770,7 @@ DEPENDENCIES
pg
plek
pry-rails
rails (= 7.0.8)
rails (= 7.1.1)
redis
rspec-rails
rubocop-govuk
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/webhooks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def link_check_callback
private

def verify_signature
return unless Rails.application.secrets.link_checker_api_secret_token
return unless Rails.application.credentials.link_checker_api_secret_token

given_signature = request.headers["X-LinkCheckerApi-Signature"]
return head :bad_request unless given_signature
Expand All @@ -28,6 +28,6 @@ def verify_signature
end

def webhook_secret_token
Rails.application.secrets.link_checker_api_secret_token
Rails.application.credentials.link_checker_api_secret_token
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def webhook_uri
end

def webhook_secret_token
Rails.application.secrets.link_checker_api_secret_token
Rails.application.credentials.link_checker_api_secret_token
end

def link_checker_api
Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class User < ApplicationRecord
include GDS::SSO::User
serialize :permissions, Array
serialize :permissions, type: Array
end
2 changes: 1 addition & 1 deletion config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
config.cache_store = :null_store

# Raise exceptions instead of rendering exception templates.
config.action_dispatch.show_exceptions = false
config.action_dispatch.show_exceptions = :none

# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false
Expand Down
4 changes: 0 additions & 4 deletions config/initializers/new_framework_defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,5 @@
# Enable origin-checking CSRF mitigation. Previous versions had false.
Rails.application.config.action_controller.forgery_protection_origin_check = false

# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
# Previous versions had false.
ActiveSupport.to_time_preserves_timezone = false

# Require `belongs_to` associations by default. Previous versions had false.
Rails.application.config.active_record.belongs_to_required_by_default = false
8 changes: 8 additions & 0 deletions config/initializers/secrets_to_credentials.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Rails 7 has begung to deprecate Rails.application.secrets in favour
# of Rails.application.credentials, but that adds the burden of master key
# adminstration without giving us any benefit (because our production
# secrets are handled as env vars, not committed to our repo. Here we
# loads the config/secrets.YML values into Rails.application.credentials,
# retaining the existing behaviour while dropping deprecated references.

Rails.application.credentials.merge!(Rails.application.config_for(:secrets))
Loading

0 comments on commit d88488e

Please sign in to comment.