Skip to content

Commit fbc665e

Browse files
committed
🧪 Fix Ruby 2.4 auth sanitizer subprocess spec
1 parent 1976b72 commit fbc665e

4 files changed

Lines changed: 11 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ Please file a bug if you notice a violation of semantic versioning.
4747

4848
### Fixed
4949

50-
- Constrained the Ruby 2.4 appraisal away from `cgi` 0.1.1, which calls
51-
`String#delete_prefix` before oauth's test backports are loaded.
50+
- Updated the auth-sanitizer subprocess isolation spec to load the standard
51+
test bootstrap, including Ruby 2.4 backports.
52+
- Made the Ruby 2.4 appraisal's legacy `cgi` dependency explicit.
5253

5354
## [1.1.7] - 2026-06-15
5455

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ruby >= 0
2+
# Last version to support Ruby <= 2.4
3+
gem "cgi", "~> 0.1.1"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
eval_gemfile "../../erb/r2.6/v2.2.gemfile"
2-
gem "cgi", "< 0.1.1" # cgi 0.1.1 calls String#delete_prefix, which Ruby 2.4 lacks.
2+
eval_gemfile "../../cgi/r2/v0.1.gemfile"
33
eval_gemfile "../../mutex_m/r2.4/v0.1.gemfile"
44
eval_gemfile "../../stringio/r2.4/v0.0.2.gemfile"

spec/oauth/auth_sanitizer_spec.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@
66
RSpec.describe "OAuth::AUTH_SANITIZER" do
77
it "keeps auth-sanitizer constants isolated inside the OAuth namespace" do
88
lib = File.expand_path("../../../lib", __dir__)
9+
spec = File.expand_path("..", __dir__)
910
script = <<~RUBY
1011
$LOAD_PATH.unshift(#{lib.inspect})
11-
require "oauth"
12+
$LOAD_PATH.unshift(#{spec.inspect})
13+
require "rspec/core"
14+
require "spec_helper"
1215
abort "Auth was defined" if Object.const_defined?(:Auth, false)
1316
abort "AuthSanitizer was defined" if Object.const_defined?(:AuthSanitizer, false)
1417
RUBY

0 commit comments

Comments
 (0)