mailkick 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/app/controllers/mailkick/subscriptions_controller.rb +1 -1
- data/config/routes.rb +1 -1
- data/lib/mailkick/engine.rb +1 -1
- data/lib/mailkick/mailer.rb +1 -1
- data/lib/mailkick/service/mandrill.rb +6 -2
- data/lib/mailkick/version.rb +1 -1
- data/lib/mailkick.rb +3 -1
- data/mailkick.gemspec +2 -0
- metadata +17 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90d458c1e23507be111eeb1e9de2ecfa430bbea1
|
4
|
+
data.tar.gz: bd18b0a3b32a5bd69ad8a73409c5d42bb7c6435e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ccb7874c79601b112b15242802a760d75a97cc16c07ec7b1163fbfd6bfb609b011cf26d6d443ef2edda5ff13850a016ca62073adbff703024dfc52fda776eb9
|
7
|
+
data.tar.gz: fd76e86747549847fcfe4359aba508e575c8b36c7eacba58f254209a012759b34fa34c044aa7c27d22f428fc6ff011f41208511f6d8207067753f5c0aa9d4439
|
data/CHANGELOG.md
CHANGED
data/config/routes.rb
CHANGED
data/lib/mailkick/engine.rb
CHANGED
@@ -3,7 +3,7 @@ module Mailkick
|
|
3
3
|
isolate_namespace Mailkick
|
4
4
|
|
5
5
|
initializer "mailkick" do |app|
|
6
|
-
Mailkick.discover_services
|
6
|
+
Mailkick.discover_services unless Mailkick.services.any?
|
7
7
|
secrets = app.respond_to?(:secrets) ? app.secrets : app.config
|
8
8
|
Mailkick.secret_token ||= secrets.respond_to?(:secret_key_base) ? secrets.secret_key_base : secrets.secret_token
|
9
9
|
ActiveSupport.on_load :action_mailer do
|
data/lib/mailkick/mailer.rb
CHANGED
@@ -10,9 +10,12 @@ module Mailkick
|
|
10
10
|
"unsub" => "unsubscribe"
|
11
11
|
}
|
12
12
|
|
13
|
+
# TODO remove ENV["MANDRILL_APIKEY"]
|
13
14
|
def initialize(options = {})
|
14
15
|
require "mandrill"
|
15
|
-
@mandrill = ::Mandrill::API.new(
|
16
|
+
@mandrill = ::Mandrill::API.new(
|
17
|
+
options[:api_key] || ENV["MANDRILL_APIKEY"] || ENV["MANDRILL_API_KEY"]
|
18
|
+
)
|
16
19
|
end
|
17
20
|
|
18
21
|
# TODO paginate
|
@@ -26,8 +29,9 @@ module Mailkick
|
|
26
29
|
end
|
27
30
|
end
|
28
31
|
|
32
|
+
# TODO remove ENV["MANDRILL_APIKEY"]
|
29
33
|
def self.discoverable?
|
30
|
-
!!(defined?(::Mandrill::API) && ENV["MANDRILL_APIKEY"])
|
34
|
+
!!(defined?(::Mandrill::API) && (ENV["MANDRILL_APIKEY"] || ENV["MANDRILL_API_KEY"]))
|
31
35
|
end
|
32
36
|
end
|
33
37
|
end
|
data/lib/mailkick/version.rb
CHANGED
data/lib/mailkick.rb
CHANGED
@@ -9,11 +9,13 @@ require "mailkick/service/mandrill"
|
|
9
9
|
require "mailkick/service/sendgrid"
|
10
10
|
require "mailkick/service/mailgun"
|
11
11
|
require "set"
|
12
|
+
require "safely/core"
|
12
13
|
|
13
14
|
module Mailkick
|
14
|
-
mattr_accessor :services, :user_method, :secret_token
|
15
|
+
mattr_accessor :services, :user_method, :secret_token, :mount
|
15
16
|
self.services = []
|
16
17
|
self.user_method = proc { |email| User.where(email: email).first rescue nil }
|
18
|
+
self.mount = true
|
17
19
|
|
18
20
|
def self.fetch_opt_outs
|
19
21
|
services.each(&:fetch_opt_outs)
|
data/mailkick.gemspec
CHANGED
@@ -18,6 +18,8 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
+
spec.add_dependency "safely_block", ">= 0.1.1"
|
22
|
+
|
21
23
|
spec.add_development_dependency "bundler", "~> 1.6"
|
22
24
|
spec.add_development_dependency "rake"
|
23
25
|
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailkick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: safely_block
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.1.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.1.1
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -91,9 +105,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
105
|
version: '0'
|
92
106
|
requirements: []
|
93
107
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.
|
108
|
+
rubygems_version: 2.5.1
|
95
109
|
signing_key:
|
96
110
|
specification_version: 4
|
97
111
|
summary: Email subscriptions made easy
|
98
112
|
test_files: []
|
99
|
-
has_rdoc:
|