mailchimp_api_v3 0.2.17 → 0.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +7 -0
- data/.travis.yml +9 -2
- data/Gemfile +5 -1
- data/Guardfile +1 -0
- data/README.md +1 -1
- data/Rakefile +9 -0
- data/lib/mailchimp_api_v3.rb +9 -0
- data/lib/mailchimp_api_v3/account.rb +1 -0
- data/lib/mailchimp_api_v3/client.rb +2 -7
- data/lib/mailchimp_api_v3/client/remote.rb +1 -0
- data/lib/mailchimp_api_v3/collection.rb +1 -0
- data/lib/mailchimp_api_v3/collection/paging.rb +1 -0
- data/lib/mailchimp_api_v3/exception.rb +1 -0
- data/lib/mailchimp_api_v3/instance.rb +1 -0
- data/lib/mailchimp_api_v3/interest.rb +1 -0
- data/lib/mailchimp_api_v3/interest_category.rb +1 -0
- data/lib/mailchimp_api_v3/list.rb +1 -0
- data/lib/mailchimp_api_v3/member.rb +1 -0
- data/lib/mailchimp_api_v3/version.rb +2 -1
- data/mailchimp_api_v3.gemspec +3 -2
- metadata +14 -73
- data/spec/fixtures/cassettes/account.yml +0 -96
- data/spec/fixtures/cassettes/client.yml +0 -301
- data/spec/fixtures/cassettes/exception.yml +0 -189
- data/spec/fixtures/cassettes/interest.yml +0 -431
- data/spec/fixtures/cassettes/interest_categories.yml +0 -660
- data/spec/fixtures/cassettes/interest_category.yml +0 -436
- data/spec/fixtures/cassettes/interests.yml +0 -799
- data/spec/fixtures/cassettes/list.yml +0 -246
- data/spec/fixtures/cassettes/lists.yml +0 -158
- data/spec/fixtures/cassettes/mailchimp.yml +0 -96
- data/spec/fixtures/cassettes/member.yml +0 -298
- data/spec/fixtures/cassettes/members.yml +0 -808
- data/spec/fixtures/cassettes/members_create_or_update.yml +0 -817
- data/spec/fixtures/cassettes/members_paging.yml +0 -264
- data/spec/fixtures/cassettes/members_with_interest_categories.yml +0 -902
- data/spec/mailchimp_api_v3/account_spec.rb +0 -15
- data/spec/mailchimp_api_v3/client_spec.rb +0 -77
- data/spec/mailchimp_api_v3/exception_spec.rb +0 -55
- data/spec/mailchimp_api_v3/interest_categories_spec.rb +0 -41
- data/spec/mailchimp_api_v3/interest_category_spec.rb +0 -25
- data/spec/mailchimp_api_v3/interest_spec.rb +0 -23
- data/spec/mailchimp_api_v3/interests_spec.rb +0 -43
- data/spec/mailchimp_api_v3/list_spec.rb +0 -65
- data/spec/mailchimp_api_v3/lists_spec.rb +0 -21
- data/spec/mailchimp_api_v3/member_spec.rb +0 -58
- data/spec/mailchimp_api_v3/members_spec.rb +0 -132
- data/spec/mailchimp_spec.rb +0 -14
- data/spec/spec_helper.rb +0 -24
- data/spec/support/api_key.rb +0 -12
- data/spec/support/vcr_setup.rb +0 -17
data/spec/mailchimp_spec.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# frozen_string_literal: true
|
3
|
-
describe Mailchimp do
|
4
|
-
it 'does not attempt to connect without an API key in the right format' do
|
5
|
-
expect { Mailchimp.connect '' }.to raise_error { |e|
|
6
|
-
expect(e).to be_a Mailchimp::Exception::APIKeyError
|
7
|
-
expect(e.message).to eq 'Invalid API key format: '
|
8
|
-
}
|
9
|
-
end
|
10
|
-
|
11
|
-
it 'connects with an API key' do
|
12
|
-
expect { Mailchimp.connect }.not_to raise_error
|
13
|
-
end
|
14
|
-
end
|
data/spec/spec_helper.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
unless ENV['NO_SIMPLECOV']
|
3
|
-
require 'simplecov'
|
4
|
-
require 'coveralls'
|
5
|
-
|
6
|
-
if ENV['CIRCLE_ARTIFACTS']
|
7
|
-
dir = File.join('..', '..', '..', ENV['CIRCLE_ARTIFACTS'], 'coverage')
|
8
|
-
SimpleCov.coverage_dir(dir)
|
9
|
-
end
|
10
|
-
|
11
|
-
SimpleCov.start { add_filter '/spec/' }
|
12
|
-
Coveralls.wear! if ENV['COVERALLS_REPO_TOKEN']
|
13
|
-
end
|
14
|
-
|
15
|
-
require 'mailchimp_api_v3'
|
16
|
-
|
17
|
-
# Requires supporting ruby files with custom matchers and macros, etc,
|
18
|
-
# in spec/support/ and its subdirectories.
|
19
|
-
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
20
|
-
|
21
|
-
RSpec.configure do |config|
|
22
|
-
config.order = 'random'
|
23
|
-
config.tty = true
|
24
|
-
end
|
data/spec/support/api_key.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
require 'yaml'
|
3
|
-
|
4
|
-
unless ENV['MAILCHIMP_API_KEY']
|
5
|
-
if File.exist?('api_key.yml')
|
6
|
-
ENV['MAILCHIMP_API_KEY'] = YAML.load_file('api_key.yml')['api_key'] # api_key.yml is ignored in .gitignore
|
7
|
-
else
|
8
|
-
ENV['MAILCHIMP_API_KEY'] = 'vcr_playback-us11' # Will successfully replay the VCR cassettes
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
ENV['MAILCHIMP_DC'] = ENV['MAILCHIMP_API_KEY'].split('-')[1]
|
data/spec/support/vcr_setup.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
require 'vcr'
|
3
|
-
|
4
|
-
VCR.configure do |c|
|
5
|
-
c.configure_rspec_metadata!
|
6
|
-
c.cassette_library_dir = 'spec/fixtures/cassettes'
|
7
|
-
# c.debug_logger = File.open('tmp/vcr_debug.log', 'w')
|
8
|
-
c.hook_into :webmock
|
9
|
-
|
10
|
-
c.default_cassette_options = {
|
11
|
-
# record: :new_episodes,
|
12
|
-
erb: true,
|
13
|
-
decode_compressed_response: true,
|
14
|
-
match_requests_on: %i(method uri headers body),
|
15
|
-
allow_playback_repeats: false
|
16
|
-
}
|
17
|
-
end
|