mailkick 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +1 -1
- data/app/models/mailkick/opt_out.rb +1 -1
- data/lib/mailkick/service/mailchimp.rb +5 -5
- data/lib/mailkick/version.rb +1 -1
- data/mailkick.gemspec +4 -0
- metadata +59 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71a67112599c83fefbdd086151fcf834a24c217f
|
4
|
+
data.tar.gz: 609f546b4a4f6a3dc7a5878cb2e0bd2d344e1a97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d0392c53613b8580030f0b57c9b953cf4863d746200d92a2662abb16fd677017426cc4809ac122244b2d0facc92deb1ee021e191c1181f629179791404155b9
|
7
|
+
data.tar.gz: 99df02fda98d46cbf4cb1ed07c52f73f62f0f54e87e59e23146cc1250efb40c7e13138b810644c6d13735fde036c506063ec7dc80834cb6b6f863df989e1c600
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,7 @@ module Mailkick
|
|
4
4
|
class Service
|
5
5
|
class Mailchimp < Mailkick::Service
|
6
6
|
def initialize(options = {})
|
7
|
-
@gibbon = ::Gibbon::
|
7
|
+
@gibbon = ::Gibbon::Request.new(api_key: options[:api_key] || ENV["MAILCHIMP_API_KEY"])
|
8
8
|
@list_id = options[:list_id] || ENV["MAILCHIMP_LIST_ID"]
|
9
9
|
end
|
10
10
|
|
@@ -14,11 +14,11 @@ module Mailkick
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def unsubscribes
|
17
|
-
fetch(@gibbon.lists.members(
|
17
|
+
fetch(@gibbon.lists(@list_id).members.retrieve(params: {status: "unsubscribed"}).body["members"], "unsubscribe")
|
18
18
|
end
|
19
19
|
|
20
20
|
def spam_reports
|
21
|
-
fetch(@gibbon.lists
|
21
|
+
fetch(@gibbon.lists(@list_id).abuse_reports.retrieve.body["abuse_reports"], "spam")
|
22
22
|
end
|
23
23
|
|
24
24
|
def self.discoverable?
|
@@ -28,9 +28,9 @@ module Mailkick
|
|
28
28
|
protected
|
29
29
|
|
30
30
|
def fetch(response, reason)
|
31
|
-
response
|
31
|
+
response.map do |record|
|
32
32
|
{
|
33
|
-
email: record["
|
33
|
+
email: record["email_address"],
|
34
34
|
time: ActiveSupport::TimeZone["UTC"].parse(record["timestamp_opt"] || record["date"]),
|
35
35
|
reason: reason
|
36
36
|
}
|
data/lib/mailkick/version.rb
CHANGED
data/mailkick.gemspec
CHANGED
@@ -24,4 +24,8 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency "bundler"
|
25
25
|
spec.add_development_dependency "rake"
|
26
26
|
spec.add_development_dependency "minitest"
|
27
|
+
spec.add_development_dependency "sendgrid_toolkit"
|
28
|
+
spec.add_development_dependency "mandrill-api"
|
29
|
+
spec.add_development_dependency "gibbon", ">= 2"
|
30
|
+
spec.add_development_dependency "mailgun-ruby"
|
27
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailkick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -80,6 +80,62 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: sendgrid_toolkit
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: mandrill-api
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: gibbon
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '2'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '2'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: mailgun-ruby
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
83
139
|
description: Email subscriptions made easy
|
84
140
|
email:
|
85
141
|
- andrew@chartkick.com
|
@@ -135,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
191
|
version: '0'
|
136
192
|
requirements: []
|
137
193
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.
|
194
|
+
rubygems_version: 2.6.13
|
139
195
|
signing_key:
|
140
196
|
specification_version: 4
|
141
197
|
summary: Email subscriptions made easy
|