Skip to content

Commit

Permalink
Upgrade rack-cors to version 2.0.2 or later (#445)
Browse files Browse the repository at this point in the history
* Update rack-cors to 2.0.2

Update rack-cors gem to at least v2.0.2

* Fix broken test

Fix a test broken by a web redirect. https://meedan.com/mission now
redirects to /about-us, which broke a test that was using it.
  • Loading branch information
jayjay-w committed Apr 18, 2024
1 parent 261aa82 commit 56bf3ea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ gem 'open_uri_redirections', require: false
gem 'postrank-uri', git: 'https://github.com/postrank-labs/postrank-uri.git', ref: '485ac46', require: false # Ruby 3.0 support, as of 2/6/23 no gem relaease
gem 'retryable'
gem 'puma', '5.6.8'
gem 'rack-cors', :require => 'rack/cors'
gem 'rack-cors', '>= 2.0.2', :require => 'rack/cors'
gem 'rails-perftest'
gem 'sidekiq', '< 8'
gem 'redis', '4.3.1'
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ GEM
nio4r (~> 2.0)
racc (1.7.3)
rack (2.2.8.1)
rack-cors (2.0.1)
rack-cors (2.0.2)
rack (>= 2.0.0)
rack-protection (2.0.1)
rack
Expand Down Expand Up @@ -454,7 +454,7 @@ DEPENDENCIES
postrank-uri!
puma (= 5.6.8)
rack (>= 1.6.11)
rack-cors
rack-cors (>= 2.0.2)
rack-protection (= 2.0.1)
railroady
rails (~> 6.1.7)
Expand Down
2 changes: 1 addition & 1 deletion test/controllers/medias_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def setup
test "should parse multiple URLs sent as list" do
authenticate_with_token
url1 = 'https://meedan.com/check'
url2 = 'https://meedan.com/mission'
url2 = 'https://meedan.com/about-us'
id1 = Media.get_id(url1)
id2 = Media.get_id(url2)
assert_nil Pender::Store.current.read(id1, :json)
Expand Down

0 comments on commit 56bf3ea

Please sign in to comment.