dirwatch 0.0.3 → 0.0.4

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
  SHA1:
3
- metadata.gz: 40bd06bc200bd057ef3ad48503cf7e19dd1aafd7
4
- data.tar.gz: b10dbed6c03ab779e4de93276f4ddee3337bd739
3
+ metadata.gz: 815a8901f1ff180b5b34c2b4997e4ea4d1fdb18e
4
+ data.tar.gz: bc0306dd706bd690388c65e05e65f4776bea69ea
5
5
  SHA512:
6
- metadata.gz: 665a9235f6b0de9be2d56b0740a885aff19364b94a0a63358ffa8a10efa11bf03375fd71a8b5865ab11ebd1881c750d028772d644d78859bdb05cf393c0b53bc
7
- data.tar.gz: 90ce98ba02e520816b81af23e80ca09312ca9ef80ad7188252b4c0ee03c42569f4a82fe8e2b2742e338fe4b6fe5301fc4e13a00094bbe4b7ed5532d64d0d7b7c
6
+ metadata.gz: db9a96ae01fc7099939f8005f7a3a66b7d0e1b6ee4df31178921bbf34201867b55ec554ab2963ee271c000106166957d70e138c4e53a1a4a7dea08e238a6b64d
7
+ data.tar.gz: 456f2b578c05b11c35ca383a4d67a8322985456bc4b986de596543304b55538b3ff2ee146670cfe4d994fb86eb04d4da9075af41133c6beec97a6b9a0ea6c63b
@@ -92,6 +92,10 @@ module Dirwatch
92
92
  options.daemonize = daemonize
93
93
  end
94
94
 
95
+ opts.on '--once', 'Run the programm only once' do |once|
96
+ options.once = once
97
+ end
98
+
95
99
  opts.on '--version', 'Show the version' do
96
100
  require 'dirwatch/version'
97
101
  puts "dirwatch #{Dirwatch::VERSION}"
@@ -40,6 +40,7 @@ module Dirwatch
40
40
  {
41
41
  directory: options.fetch(:directory, './'),
42
42
  daemonize: options.fetch(:daemonize, false),
43
+ once: options.fetch(:once, false),
43
44
  verbose: options.fetch(:verbose, false),
44
45
  }
45
46
  end
@@ -1,3 +1,3 @@
1
1
  module Dirwatch
2
- VERSION = Gem::Version.new '0.0.3'
2
+ VERSION = Gem::Version.new '0.0.4'
3
3
  end
@@ -55,7 +55,7 @@ module Dirwatch
55
55
  ws.exec_scripts options.verbose
56
56
  end
57
57
 
58
- break if @stop
58
+ break if @stop || options.once
59
59
  sleep interval
60
60
  end
61
61
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dirwatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Ganz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-21 00:00:00.000000000 Z
11
+ date: 2017-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec