diff --git a/.ruby-version b/.ruby-version index bea438e9..9c25013d 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.1 +3.3.6 diff --git a/Gemfile.lock b/Gemfile.lock index 2a1e5c3d..0e5b26f3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -99,7 +99,7 @@ GEM msgpack (~> 1.2) brakeman (6.2.2) racc - bson (5.0.1) + bson (5.0.2) builder (3.3.0) byebug (11.1.3) carrierwave (2.2.6) @@ -126,7 +126,7 @@ GEM database_cleaner-mongoid (2.0.1) database_cleaner-core (~> 2.0.0) mongoid - date (3.3.4) + date (3.4.0) diff-lcs (1.5.1) dig_rb (1.0.1) docile (1.4.1) @@ -140,18 +140,18 @@ GEM factory_bot_rails (6.4.4) factory_bot (~> 6.5) railties (>= 5.0.0) - faraday (2.12.0) - faraday-net_http (>= 2.0, < 3.4) + faraday (2.12.1) + faraday-net_http (>= 2.0, < 3.5) json logger - faraday-net_http (3.3.0) - net-http + faraday-net_http (3.4.0) + net-http (>= 0.5.0) ffi (1.17.0) ffi (1.17.0-aarch64-linux-gnu) ffi (1.17.0-arm64-darwin) ffi (1.17.0-x86_64-linux-gnu) find_a_port (1.0.1) - gds-api-adapters (96.0.3) + gds-api-adapters (97.3.0) addressable link_header null_logger @@ -199,7 +199,7 @@ GEM govuk_app_config (>= 1.1) redis-client (>= 0.22.2) sidekiq (~> 7.0, < 8) - hashdiff (1.1.1) + hashdiff (1.1.2) hashie (5.0.0) http-accept (1.7.0) http-cookie (1.0.7) @@ -242,11 +242,11 @@ GEM mime-types (3.6.0) logger mime-types-data (~> 3.2015) - mime-types-data (3.2024.1001) + mime-types-data (3.2024.1105) mini_magick (4.13.2) mini_mime (1.1.5) - mini_portile2 (2.8.7) - minitest (5.25.1) + mini_portile2 (2.8.8) + minitest (5.25.2) mongo (2.21.0) bson (>= 4.14.1, < 6.0.0) mongoid (8.1.7) @@ -254,15 +254,15 @@ GEM concurrent-ruby (>= 1.0.5, < 2.0) mongo (>= 2.18.0, < 3.0.0) ruby2_keywords (~> 0.0.5) - mongoid-grid_fs (2.5.0) + mongoid-grid_fs (2.6.0) mime-types (>= 1.0, < 4.0) - mongoid (>= 3.0, < 9.0) - msgpack (1.7.2) + mongoid (>= 3.0, < 10.0) + msgpack (1.7.5) multi_xml (0.7.1) bigdecimal (~> 3.1) - net-http (0.4.1) + net-http (0.5.0) uri - net-imap (0.5.0) + net-imap (0.5.1) date net-protocol net-pop (0.1.2) @@ -331,7 +331,7 @@ GEM opentelemetry-instrumentation-active_model_serializers (0.20.2) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-active_record (0.8.0) + opentelemetry-instrumentation-active_record (0.8.1) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) opentelemetry-instrumentation-active_support (0.6.0) @@ -498,7 +498,7 @@ GEM opentelemetry-semantic_conventions opentelemetry-semantic_conventions (1.10.1) opentelemetry-api (~> 1.0) - ostruct (0.6.0) + ostruct (0.6.1) pact (1.65.3) pact-mock_service (~> 3.0, >= 3.3.1) pact-support (~> 1.16, >= 1.16.9) @@ -506,11 +506,12 @@ GEM rainbow (~> 3.1) rspec (~> 3.0) thor (>= 0.20, < 2.0) - pact-mock_service (3.11.2) + pact-mock_service (3.12.3) find_a_port (~> 1.0.1) json pact-support (~> 1.16, >= 1.16.4) - rack (~> 2.0) + rack (>= 3.0, < 4.0) + rackup (~> 2.0) rspec (>= 2.14) thor (>= 0.19, < 2.0) webrick (~> 1.8) @@ -542,20 +543,20 @@ GEM puma (6.4.3) nio4r (~> 2.0) racc (1.8.1) - rack (2.2.10) - rack-protection (3.2.0) + rack (3.1.8) + rack-protection (4.1.1) base64 (>= 0.1.0) - rack (~> 2.2, >= 2.2.4) + logger (>= 1.6.0) + rack (>= 3.0.0, < 4) rack-proxy (0.7.7) rack - rack-session (1.0.2) - rack (< 3) + rack-session (2.0.0) + rack (>= 3.0.0) rack-test (2.1.0) rack (>= 1.3) rack_strip_client_ip (0.0.2) - rackup (1.0.1) - rack (< 3) - webrick + rackup (2.2.1) + rack (>= 3) rails (7.2.2) actioncable (= 7.2.2) actionmailbox (= 7.2.2) @@ -594,7 +595,7 @@ GEM rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) - rdoc (6.7.0) + rdoc (6.8.1) psych (>= 4.0.0) redis-client (0.22.2) connection_pool @@ -680,8 +681,7 @@ GEM sentry-sidekiq (5.21.0) sentry-ruby (~> 5.21.0) sidekiq (>= 3.0) - sidekiq (7.3.2) - concurrent-ruby (< 2) + sidekiq (7.3.6) connection_pool (>= 2.3.0) logger rack (>= 2.2.4) @@ -706,7 +706,7 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - ssrf_filter (1.1.2) + ssrf_filter (1.2.0) state_machines (0.6.0) state_machines-activemodel (0.9.0) activemodel (>= 6.0) @@ -721,14 +721,14 @@ GEM term-ansicolor (1.11.2) tins (~> 1.0) thor (1.3.2) - timeout (0.4.1) + timeout (0.4.2) tins (1.37.0) bigdecimal sync tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.6.0) - uri (0.13.1) + uri (1.0.2) useragent (0.16.10) version_gem (1.1.4) warden (1.2.9) diff --git a/README.md b/README.md index ef61885a..4ed89135 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ You can use the [GOV.UK Docker environment](https://github.com/alphagov/govuk-do All assets are uploaded to the S3 bucket via a separate `govuk_sidekiq` job triggered if virus scanning succeeds. Assets are currently still also saved to the NFS mount as per the original behaviour. -In non-production environments if the `AWS_S3_BUCKET_NAME` environment variable is not set, then a fake version of S3 (`S3Storage::Fake`) is used and the other `AWS_*` environment variables do not need to be set. In this case, files are saved to the local filesystem instead of S3 and are served via an instance of `Rack::File` mounted on the appropriate route path prefix. +In non-production environments if the `AWS_S3_BUCKET_NAME` environment variable is not set, then a fake version of S3 (`S3Storage::Fake`) is used and the other `AWS_*` environment variables do not need to be set. In this case, files are saved to the local filesystem instead of S3 and are served via an instance of `Rack::Files` mounted on the appropriate route path prefix. ### Manuals and decisions diff --git a/config/routes.rb b/config/routes.rb index 32d9b4e1..5438d31f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -18,7 +18,7 @@ get "/government/uploads/*path" => "whitehall_media#download" if AssetManager.s3.fake? - mount Rack::File.new(AssetManager.fake_s3.root), at: AssetManager.fake_s3.path_prefix, as: "fake_s3" + mount Rack::Files.new(AssetManager.fake_s3.root), at: AssetManager.fake_s3.path_prefix, as: "fake_s3" end require "sidekiq_unique_jobs/web"