dirwatch 0.0.4 → 0.0.5

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: 815a8901f1ff180b5b34c2b4997e4ea4d1fdb18e
4
- data.tar.gz: bc0306dd706bd690388c65e05e65f4776bea69ea
3
+ metadata.gz: f14d579346fda1ee2da50afb3ad9dcd9911f7c69
4
+ data.tar.gz: f4ae3791e9097b4bd78a6406b255f0d43b760b17
5
5
  SHA512:
6
- metadata.gz: db9a96ae01fc7099939f8005f7a3a66b7d0e1b6ee4df31178921bbf34201867b55ec554ab2963ee271c000106166957d70e138c4e53a1a4a7dea08e238a6b64d
7
- data.tar.gz: 456f2b578c05b11c35ca383a4d67a8322985456bc4b986de596543304b55538b3ff2ee146670cfe4d994fb86eb04d4da9075af41133c6beec97a6b9a0ea6c63b
6
+ metadata.gz: bdb7c3585a99ae454502bbc4180a9191deebc7568e797d18cf2fcfe31a71ac00714f67dd4cd4fb821ead079d21a8cfe12a129a6b29d72ed5212a996835aeb825
7
+ data.tar.gz: 6ad86b0f9621389a248d2ea8aa2d4c57a4a34e42ced3da18319f47245baf7803bfe9bb81f6d2fb1d73dde7845feaa6a240b5c81eb62fc6799cd262d3d111d508
@@ -21,7 +21,7 @@ module Dirwatch
21
21
  begin
22
22
  watcher.wait_for_stop
23
23
  rescue Interrupt
24
- raise
24
+ exit
25
25
  ensure
26
26
  stop_watcher watcher
27
27
  end
@@ -72,7 +72,7 @@ module Dirwatch
72
72
  end
73
73
 
74
74
  class WatchParser < Parser
75
- @command_name = "#{Parser::COMMAND_NAME} [options] [directory]"
75
+ @command_name = "#{Parser::COMMAND_NAME} [options] [directory|file]"
76
76
  @action = :watch
77
77
  class << self
78
78
  attr_reader :command_name, :action
@@ -4,7 +4,12 @@ require_relative 'symbolize_extensions'
4
4
  module Dirwatch
5
5
  class Settings
6
6
  def self.from_options options
7
- Settings.from_file(File.join(options.directory, '.dirwatch.yml'), options)
7
+ file = if File.file? options.directory
8
+ options.directory
9
+ else
10
+ File.join(options.directory, '.dirwatch.yml')
11
+ end
12
+ Settings.from_file(file, options)
8
13
  end
9
14
 
10
15
  def self.from_file filename, options
@@ -1,3 +1,3 @@
1
1
  module Dirwatch
2
- VERSION = Gem::Version.new '0.0.4'
2
+ VERSION = Gem::Version.new '0.0.5'
3
3
  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.4
4
+ version: 0.0.5
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-22 00:00:00.000000000 Z
11
+ date: 2017-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec