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 +4 -4
- data/.gitignore +2 -0
- data/lib/fde/file_crawler/version.rb +1 -1
- data/lib/fde/file_crawler.rb +8 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d9cad7a83dda45d54a0f93efeee3db31bf5a496
|
4
|
+
data.tar.gz: d61f8ef46a15fb533e04fd64325d6119d0a56cd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59c8fd3d371a66bd6e7bb9ee82a936475f158e2197c99d93aec2c26c66c6b317e8f861193f587ced29ab9d4f7a8d925ba0556593bfba760ecd25ecf819bb502e
|
7
|
+
data.tar.gz: f2868a3535a93364fa2e57794e0804f0fc7c31d9ac28f47b69a6bb66764d76526da06a5268d61d41a9f5eb7c0e780a9294ccf8d72d243037f6938c18d84ddae3
|
data/lib/fde/file_crawler.rb
CHANGED
@@ -18,9 +18,13 @@ module FDE
|
|
18
18
|
|
19
19
|
def self.watch(query = nil, &block)
|
20
20
|
unless query.nil?
|
21
|
-
|
21
|
+
self.crawl(query).each do |file|
|
22
|
+
yield file
|
23
|
+
end
|
22
24
|
else
|
23
|
-
|
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.
|
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-
|
11
|
+
date: 2017-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|