caffeinate 0.1.4 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +58 -43
- data/app/controllers/caffeinate/campaign_subscriptions_controller.rb +17 -2
- data/app/models/caffeinate/campaign.rb +40 -1
- data/app/models/caffeinate/campaign_subscription.rb +52 -11
- data/app/models/caffeinate/mailing.rb +26 -3
- data/app/views/caffeinate/campaign_subscriptions/subscribe.html.erb +3 -0
- data/app/views/caffeinate/campaign_subscriptions/unsubscribe.html.erb +3 -0
- data/app/views/layouts/_caffeinate.html.erb +11 -0
- data/config/locales/en.yml +6 -0
- data/db/migrate/20201124183102_create_caffeinate_campaigns.rb +1 -0
- data/db/migrate/20201124183303_create_caffeinate_campaign_subscriptions.rb +3 -0
- data/db/migrate/20201124183419_create_caffeinate_mailings.rb +4 -1
- data/lib/caffeinate.rb +2 -0
- data/lib/caffeinate/action_mailer.rb +4 -4
- data/lib/caffeinate/action_mailer/extension.rb +17 -1
- data/lib/caffeinate/action_mailer/interceptor.rb +4 -2
- data/lib/caffeinate/action_mailer/observer.rb +5 -4
- data/lib/caffeinate/active_record/extension.rb +3 -2
- data/lib/caffeinate/configuration.rb +4 -1
- data/lib/caffeinate/drip.rb +22 -35
- data/lib/caffeinate/drip_evaluator.rb +35 -0
- data/lib/caffeinate/dripper/base.rb +13 -14
- data/lib/caffeinate/dripper/batching.rb +22 -0
- data/lib/caffeinate/dripper/callbacks.rb +74 -6
- data/lib/caffeinate/dripper/campaign.rb +8 -9
- data/lib/caffeinate/dripper/defaults.rb +4 -2
- data/lib/caffeinate/dripper/delivery.rb +8 -8
- data/lib/caffeinate/dripper/drip.rb +46 -16
- data/lib/caffeinate/dripper/inferences.rb +29 -0
- data/lib/caffeinate/dripper/perform.rb +16 -5
- data/lib/caffeinate/dripper/periodical.rb +24 -0
- data/lib/caffeinate/engine.rb +12 -9
- data/lib/caffeinate/helpers.rb +24 -0
- data/lib/caffeinate/mail_ext.rb +12 -0
- data/lib/caffeinate/url_helpers.rb +10 -0
- data/lib/caffeinate/version.rb +1 -1
- data/lib/generators/caffeinate/install_generator.rb +5 -1
- data/lib/generators/caffeinate/templates/caffeinate.rb +11 -1
- metadata +13 -5
- data/app/views/layouts/caffeinate/application.html.erb +0 -15
- data/app/views/layouts/caffeinate/campaign_subscriptions/unsubscribe.html.erb +0 -1
- data/lib/caffeinate/action_mailer/helpers.rb +0 -12
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caffeinate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Brody
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -124,8 +124,10 @@ files:
|
|
124
124
|
- app/models/caffeinate/campaign.rb
|
125
125
|
- app/models/caffeinate/campaign_subscription.rb
|
126
126
|
- app/models/caffeinate/mailing.rb
|
127
|
-
- app/views/
|
128
|
-
- app/views/
|
127
|
+
- app/views/caffeinate/campaign_subscriptions/subscribe.html.erb
|
128
|
+
- app/views/caffeinate/campaign_subscriptions/unsubscribe.html.erb
|
129
|
+
- app/views/layouts/_caffeinate.html.erb
|
130
|
+
- config/locales/en.yml
|
129
131
|
- config/routes.rb
|
130
132
|
- db/migrate/20201124183102_create_caffeinate_campaigns.rb
|
131
133
|
- db/migrate/20201124183303_create_caffeinate_campaign_subscriptions.rb
|
@@ -133,22 +135,28 @@ files:
|
|
133
135
|
- lib/caffeinate.rb
|
134
136
|
- lib/caffeinate/action_mailer.rb
|
135
137
|
- lib/caffeinate/action_mailer/extension.rb
|
136
|
-
- lib/caffeinate/action_mailer/helpers.rb
|
137
138
|
- lib/caffeinate/action_mailer/interceptor.rb
|
138
139
|
- lib/caffeinate/action_mailer/observer.rb
|
139
140
|
- lib/caffeinate/active_record/extension.rb
|
140
141
|
- lib/caffeinate/configuration.rb
|
141
142
|
- lib/caffeinate/deliver_async.rb
|
142
143
|
- lib/caffeinate/drip.rb
|
144
|
+
- lib/caffeinate/drip_evaluator.rb
|
143
145
|
- lib/caffeinate/dripper/base.rb
|
146
|
+
- lib/caffeinate/dripper/batching.rb
|
144
147
|
- lib/caffeinate/dripper/callbacks.rb
|
145
148
|
- lib/caffeinate/dripper/campaign.rb
|
146
149
|
- lib/caffeinate/dripper/defaults.rb
|
147
150
|
- lib/caffeinate/dripper/delivery.rb
|
148
151
|
- lib/caffeinate/dripper/drip.rb
|
152
|
+
- lib/caffeinate/dripper/inferences.rb
|
149
153
|
- lib/caffeinate/dripper/perform.rb
|
154
|
+
- lib/caffeinate/dripper/periodical.rb
|
150
155
|
- lib/caffeinate/dripper/subscriber.rb
|
151
156
|
- lib/caffeinate/engine.rb
|
157
|
+
- lib/caffeinate/helpers.rb
|
158
|
+
- lib/caffeinate/mail_ext.rb
|
159
|
+
- lib/caffeinate/url_helpers.rb
|
152
160
|
- lib/caffeinate/version.rb
|
153
161
|
- lib/generators/caffeinate/install_generator.rb
|
154
162
|
- lib/generators/caffeinate/templates/application_dripper.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
<h5>You have been unsubscribed.</h5>
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Caffeinate
|
4
|
-
module ActionMailer
|
5
|
-
module Helpers
|
6
|
-
def caffeinate_unsubscribe_url(caffeinate_campaign_subscription, **options)
|
7
|
-
opts = (::ActionMailer::Base.default_url_options || {}).merge(options)
|
8
|
-
Caffeinate::Engine.routes.url_helpers.caffeinate_unsubscribe_url(token: caffeinate_campaign_subscription.token, **opts)
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|