fde-file_crawler 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +0 -2
- data/fde-file_crawler.gemspec +1 -1
- data/lib/fde/file_crawler.rb +6 -8
- data/lib/fde/file_crawler/version.rb +1 -1
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4ca879af56ef73268dbf037737e56637e05ce15ca15bcbae7ade71752f5284e1
|
4
|
+
data.tar.gz: f4c0d4ed272c48d47e6bb177ee9596f7d68bada435c26669fa935da2e0498030
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0420e77745e23c5103d2a45c8c7f3f4ee014b4862b1bd49e1c31cf92ed49d7ee4ac70d9810e1d4bc7241125cf5f7e4feca2067f9f79310b65141f9e65b011220
|
7
|
+
data.tar.gz: 618ed172fdc745608faff7e57cb33997938692bd0efe605a357d9c8112ee004f9d7be5a512a2cc26ff31c5221835572e36542c02ab688d9d74c635fbcada82d3
|
data/fde-file_crawler.gemspec
CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
31
|
spec.require_paths = ["lib"]
|
32
32
|
|
33
|
-
spec.add_development_dependency "bundler", "~> 1
|
33
|
+
spec.add_development_dependency "bundler", "~> 2.1"
|
34
34
|
spec.add_development_dependency "rake", "~> 10.0"
|
35
35
|
spec.add_development_dependency "rspec", "~> 3.0"
|
36
36
|
spec.add_development_dependency "pry", "~> 0.10"
|
data/lib/fde/file_crawler.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'fde/file_crawler/version'
|
2
2
|
|
3
3
|
module FDE
|
4
|
+
|
4
5
|
module FileCrawler
|
5
6
|
class NoCopyTargetDefined < StandardError; end
|
6
7
|
|
@@ -8,6 +9,7 @@ module FDE
|
|
8
9
|
attr_accessor :path_in_directory, :path_out_directory
|
9
10
|
end
|
10
11
|
|
12
|
+
|
11
13
|
def self.config
|
12
14
|
@@config ||= Config.new
|
13
15
|
end
|
@@ -16,15 +18,12 @@ module FDE
|
|
16
18
|
yield self.config
|
17
19
|
end
|
18
20
|
|
21
|
+
# TODO: remove conditional
|
19
22
|
def self.watch(query = nil, &block)
|
20
23
|
unless query.nil?
|
21
|
-
self.crawl(query)
|
22
|
-
yield file
|
23
|
-
end
|
24
|
+
yield self.crawl(query)
|
24
25
|
else
|
25
|
-
self.crawl
|
26
|
-
yield file
|
27
|
-
end
|
26
|
+
yield self.crawl
|
28
27
|
end
|
29
28
|
end
|
30
29
|
|
@@ -32,8 +31,7 @@ module FDE
|
|
32
31
|
path = self.config.path_in_directory
|
33
32
|
files = Dir.entries(path)
|
34
33
|
files -= %w[. ..]
|
35
|
-
files.select
|
36
|
-
files
|
34
|
+
files.select { |file| query.match(file) }
|
37
35
|
end
|
38
36
|
|
39
37
|
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.5.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:
|
11
|
+
date: 2020-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1
|
19
|
+
version: '2.1'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1
|
26
|
+
version: '2.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,8 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
134
|
- !ruby/object:Gem::Version
|
135
135
|
version: '0'
|
136
136
|
requirements: []
|
137
|
-
|
138
|
-
rubygems_version: 2.6.8
|
137
|
+
rubygems_version: 3.0.3
|
139
138
|
signing_key:
|
140
139
|
specification_version: 4
|
141
140
|
summary: A simple file crawler for the fashion data exchange
|