Skip to content

Commit

Permalink
[WIP] Rails 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
segiddins committed Nov 23, 2023
1 parent e40a0cf commit 58b41ab
Show file tree
Hide file tree
Showing 22 changed files with 198 additions and 125 deletions.
7 changes: 3 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
source "https://rubygems.org"

gem "rails", "~> 7.0.0"
gem "rails", "~> 7.1.0"
gem "rails-i18n", "~> 7.0"

gem "aws-sdk-s3", "~> 1.139"
gem "aws-sdk-sqs", "~> 1.68"
gem "bootsnap", "~> 1.16"
gem "clearance", "~> 2.6"
gem "clearance", "~> 2.6", github: "thoughtbot/clearance", ref: "6190c92521317b6de577c8ea3dff75cb832dc6b4"
gem "dalli", "~> 3.2"
gem "ddtrace", "~> 1.17", require: "ddtrace/auto_instrument"
gem "dogstatsd-ruby", "~> 5.5"
Expand All @@ -32,7 +32,7 @@ gem "rack", "~> 2.2"
gem "rack-utf8_sanitizer", "~> 1.8"
gem "rbtrace", "~> 0.4.8"
gem "rdoc", "~> 6.5"
gem "roadie-rails", "~> 3.0"
gem "roadie-rails", "~> 3.1"
gem "ruby-magic", "~> 0.6"
gem "shoryuken", "~> 6.1", require: false
gem "statsd-instrument", "~> 3.5"
Expand Down Expand Up @@ -114,6 +114,5 @@ group :test do
gem "simplecov-cobertura", "~> 2.1", require: false
gem "aggregate_assertions", "~> 0.2.0"
gem "minitest-gcstats", "~> 1.3"
gem "minitest-profile", "~> 0.0.2"
gem "minitest-reporters", "~> 1.6"
end
191 changes: 111 additions & 80 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,73 +1,96 @@
GIT
remote: https://github.com/thoughtbot/clearance.git
revision: 6190c92521317b6de577c8ea3dff75cb832dc6b4
ref: 6190c92521317b6de577c8ea3dff75cb832dc6b4
specs:
clearance (2.6.1)
actionmailer (>= 5.0)
activemodel (>= 5.0)
activerecord (>= 5.0)
argon2 (~> 2.0, >= 2.0.2)
bcrypt (>= 3.1.1)
email_validator (~> 2.0)
railties (>= 5.0)

