chores_kit 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/chores_kit/chore.rb +9 -1
- data/lib/chores_kit/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: 57e00f3e3593a294b34065a8b782ce8b372b731c2144f1bde908b6b09045dcb7
|
4
|
+
data.tar.gz: 23f17d66edd7779450dbcc775bc62690efde2ae323b4f8ad5bca317e59cd72c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a0b9107cb1cbc7ef7027d2ab85c5f7f3903c7050267b471e790a2e263ba3ebfa528ca83c6be9de5fb72f750b136021cd6f1bd723263a35af72723d1c4dc15d7
|
7
|
+
data.tar.gz: 1aaca6ff7a5a524af95fe57298130f520362d40cab85f7db08e6206cd9d00f712e03ffb8bd6afb40e1e789953c2cef096b6b624c6d1feef92a2eb31b0667418a
|
data/Gemfile.lock
CHANGED
data/lib/chores_kit/chore.rb
CHANGED
@@ -53,6 +53,9 @@ module ChoresKit
|
|
53
53
|
def task(options, &block)
|
54
54
|
name, params = *options
|
55
55
|
|
56
|
+
raise "Couldn't create task without a name" if name.nil?
|
57
|
+
raise "Couldn't create task without a block" unless block_given?
|
58
|
+
|
56
59
|
@dag.add_vertex(task: Task.new(name, params, &block))
|
57
60
|
end
|
58
61
|
|
@@ -62,7 +65,12 @@ module ChoresKit
|
|
62
65
|
end
|
63
66
|
|
64
67
|
# After-run callbacks
|
65
|
-
def notify(
|
68
|
+
def notify(*options, &block)
|
69
|
+
raise "Couldn't create notifications without a block" unless block_given?
|
70
|
+
|
71
|
+
conditions = *options
|
72
|
+
conditions = DEFAULT_NOTIFICATIONS if options.empty?
|
73
|
+
|
66
74
|
conditions.each do |condition|
|
67
75
|
notification = Notification.new(condition)
|
68
76
|
notification.instance_eval(&block)
|
data/lib/chores_kit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chores_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lennard Timm
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: as-duration
|