mailkick 0.0.4 → 0.0.5

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: 58457207d32f0dd9a131524e0a6461133c0fb702
4
- data.tar.gz: ef4854e607a9a99da6513dfa823bb23b2c2f0162
3
+ metadata.gz: c525505d8fffda960f43cf7f5c85aaf205944a23
4
+ data.tar.gz: 14e99877ab0212660002d48d792ce0f6f82ae4df
5
5
  SHA512:
6
- metadata.gz: 253736c9f9387dd4703188189ace226a6aab066591a2a0091cfdc81e9dacc3d078219551b8a088974d0c6376e1ab472d9267a588a4951b463a38abb68b2b9264
7
- data.tar.gz: 800b46251c5dc872ff2ae6eb95a437eb9dfe5ccc5fec8a23751d3f0a23fbc6b484b7ebea813eafbba2928821e64a2306278a74d86bdedb6c242d73f49ebe38b1
6
+ metadata.gz: 9a3c6a9d51ed34fee50fea39685bb49ad8d7ad944867b3b746683e46be1866349af57b6985d10295bee57d15bc321bb19d054258f8437e7cbd5edea999a1222b
7
+ data.tar.gz: 1b89dd17826de70c82947e41b9a2d7e85f4857e6c1496e9bc3c2ce9577b197957f35be4cafb25463b6f2042522b06f013dbbb7d9463b40a031c4c6a9ea88d1cf
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.0.5
2
+
3
+ - Fixed bug with subscriptions page
4
+
1
5
  ## 0.0.4
2
6
 
3
7
  - Added `email_key` option to `mailkick_user`
data/README.md CHANGED
@@ -129,7 +129,7 @@ Mailkick.services = [
129
129
  ]
130
130
  ```
131
131
 
132
- ## Multiple Lists
132
+ ## Multiple Lists [beta]
133
133
 
134
134
  You may want to split your emails into multiple categories, like sale emails and order reminders.
135
135
 
@@ -177,6 +177,11 @@ More great gems for email
177
177
  - [Roadie](https://github.com/Mange/roadie) - inline CSS
178
178
  - [Letter Opener](https://github.com/ryanb/letter_opener) - preview email in development
179
179
 
180
+ ## TODO
181
+
182
+ - Make it easy to customize controller
183
+ - Subscribe to events
184
+
180
185
  ## Reference
181
186
 
182
187
  Change how the user is determined
@@ -6,12 +6,12 @@ module Mailkick
6
6
  end
7
7
 
8
8
  def unsubscribe
9
- Mailkick.opt_out(email: @email, user: @user, list: @list)
9
+ Mailkick.opt_out(@options)
10
10
  redirect_to subscription_path(params[:id])
11
11
  end
12
12
 
13
13
  def subscribe
14
- Mailkick.opt_in(email: @email, user: @user, list: @list)
14
+ Mailkick.opt_in(@options)
15
15
  redirect_to subscription_path(params[:id])
16
16
  end
17
17
 
@@ -25,25 +25,28 @@ module Mailkick
25
25
  # on the unprobabilistic chance user_type is compromised, not much damage
26
26
  @user = user_type.constantize.find(user_id)
27
27
  end
28
- @options = {}
29
- @options[:list] = @list if @list
28
+ @options = {
29
+ email: @email,
30
+ user: @user,
31
+ list: @list
32
+ }
30
33
  rescue ActiveSupport::MessageVerifier::InvalidSignature
31
34
  render text: "Subscription not found", status: :bad_request
32
35
  end
33
36
  end
34
37
 
35
- def opted_out?(options = {})
36
- Mailkick.opted_out?(@options.merge(options))
38
+ def opted_out?
39
+ Mailkick.opted_out?(@options)
37
40
  end
38
41
  helper_method :opted_out?
39
42
 
40
- def subscribe_url(options = {})
41
- subscribe_subscription_path(params[:id], options)
43
+ def subscribe_url
44
+ subscribe_subscription_path(params[:id])
42
45
  end
43
46
  helper_method :subscribe_url
44
47
 
45
- def unsubscribe_url(options = {})
46
- unsubscribe_subscription_path(params[:id], options)
48
+ def unsubscribe_url
49
+ unsubscribe_subscription_path(params[:id])
47
50
  end
48
51
  helper_method :unsubscribe_url
49
52
 
@@ -1,9 +1,9 @@
1
1
  module Mailkick
2
2
  module UrlHelper
3
3
 
4
- def mailkick_unsubscribe_url(options = {})
4
+ def mailkick_unsubscribe_url
5
5
  Mailkick::Engine.routes.url_helpers.url_for(
6
- Rails.application.config.action_mailer.default_url_options.merge(options).merge(
6
+ Rails.application.config.action_mailer.default_url_options.merge(
7
7
  controller: "mailkick/subscriptions",
8
8
  action: "unsubscribe",
9
9
  id: "{{MAILKICK_TOKEN}}"
@@ -1,3 +1,3 @@
1
1
  module Mailkick
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailkick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane