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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7a1a402bae88d8b2da45e9042700f5b5c4c47fb96a645859fa81da00dc8314d
4
- data.tar.gz: cb6e164f3ce79f164b1f66e301b723f6b2a71e6dc899520d0f067db6c2645f54
3
+ metadata.gz: 1b8d89cfb704a3c2a42eb8a57b8c461fbe22f1e1f038b7a38909607a669b840f
4
+ data.tar.gz: 1fb1b70fb8f1fff49beb7448fb5a7a0b607869aaa8c951fe8c51e442dfb99322
5
5
  SHA512:
6
- metadata.gz: 84ff673846e38e623eca53cba4d76489cd6d4ebedc2520d5c356689ccb730fa4a89333138d59fec3287036ddd9d82aa9bce3ee8e7776dd8c54cea0f0d0a79a0b
7
- data.tar.gz: c520cbf6f29f77d321280951902bb9cb4827aff680e7d638ea9c78786a46a95001adfd741d750665e3dcfc2f7b96266ed07ea9c8185ec2d131dc9b2e007149ba
6
+ metadata.gz: b45e31ed32a9f19601be142cce9db9554d94d4f5654710134ee05652185da0a4c9739942021fd8f9d07a8866d13caa67a2e59b131d41da456d67248e5893f5de
7
+ data.tar.gz: a1bf9c75bfb98079388fa9000b1a9d9586bf0e0fb744959b72b273ef545a6bdfc09ebbd333d8899ae98b98be2bfc328e3d446c62f0347b2b8b37bc5473bcc818
@@ -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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Schked
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
@@ -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.0
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-09 00:00:00.000000000 Z
11
+ date: 2019-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rufus-scheduler