GEM
remote: https://rubygems.org/
specs:
actioncable (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
actioncable (7.1.2)
actionpack (= 7.1.2)
activesupport (= 7.1.2)
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.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.0.8)
actionpack (= 7.0.8)
actionview (= 7.0.8)
activejob (= 7.0.8)
activesupport (= 7.0.8)
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.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.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.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.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.0.8)
activesupport (= 7.0.8)
actionview (7.1.2)
activesupport (= 7.1.2)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
active_link_to (1.0.5)
actionpack
addressable
activejob (7.0.8)
activesupport (= 7.0.8)
activejob (7.1.2)
activesupport (= 7.1.2)
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.2)
activesupport (= 7.1.2)
activerecord (7.1.2)
activemodel (= 7.1.2)
activesupport (= 7.1.2)
timeout (>= 0.4.0)
activestorage (7.1.2)
actionpack (= 7.1.2)
activejob (= 7.1.2)
activerecord (= 7.1.2)
activesupport (= 7.1.2)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.8)
activesupport (7.1.2)
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 All @@ -77,8 +100,8 @@ GEM
amazing_print (1.5.0)
android_key_attestation (0.3.0)
ansi (1.5.0)
argon2 (2.1.1)
ffi (~> 1.14)
argon2 (2.3.0)
ffi (~> 1.15)
ffi-compiler (~> 1.0)
ast (2.4.2)
attr_required (1.0.1)
Expand Down Expand Up @@ -122,6 +145,7 @@ GEM
base64 (0.2.0)
bcrypt (3.1.20)
benchmark-ips (2.12.0)
bigdecimal (3.1.4)
bindata (2.4.15)
bitarray (1.2.0)
bloomer (1.0.0)
Expand All @@ -147,17 +171,10 @@ GEM
chartkick (5.0.4)
choice (0.2.0)
chunky_png (1.4.0)
clearance (2.6.1)
actionmailer (>= 5.0)
activemodel (>= 5.0)
activerecord (>= 5.0)
argon2 (~> 2.0, >= 2.0.2)
bcrypt (>= 3.1.1)
email_validator (~> 2.0)
railties (>= 5.0)
coderay (1.1.3)
compact_index (0.14.0)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
cose (1.3.0)
cbor (~> 0.5.9)
openssl-signature_algorithm (~> 1.0)
Expand Down Expand Up @@ -206,8 +223,10 @@ GEM
dotenv-rails (2.8.1)
dotenv (= 2.8.1)
railties (>= 3.2)
drb (2.2.0)
ruby2_keywords
dry-initializer (3.1.1)
email_validator (2.2.3)
email_validator (2.2.4)
activemodel
erb (4.0.3)
cgi (>= 0.3.3)
Expand Down Expand Up @@ -275,6 +294,10 @@ GEM
inline_svg (1.9.0)
activesupport (>= 3.0)
nokogiri (>= 1.6)
io-console (0.6.0)
irb (1.9.1)
rdoc
reline (>= 0.3.8)
jmespath (1.6.2)
job-iteration (1.4.1)
activejob (>= 5.2)
Expand Down Expand Up @@ -355,7 +378,6 @@ GEM
minitest (5.20.0)
minitest-gcstats (1.3.0)
minitest (~> 5.0)
minitest-profile (0.0.2)
minitest-reporters (1.6.1)
ansi
builder
Expand All @@ -366,6 +388,7 @@ GEM
msgpack (1.7.2)
multi_json (1.15.0)
multi_xml (0.6.0)
mutex_m (0.2.0)
net-imap (0.4.5)
date
net-protocol
Expand Down Expand Up @@ -469,24 +492,29 @@ GEM
rack (>= 2.1.0)
rack-protection (3.0.5)
rack
rack-session (1.0.1)
rack (< 3)
rack-test (2.1.0)
rack (>= 1.3)
rack-utf8_sanitizer (1.9.1)
rack (>= 1.0, < 4.0)
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.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.0.8)
railties (= 7.1.2)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
Expand All @@ -510,13 +538,14 @@ GEM
rack
railties (>= 5.1)
semantic_logger (~> 4.13)
railties (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
method_source
railties (7.1.2)
actionpack (= 7.1.2)
activesupport (= 7.1.2)
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.1.0)
rb-fsevent (0.11.2)
Expand All @@ -529,6 +558,8 @@ GEM
rdoc (6.6.0)
psych (>= 4.0.0)
regexp_parser (2.8.1)
reline (0.4.0)
io-console (~> 0.5)
rexml (3.2.6)
roadie (5.2.0)
css_parser (~> 1.4)
Expand Down Expand Up @@ -682,6 +713,7 @@ GEM
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webrick (1.8.1)
websocket (1.2.10)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
Expand All @@ -708,7 +740,7 @@ DEPENDENCIES
browser (~> 5.3, >= 5.3.1)
capybara (~> 3.38)
chartkick (~> 5.0)
clearance (~> 2.6)
clearance (~> 2.6)!
compact_index (~> 0.14.0)
dalli (~> 3.2)
dartsass-sprockets (~> 3.0)
Expand Down Expand Up @@ -738,7 +770,6 @@ DEPENDENCIES
memory_profiler (~> 1.0)
minitest (~> 5.18)
minitest-gcstats (~> 1.3)
minitest-profile (~> 0.0.2)
minitest-reporters (~> 1.6)
mocha (~> 2.0)
octokit (~> 8.0)
Expand All @@ -757,14 +788,14 @@ DEPENDENCIES
rack-attack (~> 6.6)
rack-test (~> 2.1)
rack-utf8_sanitizer (~> 1.8)
rails (~> 7.0.0)
rails (~> 7.1.0)
rails-controller-testing (~> 1.0)
rails-erd (~> 1.7)
rails-i18n (~> 7.0)
rails_semantic_logger (~> 4.14)
rbtrace (~> 0.4.8)
rdoc (~> 6.5)
roadie-rails (~> 3.0)
roadie-rails (~> 3.1)
rotp (~> 6.2)
rqrcode (~> 2.1)
rubocop (~> 1.48)
Expand Down
4 changes: 3 additions & 1 deletion app/controllers/concerns/maintenance_tasks_auditable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ module MaintenanceTasksAuditable

prepended do
include Auditable
around_action :audit_action, except: %i[index show]
around_action :audit_action

def audit_action(&)
return yield if params[:action].in?(%w[show index])

action = params.fetch(:action)
task_name = params.fetch(:task_id)

Expand Down
2 changes: 1 addition & 1 deletion app/jobs/application_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ApplicationJob < ActiveJob::Base

# Default to retrying errors a few times, so we don't get an alert for
# spurious errors
retry_on StandardError, wait: :exponentially_longer, attempts: 5
retry_on StandardError, wait: :polynomially_longer, attempts: 5

# Automatically retry jobs that encountered a deadlock
retry_on ActiveRecord::Deadlocked
Expand Down
4 changes: 2 additions & 2 deletions app/jobs/store_version_contents_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class GemNotFound < RuntimeError; end
discard_on ActiveJob::DeserializationError
discard_on Gem::Package::FormatError, Gem::Security::Exception

retry_on VersionNotIndexed, wait: :exponentially_longer, attempts: 5
retry_on GemNotFound, wait: :exponentially_longer, attempts: 5
retry_on VersionNotIndexed, wait: :polynomially_longer, attempts: 5
retry_on GemNotFound, wait: :polynomially_longer, attempts: 5

rescue_from(GemNotFound, Gem::Package::FormatError, Gem::Security::Exception) do |error|
version = version_arg.full_name
Expand Down
Loading

0 comments on commit 58b41ab

Please sign in to comment.