maropost 0.3.2 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rspec +1 -1
- data/.rubocop.yml +18 -0
- data/.simplecov +4 -0
- data/Gemfile +2 -7
- data/Rakefile +8 -3
- data/lib/maropost/api.rb +70 -78
- data/lib/maropost/configuration.rb +9 -4
- data/lib/maropost/contact.rb +47 -28
- data/lib/maropost/do_not_mail_list.rb +45 -46
- data/lib/maropost/service.rb +57 -0
- data/lib/maropost/version.rb +3 -1
- data/lib/maropost.rb +4 -0
- data/maropost.gemspec +48 -13
- metadata +120 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa4796e02a8b14d6dc9d9cfafa879a2a9ca193af
|
4
|
+
data.tar.gz: bf551e4b26579e0183ad891af2a3a4a4476f4daf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d32697c99f8768a40913ab4637fa1a64aa33a9c95e1f88c6fddfedcfaf5234d864fb6e8e8eed48cc82d7485ba1aa2de02f523508373bbada8a58606dbc1d3173
|
7
|
+
data.tar.gz: 300107e26493f99c40001b45a6454a3a91303c846c5525c9d51f0f08563c2c9868b0e7d62350e17c9011ece32e3d398e6c20c7e1b4b1534f49eec5b22fc18246
|
data/.gitignore
CHANGED
data/.rspec
CHANGED
data/.rubocop.yml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
AllCops:
|
2
|
+
DisplayCopNames: true
|
3
|
+
TargetRubyVersion: 2.3
|
4
|
+
Exclude:
|
5
|
+
- 'bin/**/*'
|
6
|
+
- 'vendor/**/*'
|
7
|
+
Documentation:
|
8
|
+
Enabled: false
|
9
|
+
Metrics/BlockLength:
|
10
|
+
Exclude:
|
11
|
+
- 'spec/**/*'
|
12
|
+
- '*.gemspec'
|
13
|
+
Metrics/LineLength:
|
14
|
+
Max: 130
|
15
|
+
Metrics/MethodLength:
|
16
|
+
Max: 25
|
17
|
+
Style/Lambda:
|
18
|
+
EnforcedStyle: literal
|
data/.simplecov
ADDED
data/Gemfile
CHANGED
@@ -1,11 +1,6 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'https://rubygems.org'
|
2
4
|
|
3
5
|
# Specify your gem's dependencies in maropost.gemspec
|
4
6
|
gemspec
|
5
|
-
|
6
|
-
group :development, :test do
|
7
|
-
gem 'bundler', '~> 1.15'
|
8
|
-
gem 'rake', '~> 12.0'
|
9
|
-
gem 'rspec', '~> 3.5'
|
10
|
-
gem 'webmock'
|
11
|
-
end
|
data/Rakefile
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'bundler/gem_tasks'
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
require 'rubocop/rake_task'
|
3
6
|
|
4
7
|
RSpec::Core::RakeTask.new(:spec)
|
5
8
|
|
6
|
-
task :
|
9
|
+
task default: %i[spec rubocop]
|
10
|
+
|
11
|
+
RuboCop::RakeTask.new
|
data/lib/maropost/api.rb
CHANGED
@@ -1,93 +1,85 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Maropost
|
2
4
|
class Api
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
5
|
+
class << self
|
6
|
+
def find(email)
|
7
|
+
raise ArgumentError, 'must provide email' if email.blank?
|
8
|
+
service = Service.new(
|
9
|
+
method: :get,
|
10
|
+
path: 'contacts/email.json',
|
11
|
+
query: {
|
12
|
+
'contact[email]': email,
|
13
|
+
'auth_token': Maropost.configuration.auth_token
|
14
|
+
}
|
15
|
+
)
|
16
|
+
response = JSON.parse(service.execute!.body)
|
17
|
+
Maropost::Contact.new(response)
|
18
|
+
rescue RestClient::ResourceNotFound
|
19
|
+
nil
|
17
20
|
end
|
18
|
-
update_do_not_mail_list(contact)
|
19
|
-
end
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
contact
|
29
|
-
end
|
30
|
-
|
31
|
-
def self.update(contact)
|
32
|
-
response = request(:put,
|
33
|
-
maropost_url("contacts/#{contact.id}.json"),
|
34
|
-
create_or_update_payload(contact))
|
35
|
-
Maropost::Contact.new(JSON.parse response.body)
|
36
|
-
rescue RestClient::UnprocessableEntity, RestClient::BadRequest => e
|
37
|
-
contact.errors << 'Unable to update contact'
|
38
|
-
contact
|
39
|
-
end
|
22
|
+
def update_subscriptions(contact)
|
23
|
+
to_maropost(
|
24
|
+
find(contact.email),
|
25
|
+
contact
|
26
|
+
)
|
27
|
+
update_do_not_mail_list(contact)
|
28
|
+
end
|
40
29
|
|
41
|
-
|
30
|
+
def create(contact)
|
31
|
+
service = Service.new(
|
32
|
+
method: :post,
|
33
|
+
path: 'contacts.json',
|
34
|
+
payload: create_or_update_payload(contact)
|
35
|
+
)
|
36
|
+
response = JSON.parse(service.execute!.body)
|
37
|
+
Maropost::Contact.new(response)
|
38
|
+
rescue RestClient::UnprocessableEntity, RestClient::BadRequest
|
39
|
+
contact.errors << 'Unable to create or update contact'
|
40
|
+
contact
|
41
|
+
end
|
42
42
|
|
43
|
-
|
44
|
-
|
45
|
-
|
43
|
+
def update(contact)
|
44
|
+
service = Service.new(
|
45
|
+
method: :put,
|
46
|
+
path: "contacts/#{contact.id}.json",
|
47
|
+
payload: create_or_update_payload(contact)
|
48
|
+
)
|
49
|
+
response = JSON.parse(service.execute!.body)
|
50
|
+
Maropost::Contact.new(response)
|
51
|
+
rescue RestClient::UnprocessableEntity, RestClient::BadRequest
|
52
|
+
contact.errors << 'Unable to update contact'
|
53
|
+
contact
|
54
|
+
end
|
46
55
|
|
47
|
-
|
48
|
-
RestClient::Request.logged_request(
|
49
|
-
method: method,
|
50
|
-
timeout: 10,
|
51
|
-
open_timeout: 10,
|
52
|
-
url: url,
|
53
|
-
payload: { auth_token: Maropost.configuration.auth_token }.merge(payload).to_json,
|
54
|
-
headers: { content_type: 'application/json', accept: 'application/json' },
|
55
|
-
verify_ssl: OpenSSL::SSL::VERIFY_PEER
|
56
|
-
)
|
57
|
-
end
|
56
|
+
private
|
58
57
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
{
|
58
|
+
def create_or_update_payload(contact)
|
59
|
+
{
|
60
|
+
contact: {
|
63
61
|
email: contact.email,
|
64
62
|
phone: contact.phone_number,
|
65
|
-
custom_field:
|
66
|
-
{
|
67
|
-
ama_rewards: contact.ama_rewards,
|
68
|
-
ama_membership: contact.ama_membership,
|
69
|
-
ama_insurance: contact.ama_insurance,
|
70
|
-
ama_travel: contact.ama_travel,
|
71
|
-
ama_new_member_series: contact.ama_new_member_series,
|
72
|
-
ama_fleet_safety: contact.ama_fleet_safety,
|
73
|
-
ovrr_personal: contact.ovrr_personal,
|
74
|
-
ovrr_business: contact.ovrr_business,
|
75
|
-
ovrr_associate: contact.ovrr_associate,
|
76
|
-
ama_vr_reminder: contact.ama_vr_reminder,
|
77
|
-
ama_vr_reminder_email: contact.ama_vr_reminder_email,
|
78
|
-
ama_vr_reminder_sms: contact.ama_vr_reminder_sms,
|
79
|
-
ama_vr_reminder_autocall: contact.ama_vr_reminder_autocall,
|
80
|
-
cell_phone_number: contact.cell_phone_number
|
81
|
-
}
|
63
|
+
custom_field: contact.list_parameters
|
82
64
|
}
|
83
|
-
|
84
|
-
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
def to_maropost(existing, contact)
|
69
|
+
if existing
|
70
|
+
contact.id = existing.id
|
71
|
+
update(contact)
|
72
|
+
else
|
73
|
+
create(contact)
|
74
|
+
end
|
75
|
+
end
|
85
76
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
77
|
+
def update_do_not_mail_list(contact)
|
78
|
+
if contact.subscribed_to_any_lists?
|
79
|
+
DoNotMailList.delete(contact)
|
80
|
+
else
|
81
|
+
DoNotMailList.create(contact)
|
82
|
+
end
|
91
83
|
end
|
92
84
|
end
|
93
85
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Maropost
|
2
4
|
attr_accessor :configuration
|
3
5
|
|
@@ -10,11 +12,14 @@ module Maropost
|
|
10
12
|
end
|
11
13
|
|
12
14
|
class Configuration
|
13
|
-
attr_accessor :api_url, :auth_token
|
15
|
+
attr_accessor :api_url, :auth_token, :open_timeout, :read_timeout
|
16
|
+
|
17
|
+
def open_timeout
|
18
|
+
@open_timeout || 5
|
19
|
+
end
|
14
20
|
|
15
|
-
def
|
16
|
-
|
17
|
-
self.auth_token = "auth_token"
|
21
|
+
def read_timeout
|
22
|
+
@read_timeout || 10
|
18
23
|
end
|
19
24
|
end
|
20
25
|
end
|
data/lib/maropost/contact.rb
CHANGED
@@ -1,39 +1,58 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Maropost
|
2
4
|
class Contact
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
ATTRIBUTES = %i[
|
6
|
+
id
|
7
|
+
email
|
8
|
+
phone_number
|
9
|
+
cell_phone_number
|
10
|
+
lists
|
11
|
+
errors
|
12
|
+
].freeze
|
13
|
+
LISTS = %i[
|
14
|
+
ama_rewards
|
15
|
+
ama_membership
|
16
|
+
ama_insurance
|
17
|
+
ama_travel
|
18
|
+
ama_new_member_series
|
19
|
+
ama_fleet_safety
|
20
|
+
ovrr_personal
|
21
|
+
ovrr_business
|
22
|
+
ovrr_associate
|
23
|
+
ama_vr_reminder
|
24
|
+
ama_vr_reminder_email
|
25
|
+
ama_vr_reminder_sms
|
26
|
+
ama_vr_reminder_autocall
|
27
|
+
].freeze
|
8
28
|
|
9
|
-
|
10
|
-
data = data.stringify_keys
|
11
|
-
self.id = data['id']
|
12
|
-
self.email = data['email']
|
13
|
-
self.ama_rewards = data['ama_rewards'] || '0'
|
14
|
-
self.ama_membership = data['ama_membership'] || '0'
|
15
|
-
self.ama_insurance = data['ama_insurance'] || '0'
|
16
|
-
self.ama_travel = data['ama_travel'] || '0'
|
17
|
-
self.ama_new_member_series = data['ama_new_member_series'] || '0'
|
18
|
-
self.ama_fleet_safety = data['ama_fleet_safety'] || '0'
|
19
|
-
self.ovrr_personal = data['ovrr_personal'] || ''
|
20
|
-
self.ovrr_business = data['ovrr_business'] || ''
|
21
|
-
self.ovrr_associate = data['ovrr_associate'] || ''
|
22
|
-
self.ama_vr_reminder = data['ama_vr_reminder'] || '0'
|
23
|
-
self.ama_vr_reminder_email = data['ama_vr_reminder_email'] || '0'
|
24
|
-
self.ama_vr_reminder_sms = data['ama_vr_reminder_sms'] || '0'
|
25
|
-
self.ama_vr_reminder_autocall = data['ama_vr_reminder_autocall'] || '0'
|
26
|
-
self.phone_number = data['phone'] || ''
|
27
|
-
self.cell_phone_number = data['cell_phone_number'] || ''
|
29
|
+
attr_accessor(*ATTRIBUTES)
|
28
30
|
|
31
|
+
def initialize(opts = {})
|
32
|
+
data = opts.with_indifferent_access
|
33
|
+
self.id = data[:id]
|
34
|
+
self.email = data[:email]
|
35
|
+
self.phone_number = data[:phone]
|
36
|
+
self.cell_phone_number = data[:cell_phone_number]
|
29
37
|
self.errors = []
|
38
|
+
self.lists = {}
|
39
|
+
initialize_lists(data)
|
30
40
|
end
|
31
41
|
|
32
42
|
def subscribed_to_any_lists?
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
43
|
+
lists.values.any? { |v| v == '1' }
|
44
|
+
end
|
45
|
+
|
46
|
+
def list_parameters
|
47
|
+
{ cell_phone_number: cell_phone_number }.merge(lists)
|
48
|
+
end
|
49
|
+
|
50
|
+
private
|
51
|
+
|
52
|
+
def initialize_lists(opts = {})
|
53
|
+
LISTS.each do |list|
|
54
|
+
lists[list] = opts.fetch(list, 0).to_s
|
55
|
+
end
|
37
56
|
end
|
38
57
|
end
|
39
58
|
end
|
@@ -1,53 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Maropost
|
2
4
|
class DoNotMailList
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
payload)
|
20
|
-
contact
|
21
|
-
rescue RestClient::UnprocessableEntity, RestClient::BadRequest => e
|
22
|
-
contact.errors << "Unable to subscribe contact. Error: #{e.message}"
|
23
|
-
contact
|
24
|
-
end
|
25
|
-
|
26
|
-
def self.delete(contact)
|
27
|
-
request(:delete,
|
28
|
-
maropost_url('global_unsubscribes/delete.json', "email=#{CGI::escape(contact.email)}"))
|
29
|
-
contact
|
30
|
-
rescue RestClient::UnprocessableEntity, RestClient::BadRequest => e
|
31
|
-
contact.errors << "Unable to unsubscribe contact. Error: #{e.message}"
|
32
|
-
contact
|
33
|
-
end
|
5
|
+
class << self
|
6
|
+
def exists?(contact)
|
7
|
+
service = Service.new(
|
8
|
+
method: :get,
|
9
|
+
path: 'global_unsubscribes/email.json',
|
10
|
+
query: {
|
11
|
+
'contact[email]': contact.email,
|
12
|
+
'auth_token': Maropost.configuration.auth_token
|
13
|
+
}
|
14
|
+
)
|
15
|
+
response = JSON.parse(service.execute!.body)
|
16
|
+
response['id'].present?
|
17
|
+
rescue RestClient::ResourceNotFound, RestClient::BadRequest => e
|
18
|
+
contact.errors << "Unexpected error occurred. Error: #{e.message}"
|
19
|
+
contact
|
20
|
+
end
|
34
21
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
22
|
+
def create(contact)
|
23
|
+
payload = { 'global_unsubscribe': { 'email': contact.email } }
|
24
|
+
service = Service.new(
|
25
|
+
method: :post,
|
26
|
+
path: 'global_unsubscribes.json',
|
27
|
+
payload: payload
|
28
|
+
)
|
29
|
+
service.execute!
|
30
|
+
contact
|
31
|
+
rescue RestClient::UnprocessableEntity, RestClient::BadRequest => e
|
32
|
+
contact.errors << "Unable to subscribe contact. Error: #{e.message}"
|
33
|
+
contact
|
34
|
+
end
|
40
35
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
36
|
+
def delete(contact)
|
37
|
+
service = Service.new(
|
38
|
+
method: :delete,
|
39
|
+
path: 'global_unsubscribes/delete.json',
|
40
|
+
query: {
|
41
|
+
'email': contact.email
|
42
|
+
}
|
43
|
+
)
|
44
|
+
service.execute!
|
45
|
+
contact
|
46
|
+
rescue RestClient::UnprocessableEntity, RestClient::BadRequest => e
|
47
|
+
contact.errors << "Unable to unsubscribe contact. Error: #{e.message}"
|
48
|
+
contact
|
49
|
+
end
|
51
50
|
end
|
52
51
|
end
|
53
52
|
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Maropost
|
4
|
+
class Service
|
5
|
+
attr_accessor :method, :path, :query, :payload, :request_id
|
6
|
+
|
7
|
+
def initialize(opts = {})
|
8
|
+
self.method = opts.fetch(:method)
|
9
|
+
self.path = opts.fetch(:path)
|
10
|
+
self.payload = opts.fetch(:payload, {}) # optional
|
11
|
+
self.query = opts[:query] # optional
|
12
|
+
self.request_id = SecureRandom.uuid
|
13
|
+
end
|
14
|
+
|
15
|
+
def execute!
|
16
|
+
RestClient::Request.logged_request(params)
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def maropost_url
|
22
|
+
self.query &&= encode_query(query)
|
23
|
+
uri = URI.join(Maropost.configuration.api_url, path)
|
24
|
+
uri.tap { |u| query && u.query = query }.to_s
|
25
|
+
end
|
26
|
+
|
27
|
+
def encode_query(hash)
|
28
|
+
RestClient::Utils.encode_query_string(hash)
|
29
|
+
end
|
30
|
+
|
31
|
+
def get?
|
32
|
+
method.to_s.casecmp('get').zero?
|
33
|
+
end
|
34
|
+
|
35
|
+
def base_params
|
36
|
+
{
|
37
|
+
method: method,
|
38
|
+
read_timeout: Maropost.configuration.read_timeout,
|
39
|
+
open_timeout: Maropost.configuration.open_timeout,
|
40
|
+
url: maropost_url,
|
41
|
+
headers: {
|
42
|
+
content_type: 'application/json',
|
43
|
+
accept: 'application/json',
|
44
|
+
request_id: request_id
|
45
|
+
},
|
46
|
+
verify_ssl: OpenSSL::SSL::VERIFY_PEER
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
def params
|
51
|
+
return base_params if get?
|
52
|
+
base_params.merge(
|
53
|
+
payload: { auth_token: Maropost.configuration.auth_token }.merge(payload).to_json
|
54
|
+
)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
data/lib/maropost/version.rb
CHANGED
data/lib/maropost.rb
CHANGED
@@ -1,8 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'active_support/all'
|
1
4
|
require 'json'
|
2
5
|
require 'rest_client'
|
3
6
|
require 'rest_client/jogger'
|
4
7
|
require 'maropost/version'
|
5
8
|
require 'maropost/configuration'
|
9
|
+
require 'maropost/service'
|
6
10
|
require 'maropost/api'
|
7
11
|
require 'maropost/contact'
|
8
12
|
require 'maropost/do_not_mail_list'
|
data/maropost.gemspec
CHANGED
@@ -1,27 +1,62 @@
|
|
1
1
|
# coding: utf-8
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
2
4
|
lib = File.expand_path('../lib', __FILE__)
|
3
5
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
6
|
require 'maropost/version'
|
5
7
|
|
6
8
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name
|
8
|
-
spec.version
|
9
|
-
spec.authors
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
spec.name = 'maropost'
|
10
|
+
spec.version = Maropost::VERSION
|
11
|
+
spec.authors = [
|
12
|
+
'Michael van den Beuken',
|
13
|
+
'Ruben Estevez',
|
14
|
+
'Jordan Babe',
|
15
|
+
'Ryan Jones',
|
16
|
+
'Darko Dosenovic',
|
17
|
+
'Jonathan Weyermann',
|
18
|
+
'Kayt Campbell',
|
19
|
+
'Jesse Doyle',
|
20
|
+
'Zoie Carnegie',
|
21
|
+
'Sinead Errity',
|
22
|
+
'Serene Yew',
|
23
|
+
'Martin Echtner'
|
24
|
+
]
|
25
|
+
spec.email = [
|
26
|
+
'michael.beuken@gmail.com',
|
27
|
+
'ruben.a.estevez@gmail.com',
|
28
|
+
'jorbabe@gmail.com',
|
29
|
+
'ryan.michael.jones@gmail.com',
|
30
|
+
'darko.dosenovic@ama.ab.ca',
|
31
|
+
'jonathan.weyermann@ama.ab.ca',
|
32
|
+
'kayt.campbell@ama.ab.ca',
|
33
|
+
'jdoyle@ualberta.ca',
|
34
|
+
'zoie.carnegie@ama.ab.ca',
|
35
|
+
'sinead.errity@ama.ab.ca',
|
36
|
+
'serene.yew@ama.ab.ca',
|
37
|
+
'martin.echtner@ama.ab.ca'
|
38
|
+
]
|
39
|
+
spec.summary = 'Interact with the Maropost API'
|
40
|
+
spec.description = 'Interact with the Maropost API'
|
41
|
+
spec.homepage = 'https://github.com/amaabca/maropost'
|
42
|
+
spec.license = 'MIT'
|
15
43
|
|
16
|
-
spec.files
|
17
|
-
spec.test_files
|
44
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
45
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
46
|
|
19
|
-
spec.bindir
|
20
|
-
spec.
|
21
|
-
spec.require_paths = %w(lib spec)
|
47
|
+
spec.bindir = 'bin'
|
48
|
+
spec.require_paths = %w[lib spec]
|
22
49
|
|
23
50
|
spec.add_dependency 'rest-client'
|
24
51
|
spec.add_dependency 'rest-client-jogger'
|
52
|
+
spec.add_dependency 'activesupport'
|
53
|
+
spec.add_development_dependency 'simplecov'
|
54
|
+
spec.add_development_dependency 'bundler'
|
55
|
+
spec.add_development_dependency 'rake'
|
56
|
+
spec.add_development_dependency 'rspec', '>= 3.0'
|
57
|
+
spec.add_development_dependency 'webmock'
|
58
|
+
spec.add_development_dependency 'rubocop', '0.49.1'
|
59
|
+
spec.add_development_dependency 'pry'
|
25
60
|
|
26
61
|
spec.required_ruby_version = '>= 2.2'
|
27
62
|
end
|
metadata
CHANGED
@@ -1,27 +1,25 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maropost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael van den Beuken
|
8
8
|
- Ruben Estevez
|
9
9
|
- Jordan Babe
|
10
|
-
- Mathieu Gilbert
|
11
10
|
- Ryan Jones
|
12
11
|
- Darko Dosenovic
|
13
12
|
- Jonathan Weyermann
|
14
|
-
- Adam Melnyk
|
15
13
|
- Kayt Campbell
|
16
|
-
- Kathleen Robertson
|
17
14
|
- Jesse Doyle
|
15
|
+
- Zoie Carnegie
|
18
16
|
- Sinead Errity
|
19
17
|
- Serene Yew
|
20
18
|
- Martin Echtner
|
21
19
|
autorequire:
|
22
|
-
bindir:
|
20
|
+
bindir: bin
|
23
21
|
cert_chain: []
|
24
|
-
date: 2017-10-
|
22
|
+
date: 2017-10-18 00:00:00.000000000 Z
|
25
23
|
dependencies:
|
26
24
|
- !ruby/object:Gem::Dependency
|
27
25
|
name: rest-client
|
@@ -51,19 +49,129 @@ dependencies:
|
|
51
49
|
- - ">="
|
52
50
|
- !ruby/object:Gem::Version
|
53
51
|
version: '0'
|
52
|
+
- !ruby/object:Gem::Dependency
|
53
|
+
name: activesupport
|
54
|
+
requirement: !ruby/object:Gem::Requirement
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: '0'
|
59
|
+
type: :runtime
|
60
|
+
prerelease: false
|
61
|
+
version_requirements: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
- !ruby/object:Gem::Dependency
|
67
|
+
name: simplecov
|
68
|
+
requirement: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '0'
|
73
|
+
type: :development
|
74
|
+
prerelease: false
|
75
|
+
version_requirements: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: bundler
|
82
|
+
requirement: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
type: :development
|
88
|
+
prerelease: false
|
89
|
+
version_requirements: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: rake
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '0'
|
101
|
+
type: :development
|
102
|
+
prerelease: false
|
103
|
+
version_requirements: !ruby/object:Gem::Requirement
|
104
|
+
requirements:
|
105
|
+
- - ">="
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: '0'
|
108
|
+
- !ruby/object:Gem::Dependency
|
109
|
+
name: rspec
|
110
|
+
requirement: !ruby/object:Gem::Requirement
|
111
|
+
requirements:
|
112
|
+
- - ">="
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '3.0'
|
115
|
+
type: :development
|
116
|
+
prerelease: false
|
117
|
+
version_requirements: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - ">="
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '3.0'
|
122
|
+
- !ruby/object:Gem::Dependency
|
123
|
+
name: webmock
|
124
|
+
requirement: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '0'
|
129
|
+
type: :development
|
130
|
+
prerelease: false
|
131
|
+
version_requirements: !ruby/object:Gem::Requirement
|
132
|
+
requirements:
|
133
|
+
- - ">="
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '0'
|
136
|
+
- !ruby/object:Gem::Dependency
|
137
|
+
name: rubocop
|
138
|
+
requirement: !ruby/object:Gem::Requirement
|
139
|
+
requirements:
|
140
|
+
- - '='
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: 0.49.1
|
143
|
+
type: :development
|
144
|
+
prerelease: false
|
145
|
+
version_requirements: !ruby/object:Gem::Requirement
|
146
|
+
requirements:
|
147
|
+
- - '='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: 0.49.1
|
150
|
+
- !ruby/object:Gem::Dependency
|
151
|
+
name: pry
|
152
|
+
requirement: !ruby/object:Gem::Requirement
|
153
|
+
requirements:
|
154
|
+
- - ">="
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '0'
|
157
|
+
type: :development
|
158
|
+
prerelease: false
|
159
|
+
version_requirements: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
161
|
+
- - ">="
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: '0'
|
54
164
|
description: Interact with the Maropost API
|
55
165
|
email:
|
56
166
|
- michael.beuken@gmail.com
|
57
167
|
- ruben.a.estevez@gmail.com
|
58
168
|
- jorbabe@gmail.com
|
59
|
-
- mathieu.gilbert@ama.ab.ca
|
60
169
|
- ryan.michael.jones@gmail.com
|
61
170
|
- darko.dosenovic@ama.ab.ca
|
62
171
|
- jonathan.weyermann@ama.ab.ca
|
63
|
-
- adam.melnyk@ama.ab.ca
|
64
172
|
- kayt.campbell@ama.ab.ca
|
65
|
-
- kathleen.robertson@ama.ab.ca
|
66
173
|
- jdoyle@ualberta.ca
|
174
|
+
- zoie.carnegie@ama.ab.ca
|
67
175
|
- sinead.errity@ama.ab.ca
|
68
176
|
- serene.yew@ama.ab.ca
|
69
177
|
- martin.echtner@ama.ab.ca
|
@@ -73,7 +181,9 @@ extra_rdoc_files: []
|
|
73
181
|
files:
|
74
182
|
- ".gitignore"
|
75
183
|
- ".rspec"
|
184
|
+
- ".rubocop.yml"
|
76
185
|
- ".ruby-version"
|
186
|
+
- ".simplecov"
|
77
187
|
- ".travis.yml"
|
78
188
|
- Gemfile
|
79
189
|
- LICENSE.txt
|
@@ -86,6 +196,7 @@ files:
|
|
86
196
|
- lib/maropost/configuration.rb
|
87
197
|
- lib/maropost/contact.rb
|
88
198
|
- lib/maropost/do_not_mail_list.rb
|
199
|
+
- lib/maropost/service.rb
|
89
200
|
- lib/maropost/version.rb
|
90
201
|
- maropost.gemspec
|
91
202
|
homepage: https://github.com/amaabca/maropost
|