Skip to content

Commit

Permalink
feat: support Ruby 3
Browse files Browse the repository at this point in the history
fix #285
  • Loading branch information
tonytonyjan committed Nov 11, 2021
1 parent 8453bc0 commit 968a8bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
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

0 comments on commit 968a8bf

Please sign in to comment.