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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe2130c231eb69814fa0ad0f3afd38560b7186e9
4
- data.tar.gz: 83cd45ecac4cd1345c49c0e798c23cfcc4eb646d
3
+ metadata.gz: 578ee3a9017fb411299f65ca92e63d99f62ba5c9
4
+ data.tar.gz: 4ac755f40d9b70edd52996057b0b090bb0187e16
5
5
  SHA512:
6
- metadata.gz: 310069adf7575599950544584a1452ea43557862cb0e692191d5ea4b9132b9681681fa8dd62d87a75d1072d5e6ba92ee0848ac7b8183d5100335d355b3fce102
7
- data.tar.gz: 6304688a168126a1d6af7d6a92a17cc830488f2109ade62bf092022895c22f1314365cec25e53ccd556a9134f1bb1c534bac8fb998d7eb0d804a25fb4b1d9c1f
6
+ metadata.gz: 12e9c5ff140a53e27945b82dff0f8175b452332b03d1fdf3745dc5039dc183c234f74463a5ec05f52ad50373f989b852eb640346ad57205fd75d966f9299854f
7
+ data.tar.gz: 2294b76fdd392c8fdd5472682db14aa7bc8bed7ad8bf017ab688ef5752b8fd22830daf185f2fb642253eb8f3763f892314ca88a99badd9381bad0cca69cac8a5
@@ -1,3 +1,9 @@
1
+ ## 0.2.2
2
+
3
+ - Fixed secret token for Rails 4.1
4
+ - Fixed links with href
5
+ - Fixed message id for Rails 3.1
6
+
1
7
  ## 0.2.1
2
8
 
3
9
  - Added `only` and `except` options
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) and [Ahoy Events](https://github.com/ankane/ahoy_events).
15
+ :fire: To track visits and events, check out [Ahoy](https://github.com/ankane/ahoy)
16
16
 
17
17
  ## Installation
18
18
 
@@ -2,7 +2,8 @@ module AhoyEmail
2
2
  class Engine < ::Rails::Engine
3
3
 
4
4
  initializer "ahoy_email" do |app|
5
- AhoyEmail.secret_token = app.config.respond_to?(:secret_key_base) ? app.config.secret_key_base : app.config.secret_token
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
@@ -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"])
@@ -1,3 +1,3 @@
1
1
  module AhoyEmail
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
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.1
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-05-27 00:00:00.000000000 Z
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: