fde-file_crawler 0.3.0 → 0.4.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
  SHA1:
3
- metadata.gz: 0d0f14417036814ba9682befc46803b8384cad24
4
- data.tar.gz: f7bf404dbfd33354c7ec07952df1143c774a4f71
3
+ metadata.gz: 5d9cad7a83dda45d54a0f93efeee3db31bf5a496
4
+ data.tar.gz: d61f8ef46a15fb533e04fd64325d6119d0a56cd0
5
5
  SHA512:
6
- metadata.gz: 54f62fc76a26fbe25cb37ce9abc839c3ef0e56208398d17db884c2e9e82da6f3868f4bd5c708e5472fd0684666a5ae88df380855053a3c9a7aeb32fdb0d1c968
7
- data.tar.gz: 6f1fb1f3d5b61e9cae0a6ebac4c372b96f7bf4ce839ff50bb93a4e69cd8b44bf2a600333abcdd1f90e3c2d43cfd3d3557d82fc3e785fd8466cf906bb03542e0b
6
+ metadata.gz: 59c8fd3d371a66bd6e7bb9ee82a936475f158e2197c99d93aec2c26c66c6b317e8f861193f587ced29ab9d4f7a8d925ba0556593bfba760ecd25ecf819bb502e
7
+ data.tar.gz: f2868a3535a93364fa2e57794e0804f0fc7c31d9ac28f47b69a6bb66764d76526da06a5268d61d41a9f5eb7c0e780a9294ccf8d72d243037f6938c18d84ddae3
data/.gitignore CHANGED
@@ -12,3 +12,5 @@
12
12
  .rspec_status
13
13
 
14
14
  *.gem
15
+
16
+ .DS_Store
@@ -1,5 +1,5 @@
1
1
  module FDE
2
2
  module FileCrawler
3
- VERSION = "0.3.0"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
@@ -18,9 +18,13 @@ module FDE
18
18
 
19
19
  def self.watch(query = nil, &block)
20
20
  unless query.nil?
21
- yield self.crawl(query)
21
+ self.crawl(query).each do |file|
22
+ yield file
23
+ end
22
24
  else
23
- yield self.crawl
25
+ self.crawl.each do |file|
26
+ yield file
27
+ end
24
28
  end
25
29
  end
26
30
 
@@ -28,7 +32,8 @@ module FDE
28
32
  path = self.config.path_in_directory
29
33
  files = Dir.entries(path)
30
34
  files -= %w[. ..]
31
- files.select { |file| query.match(file) }
35
+ files.select! { |file| query.match(file) }
36
+ files
32
37
  end
33
38
 
34
39
  def self.copy(file, target = nil)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fde-file_crawler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Langenegger
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-14 00:00:00.000000000 Z
11
+ date: 2017-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler