mailchimp_api_v3 0.2.17 → 0.2.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +7 -0
  3. data/.travis.yml +9 -2
  4. data/Gemfile +5 -1
  5. data/Guardfile +1 -0
  6. data/README.md +1 -1
  7. data/Rakefile +9 -0
  8. data/lib/mailchimp_api_v3.rb +9 -0
  9. data/lib/mailchimp_api_v3/account.rb +1 -0
  10. data/lib/mailchimp_api_v3/client.rb +2 -7
  11. data/lib/mailchimp_api_v3/client/remote.rb +1 -0
  12. data/lib/mailchimp_api_v3/collection.rb +1 -0
  13. data/lib/mailchimp_api_v3/collection/paging.rb +1 -0
  14. data/lib/mailchimp_api_v3/exception.rb +1 -0
  15. data/lib/mailchimp_api_v3/instance.rb +1 -0
  16. data/lib/mailchimp_api_v3/interest.rb +1 -0
  17. data/lib/mailchimp_api_v3/interest_category.rb +1 -0
  18. data/lib/mailchimp_api_v3/list.rb +1 -0
  19. data/lib/mailchimp_api_v3/member.rb +1 -0
  20. data/lib/mailchimp_api_v3/version.rb +2 -1
  21. data/mailchimp_api_v3.gemspec +3 -2
  22. metadata +14 -73
  23. data/spec/fixtures/cassettes/account.yml +0 -96
  24. data/spec/fixtures/cassettes/client.yml +0 -301
  25. data/spec/fixtures/cassettes/exception.yml +0 -189
  26. data/spec/fixtures/cassettes/interest.yml +0 -431
  27. data/spec/fixtures/cassettes/interest_categories.yml +0 -660
  28. data/spec/fixtures/cassettes/interest_category.yml +0 -436
  29. data/spec/fixtures/cassettes/interests.yml +0 -799
  30. data/spec/fixtures/cassettes/list.yml +0 -246
  31. data/spec/fixtures/cassettes/lists.yml +0 -158
  32. data/spec/fixtures/cassettes/mailchimp.yml +0 -96
  33. data/spec/fixtures/cassettes/member.yml +0 -298
  34. data/spec/fixtures/cassettes/members.yml +0 -808
  35. data/spec/fixtures/cassettes/members_create_or_update.yml +0 -817
  36. data/spec/fixtures/cassettes/members_paging.yml +0 -264
  37. data/spec/fixtures/cassettes/members_with_interest_categories.yml +0 -902
  38. data/spec/mailchimp_api_v3/account_spec.rb +0 -15
  39. data/spec/mailchimp_api_v3/client_spec.rb +0 -77
  40. data/spec/mailchimp_api_v3/exception_spec.rb +0 -55
  41. data/spec/mailchimp_api_v3/interest_categories_spec.rb +0 -41
  42. data/spec/mailchimp_api_v3/interest_category_spec.rb +0 -25
  43. data/spec/mailchimp_api_v3/interest_spec.rb +0 -23
  44. data/spec/mailchimp_api_v3/interests_spec.rb +0 -43
  45. data/spec/mailchimp_api_v3/list_spec.rb +0 -65
  46. data/spec/mailchimp_api_v3/lists_spec.rb +0 -21
  47. data/spec/mailchimp_api_v3/member_spec.rb +0 -58
  48. data/spec/mailchimp_api_v3/members_spec.rb +0 -132
  49. data/spec/mailchimp_spec.rb +0 -14
  50. data/spec/spec_helper.rb +0 -24
  51. data/spec/support/api_key.rb +0 -12
  52. data/spec/support/vcr_setup.rb +0 -17
@@ -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
@@ -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
@@ -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]
@@ -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