Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #17 from planningcenter/cm/ruby-3-support
Browse files Browse the repository at this point in the history
chore(MailChimp3#new): forward keyword args in ruby 3.x compatible way
  • Loading branch information
christianmccormick authored Apr 3, 2023
2 parents e7cce43 + 6c76e4e commit 918a81c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mailchimp3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
module MailChimp3
module_function

def new(*args)
Endpoint.new(*args)
def new(**kwargs)
Endpoint.new(**kwargs)
end

def config
Expand Down
6 changes: 6 additions & 0 deletions spec/mailchimp3_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
require_relative 'spec_helper'

describe MailChimp3 do
describe '#new' do
it 'smoke test' do
expect(subject.new(basic_auth_key: 'key-us2').url).not_to be_nil
end
end

describe '#config' do
it 'returns configuration object' do
subject.config.client_id = 'foo'
Expand Down

0 comments on commit 918a81c

Please sign in to comment.