Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support Ruby 3 #312

Merged
merged 1 commit into from
Nov 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gemstash-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [2.4, 2.5, 2.6, 2.7, jruby-9.2]
ruby: [2.4, 2.5, 2.6, 2.7, "3.0", jruby-9.2]
steps:
- uses: actions/checkout@v2
- name: Setup ruby
Expand Down
8 changes: 5 additions & 3 deletions lib/gemstash/web.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
module Gemstash
#:nodoc:
class Web < Sinatra::Base
def initialize(gemstash_env: nil, http_client_builder: nil)
@gemstash_env = gemstash_env || Gemstash::Env.new
@http_client_builder = http_client_builder || Gemstash::HTTPClient
ruby2_keywords def initialize(options = {})
raise ArgumentError unless options.is_a?(Hash)

@gemstash_env = options[:gemstash_env] || Gemstash::Env.new
@http_client_builder = options[:http_client_builder] || Gemstash::HTTPClient
Gemstash::Env.current = @gemstash_env
super()
end
Expand Down