From 14c7ec4fef55a93874022de4d463fdaf4f1f1825 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Sun, 22 Oct 2023 11:20:33 +0200 Subject: [PATCH] Update rack to 3.0 --- Gemfile | 1 - Gemfile.lock | 12 ++++++------ app/controllers/tracks_controller.rb | 3 --- gemset.nix | 12 ++++++------ 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/Gemfile b/Gemfile index 01abe225..6099c8d8 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,6 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby '~> 3.2.2' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -# Remove workaround in tracks_controller on transient rack update gem 'rails', '~> 7.1' # Use postgresql as the database for Active Record gem 'pg', '>= 1.2.3', '< 2.0' diff --git a/Gemfile.lock b/Gemfile.lock index 58a0353c..032944a2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -184,16 +184,16 @@ GEM activesupport (>= 3.0.0) raabro (1.4.0) racc (1.7.1) - rack (2.2.8) + rack (3.0.8) rack-cors (2.0.1) rack (>= 2.0.0) - rack-session (1.0.1) - rack (< 3) + rack-session (2.0.0) + rack (>= 3.0.0) rack-test (2.1.0) rack (>= 1.3) - rackup (1.0.0) - rack (< 3) - webrick + rackup (2.1.0) + rack (>= 3) + webrick (~> 1.8) rails (7.1.1) actioncable (= 7.1.1) actionmailbox (= 7.1.1) diff --git a/app/controllers/tracks_controller.rb b/app/controllers/tracks_controller.rb index 3cd17835..a54184b3 100644 --- a/app/controllers/tracks_controller.rb +++ b/app/controllers/tracks_controller.rb @@ -116,9 +116,6 @@ def audio_with_stream(stream, mimetype, total_size) response.content_type = mimetype response.headers['accept-ranges'] = 'bytes' response.headers['content-length'] = (last_byte - first_byte + 1).to_s - # Workaround for https://github.com/rack/rack/issues/1619 - # Remove when rack 3.0 is released - response.headers['Last-Modified'] = Time.now.httpdate to_skip = first_byte while to_skip.positive? diff --git a/gemset.nix b/gemset.nix index d68a9630..00b205a0 100644 --- a/gemset.nix +++ b/gemset.nix @@ -735,10 +735,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "15rdwbyk71c9nxvd527bvb8jxkcys8r3dj3vqra5b3sa63qs30vv"; + sha256 = "0j3j8lxb3pda25lq9l3661rjd99a3z2ky6cqxbg7sdmvnwpr2b4w"; type = "gem"; }; - version = "2.2.8"; + version = "3.0.8"; }; rack-cors = { dependencies = ["rack"]; @@ -757,10 +757,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "11w6yd60n8ng1ncs1ajlv42dg08yks09drlsgriydgpcjwz21d40"; + sha256 = "10afdpmy9kh0qva96slcyc59j4gkk9av8ilh58cnj0qq7q3b416v"; type = "gem"; }; - version = "1.0.1"; + version = "2.0.0"; }; rack-test = { dependencies = ["rack"]; @@ -779,10 +779,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1wbr03334ba9ilcq25wh9913xciwj0j117zs60vsqm0zgwdkwpp9"; + sha256 = "0kbcka30g681cqasw47pq93fxjscq7yvs5zf8lp3740rb158ijvf"; type = "gem"; }; - version = "1.0.0"; + version = "2.1.0"; }; rails = { dependencies = ["actioncable" "actionmailbox" "actionmailer" "actionpack" "actiontext" "actionview" "activejob" "activemodel" "activerecord" "activestorage" "activesupport" "railties"];