ahoy_email 0.2.1 → 0.2.2
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/README.md +1 -1
- data/lib/ahoy_email/engine.rb +2 -1
- data/lib/ahoy_email/processor.rb +2 -2
- data/lib/ahoy_email/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 578ee3a9017fb411299f65ca92e63d99f62ba5c9
|
4
|
+
data.tar.gz: 4ac755f40d9b70edd52996057b0b090bb0187e16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12e9c5ff140a53e27945b82dff0f8175b452332b03d1fdf3745dc5039dc183c234f74463a5ec05f52ad50373f989b852eb640346ad57205fd75d966f9299854f
|
7
|
+
data.tar.gz: 2294b76fdd392c8fdd5472682db14aa7bc8bed7ad8bf017ab688ef5752b8fd22830daf185f2fb642253eb8f3763f892314ca88a99badd9381bad0cca69cac8a5
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -12,7 +12,7 @@ Works with any email service.
|
|
12
12
|
|
13
13
|
:bullettrain_side: To manage unsubscribes, check out [Mailkick](https://github.com/ankane/mailkick)
|
14
14
|
|
15
|
-
:fire: To track visits and events, check out [Ahoy](https://github.com/ankane/ahoy)
|
15
|
+
:fire: To track visits and events, check out [Ahoy](https://github.com/ankane/ahoy)
|
16
16
|
|
17
17
|
## Installation
|
18
18
|
|
data/lib/ahoy_email/engine.rb
CHANGED
@@ -2,7 +2,8 @@ module AhoyEmail
|
|
2
2
|
class Engine < ::Rails::Engine
|
3
3
|
|
4
4
|
initializer "ahoy_email" do |app|
|
5
|
-
|
5
|
+
secrets = app.respond_to?(:secrets) ? app.secrets : app.config
|
6
|
+
AhoyEmail.secret_token = secrets.respond_to?(:secret_key_base) ? secrets.secret_key_base : secrets.secret_token
|
6
7
|
end
|
7
8
|
|
8
9
|
end
|
data/lib/ahoy_email/processor.rb
CHANGED
@@ -23,7 +23,7 @@ module AhoyEmail
|
|
23
23
|
ahoy_message.content = message.to_s if ahoy_message.respond_to?(:content=)
|
24
24
|
|
25
25
|
ahoy_message.save
|
26
|
-
message["Ahoy-Message-Id"] = ahoy_message.id
|
26
|
+
message["Ahoy-Message-Id"] = ahoy_message.id.to_s
|
27
27
|
end
|
28
28
|
rescue => e
|
29
29
|
report_error(e)
|
@@ -90,7 +90,7 @@ module AhoyEmail
|
|
90
90
|
body = (message.html_part || message).body
|
91
91
|
|
92
92
|
doc = Nokogiri::HTML(body.raw_source)
|
93
|
-
doc.css("a").each do |link|
|
93
|
+
doc.css("a[href]").each do |link|
|
94
94
|
# utm params first
|
95
95
|
if options[:utm_params] and !skip_attribute?(link, "utm-params")
|
96
96
|
uri = Addressable::URI.parse(link["href"])
|
data/lib/ahoy_email/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ahoy_email
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -130,3 +130,4 @@ signing_key:
|
|
130
130
|
specification_version: 4
|
131
131
|
summary: Simple, powerful email tracking for Rails
|
132
132
|
test_files: []
|
133
|
+
has_rdoc:
|