caffeinate 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/caffeinate/drip.rb +9 -2
- data/lib/caffeinate/dripper/drip_collection.rb +1 -1
- data/lib/caffeinate/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93135cbbdb419e6d7eccd587c9b10447c3c7247cc425ff86057a328b27761baa
|
4
|
+
data.tar.gz: 5b7993dff3ccb1e3e468438c5b50f73f525d2a03418e0ceaaa03f751c097f010
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 504b0123a7628ff97fda131c0ddb55ccc76d1ddc63b9a75afb799170ad3e10bbdc4598860848045eb6ac5976a44575bbb0287bf0bcb33744c29e12c551feb8e0
|
7
|
+
data.tar.gz: 48f9293fdbe4f34ed6a0d46bdfce4278783a8e49fde0c740a5f988572790570209e6e06db559bdfc7acaf0a15ab00718af14e8e43d69d30332b9a8a578d3410b
|
data/lib/caffeinate/drip.rb
CHANGED
@@ -24,10 +24,17 @@ module Caffeinate
|
|
24
24
|
if periodical?
|
25
25
|
start = mailing.instance_exec(&options[:start])
|
26
26
|
start += options[:every] if mailing.caffeinate_campaign_subscription.caffeinate_mailings.count.positive?
|
27
|
-
start.from_now
|
27
|
+
date = start.from_now
|
28
28
|
else
|
29
|
-
options[:delay].from_now
|
29
|
+
date = options[:delay].from_now
|
30
30
|
end
|
31
|
+
|
32
|
+
if options[:at]
|
33
|
+
time = Time.parse(options[:at])
|
34
|
+
return date.change(hour: time.hour, min: time.min, sec: time.sec)
|
35
|
+
end
|
36
|
+
|
37
|
+
date
|
31
38
|
end
|
32
39
|
|
33
40
|
def periodical?
|
@@ -42,7 +42,7 @@ module Caffeinate
|
|
42
42
|
|
43
43
|
def validate_drip_options(action, options)
|
44
44
|
options.symbolize_keys!
|
45
|
-
options.assert_valid_keys(:mailer_class, :step, :delay, :every, :start, :using, :mailer)
|
45
|
+
options.assert_valid_keys(:mailer_class, :step, :delay, :every, :start, :using, :mailer, :at)
|
46
46
|
options[:mailer_class] ||= options[:mailer] || @dripper.defaults[:mailer_class]
|
47
47
|
options[:using] ||= @dripper.defaults[:using]
|
48
48
|
options[:step] ||= @dripper.drips.size + 1
|
data/lib/caffeinate/version.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: 0.
|
4
|
+
version: 0.7.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-12-
|
11
|
+
date: 2020-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|