Skip to content

Commit

Permalink
chore(test.yml): change rack version to 3-0-stable to ensure compatib…
Browse files Browse the repository at this point in the history
…ility with all ruby versions

feat(Gemfile): add support for RACK environment variable to specify rack version to use
feat(rack-strip-cookies.gemspec): add runtime dependency on rack version 3.0 or higher to ensure compatibility
feat(rack-strip-cookies.gemspec): add development dependencies on rake and minitest to support testing and building the gem
  • Loading branch information
masterkain committed May 22, 2023
1 parent 7151093 commit ab66521
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
rvm: ["3.0", "3.1", "3.2", "ruby-head"]
rack: ["3.0.7", "main"]
rack: ["3-0-stable"]

runs-on: ubuntu-latest

Expand Down
14 changes: 2 additions & 12 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,9 @@ source "https://rubygems.org"

gemspec

gem "rake"
rack_branch = ENV["RACK"] || "3-0-stable"

github = "https://github.com/%s.git"
repos = {"rack" => github % "rack/rack"}

%w[rack].each do |lib|
dep = case ENV[lib]
when "stable", nil then nil
when /(\d+\.)+\d+/ then "~> " + ENV[lib].sub("#{lib}-", "")
else {git: repos[lib], branch: dep}
end
gem lib, dep
end
gem "rack", git: "https://github.com/rack/rack.git", ref: rack_branch || rack_version

group :test do
gem "rack-test"
Expand Down
5 changes: 4 additions & 1 deletion rack-strip-cookies.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ Gem::Specification.new do |spec|
spec.files = `git ls-files`.split("\x0")
spec.require_paths = ["lib"]

spec.add_runtime_dependency "rack", ">= 3.0"

spec.add_development_dependency "bundler", ">= 2.2"
spec.add_development_dependency "rack", ">= 3.0.7"
spec.add_development_dependency "rack-test", ">= 2.1.0"
spec.add_development_dependency "rake", ">= 13.0.6"
spec.add_development_dependency "minitest", ">= 5.18.0"
end

0 comments on commit ab66521

Please sign in to comment.