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

Fixing issues with ruby 3.0 #665

Merged
merged 1 commit into from
Feb 22, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ rvm:
- 2.5
- 2.6
- 2.7
- 3.0
bundler_args: --binstubs
before_install:
- gem update --system
Expand Down
4 changes: 2 additions & 2 deletions lib/recurly/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def validate_path_parameters!(**options)
end

def interpolate_path(path, **options)
validate_path_parameters!(options)
validate_path_parameters!(**options)
options.each do |k, v|
# We need to encode the values for the url
options[k] = ERB::Util.url_encode(v.to_s)
Expand Down Expand Up @@ -330,7 +330,7 @@ def build_url(path, options)
end
end

def scope_by_site(path, **options)
def scope_by_site(path, options)
if site = site_id || options[:site_id]
# Ensure that we are only including the site_id once because the Pager operations
# will use the cursor returned from the API which may already have these components
Expand Down
2 changes: 1 addition & 1 deletion lib/recurly/pager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def page_enumerator

def fetch_next!(options)
path = extract_path(self.next)
page = @client.send(:get, path, options)
page = @client.send(:get, path, **options)
@data = page.data.map { |d| JSONParser.from_json(d) }
@has_more = page.has_more
@next = page.next
Expand Down
2 changes: 1 addition & 1 deletion spec/recurly/client_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require "spec_helper"

RSpec.describe Recurly::Client do
subject(:client) { Recurly::Client.new(client_options) }
subject(:client) { Recurly::Client.new(**client_options) }
let(:client_options) { { api_key: api_key } }
let(:subdomain) { "test" }
let(:api_key) { "recurly-good" }
Expand Down