listen 3.7.1 → 3.8.0

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: 800a9d0af997cb48bc330b0aeaecdcb39b53e9bdeb2dbed6c08fd03b237a3d36
4
- data.tar.gz: 5caa12c52d09e7447d0f1b43fddadf03e4e33ae4c611bd0ed7d367e3cd3a280b
3
+ metadata.gz: c0fcb6d45a23b63f02ec16878ffe9800bc52a32f93fbc5b7e1f03ed647398849
4
+ data.tar.gz: 3d05dea88713a500aca3fb2d8612e7a9a9d6125a9c2573f497fe46482386ad84
5
5
  SHA512:
6
- metadata.gz: 8fa9b8758f30b8ececde07ca321a23fb02c9cfbec59e587011b1598d297f8a0a451728fb394e0bc1fa182e7ef40e4598bfa82b035bdccc29f6375b5df95dda6f
7
- data.tar.gz: 8b94d5ab7085f27382cfca52d32ff8717c3d17f14ed3632a96853e8e4bcd2174bbc8f5f8f0ff3709f739b13c440fb87a82540bb0ae784395896fb0513837895a
6
+ metadata.gz: 81fb2d73327b8d75aff7156f65fc6949d400aef6ef9e6455ee37e0a9d389adb4b010df0565f160001d90da0496887c71bff8f25076c8fa7c37ddb9ce05511fc1
7
+ data.tar.gz: 6e1f35517e6557e46e02e3b985792b0a8aa661470117f648d209917a9eac6987282c57fc30ad6857f702305cf695c16081535fc11f8a434974f068c0bb6aeafe
@@ -16,6 +16,12 @@ module Listen
16
16
  Pathname.new(directory.to_s).realpath
17
17
  end
18
18
 
19
+ @directories.each do |pathname|
20
+ unless pathname.directory?
21
+ fail ArgumentError, "must be a directory: #{pathname}"
22
+ end
23
+ end
24
+
19
25
  @silencer = silencer
20
26
  @queue = queue
21
27
  @adapter_options = adapter_options
data/lib/listen/cli.rb CHANGED
@@ -18,9 +18,9 @@ module Listen
18
18
 
19
19
  class_option :directory,
20
20
  type: :array,
21
- default: '.',
21
+ default: ['.'],
22
22
  aliases: '-d',
23
- banner: 'The directory to listen to'
23
+ banner: 'One or more directories to listen to'
24
24
 
25
25
  class_option :relative,
26
26
  type: :boolean,
@@ -55,7 +55,7 @@ module Listen
55
55
  end
56
56
  end
57
57
 
58
- listener = Listen.to(directory, relative: relative, &callback)
58
+ listener = Listen.to(*directory, relative: relative, &callback)
59
59
 
60
60
  listener.start
61
61
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Listen
4
- VERSION = '3.7.1'
4
+ VERSION = '3.8.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: listen
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.1
4
+ version: 3.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thibaud Guillaume-Gentil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-13 00:00:00.000000000 Z
11
+ date: 2023-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb-fsevent
@@ -103,9 +103,9 @@ metadata:
103
103
  allowed_push_host: https://rubygems.org
104
104
  bug_tracker_uri: https://github.com/guard/listen/issues
105
105
  changelog_uri: https://github.com/guard/listen/releases
106
- documentation_uri: https://www.rubydoc.info/gems/listen/3.7.1
106
+ documentation_uri: https://www.rubydoc.info/gems/listen/3.8.0
107
107
  homepage_uri: https://github.com/guard/listen
108
- source_code_uri: https://github.com/guard/listen/tree/v3.7.1
108
+ source_code_uri: https://github.com/guard/listen/tree/v3.8.0
109
109
  post_install_message:
110
110
  rdoc_options: []
111
111
  require_paths: