caffeinate 2.0.4 → 2.1.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 +4 -0
- data/app/controllers/caffeinate/campaign_subscriptions_controller.rb +4 -4
- data/lib/caffeinate/dripper/base.rb +2 -0
- data/lib/caffeinate/dripper/delivery.rb +1 -0
- data/lib/caffeinate/dripper/rescuable.rb +25 -0
- data/lib/caffeinate/version.rb +1 -1
- data/lib/caffeinate.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99e1c4493c6e9c0a024a789e5ee16383afe64fa73b6263ee2482dcace8038703
|
4
|
+
data.tar.gz: 9d49f256a79051ad3264de0444843dd5dc5c4bf8cf74fd77021709728f9dc8b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76f7ed8231cfc694d020edc3432e064bed577aad92fbc7e0bd3e5bed9b9d93a10b3b7d5650fbd72a10911dff29484aa19dfdfa64c2971fb8b47f7d0ef8312402
|
7
|
+
data.tar.gz: 668b441c7fda4930186e9bae3758c8d0d29eac861f0f2079dc3f17602fbefa5e96ec323508679c243f87272153fc89f3066c1fd5931e25fcbd2ff42ef856a6f0
|
data/README.md
CHANGED
@@ -28,6 +28,10 @@ No! Not at all!
|
|
28
28
|
|
29
29
|
There's not a lot of activity here because it's stable and working! I am more than happy to entertain new features.
|
30
30
|
|
31
|
+
## Oh my gosh, a web UI!
|
32
|
+
|
33
|
+
See https://github.com/joshmn/caffeinate-webui for an accompanying lightweight UI for simple administrative tasks and overview.
|
34
|
+
|
31
35
|
## Do you suffer from ActionMailer tragedies?
|
32
36
|
|
33
37
|
If you have _anything_ like this is your codebase, **you need Caffeinate**:
|
@@ -9,21 +9,21 @@ module Caffeinate
|
|
9
9
|
before_action :find_campaign_subscription!
|
10
10
|
|
11
11
|
def unsubscribe
|
12
|
-
@campaign_subscription.unsubscribe!
|
12
|
+
@campaign_subscription.unsubscribe!(true)
|
13
13
|
end
|
14
14
|
|
15
15
|
def subscribe
|
16
|
-
@campaign_subscription.resubscribe!
|
16
|
+
@campaign_subscription.resubscribe!(true)
|
17
17
|
end
|
18
18
|
|
19
19
|
private
|
20
20
|
|
21
21
|
def caffeinate_subscribe_url(**options)
|
22
|
-
Caffeinate::UrlHelpers.caffeinate_subscribe_url(@campaign_subscription, options)
|
22
|
+
Caffeinate::UrlHelpers.caffeinate_subscribe_url(@campaign_subscription, **options)
|
23
23
|
end
|
24
24
|
|
25
25
|
def caffeinate_unsubscribe_url(**options)
|
26
|
-
Caffeinate::UrlHelpers.caffeinate_unsubscribe_url(@campaign_subscription, options)
|
26
|
+
Caffeinate::UrlHelpers.caffeinate_unsubscribe_url(@campaign_subscription, **options)
|
27
27
|
end
|
28
28
|
|
29
29
|
def find_campaign_subscription!
|
@@ -9,6 +9,7 @@ require 'caffeinate/dripper/drip'
|
|
9
9
|
require 'caffeinate/dripper/inferences'
|
10
10
|
require 'caffeinate/dripper/perform'
|
11
11
|
require 'caffeinate/dripper/periodical'
|
12
|
+
require 'caffeinate/dripper/rescuable'
|
12
13
|
require 'caffeinate/dripper/subscriber'
|
13
14
|
|
14
15
|
module Caffeinate
|
@@ -24,6 +25,7 @@ module Caffeinate
|
|
24
25
|
include Inferences
|
25
26
|
include Perform
|
26
27
|
include Periodical
|
28
|
+
include Rescuable
|
27
29
|
include Subscriber
|
28
30
|
end
|
29
31
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Caffeinate
|
4
|
+
module Dripper
|
5
|
+
module Rescuable
|
6
|
+
def self.included(klass)
|
7
|
+
klass.include ::ActiveSupport::Rescuable
|
8
|
+
klass.extend ClassMethods
|
9
|
+
end
|
10
|
+
|
11
|
+
module ClassMethods
|
12
|
+
def deliver!(mailing)
|
13
|
+
begin
|
14
|
+
super
|
15
|
+
rescue Exception => exception
|
16
|
+
if self.rescue_with_handler(exception, object: mailing)
|
17
|
+
return
|
18
|
+
end
|
19
|
+
raise
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/caffeinate/version.rb
CHANGED
data/lib/caffeinate.rb
CHANGED
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: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Brody
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -179,6 +179,7 @@ files:
|
|
179
179
|
- lib/caffeinate/dripper/inferences.rb
|
180
180
|
- lib/caffeinate/dripper/perform.rb
|
181
181
|
- lib/caffeinate/dripper/periodical.rb
|
182
|
+
- lib/caffeinate/dripper/rescuable.rb
|
182
183
|
- lib/caffeinate/dripper/subscriber.rb
|
183
184
|
- lib/caffeinate/dripper_collection.rb
|
184
185
|
- lib/caffeinate/engine.rb
|
@@ -200,7 +201,7 @@ homepage: https://github.com/joshmn/caffeinate
|
|
200
201
|
licenses:
|
201
202
|
- MIT
|
202
203
|
metadata: {}
|
203
|
-
post_install_message:
|
204
|
+
post_install_message:
|
204
205
|
rdoc_options: []
|
205
206
|
require_paths:
|
206
207
|
- lib
|
@@ -216,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
216
217
|
version: '0'
|
217
218
|
requirements: []
|
218
219
|
rubygems_version: 3.1.4
|
219
|
-
signing_key:
|
220
|
+
signing_key:
|
220
221
|
specification_version: 4
|
221
222
|
summary: Create, manage, and send scheduled email sequences and drip campaigns from
|
222
223
|
your Rails app.
|