schked 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/schked/cli.rb +6 -6
- data/lib/schked/version.rb +1 -1
- data/lib/schked/worker.rb +12 -4
- 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: 1b8d89cfb704a3c2a42eb8a57b8c461fbe22f1e1f038b7a38909607a669b840f
|
4
|
+
data.tar.gz: 1fb1b70fb8f1fff49beb7448fb5a7a0b607869aaa8c951fe8c51e442dfb99322
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b45e31ed32a9f19601be142cce9db9554d94d4f5654710134ee05652185da0a4c9739942021fd8f9d07a8866d13caa67a2e59b131d41da456d67248e5893f5de
|
7
|
+
data.tar.gz: a1bf9c75bfb98079388fa9000b1a9d9586bf0e0fb744959b72b273ef545a6bdfc09ebbd333d8899ae98b98be2bfc328e3d446c62f0347b2b8b37bc5473bcc818
|
data/lib/schked/cli.rb
CHANGED
@@ -7,12 +7,12 @@ module Schked
|
|
7
7
|
class CLI < Thor
|
8
8
|
def self.start(argv)
|
9
9
|
if File.exist?(".schked")
|
10
|
-
argv += File
|
11
|
-
read(".schked")
|
12
|
-
split("\n")
|
13
|
-
join(" ")
|
14
|
-
strip
|
15
|
-
shellsplit
|
10
|
+
argv += File
|
11
|
+
.read(".schked")
|
12
|
+
.split("\n")
|
13
|
+
.join(" ")
|
14
|
+
.strip
|
15
|
+
.shellsplit
|
16
16
|
end
|
17
17
|
|
18
18
|
super(argv)
|
data/lib/schked/version.rb
CHANGED
data/lib/schked/worker.rb
CHANGED
@@ -13,6 +13,14 @@ module Schked
|
|
13
13
|
load_schedule
|
14
14
|
end
|
15
15
|
|
16
|
+
def job(as)
|
17
|
+
scheduler.jobs.find { |job| job.opts[:as] == as }
|
18
|
+
end
|
19
|
+
|
20
|
+
def pause
|
21
|
+
scheduler.pause
|
22
|
+
end
|
23
|
+
|
16
24
|
def wait
|
17
25
|
scheduler.join
|
18
26
|
end
|
@@ -22,10 +30,10 @@ module Schked
|
|
22
30
|
end
|
23
31
|
|
24
32
|
def schedule
|
25
|
-
config
|
26
|
-
paths
|
27
|
-
map { |path| File.read(path) }
|
28
|
-
join("\n")
|
33
|
+
config
|
34
|
+
.paths
|
35
|
+
.map { |path| File.read(path) }
|
36
|
+
.join("\n")
|
29
37
|
end
|
30
38
|
|
31
39
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schked
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bibendi@evilmartians.com
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01
|
11
|
+
date: 2019-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rufus-scheduler
|