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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 5d9cad7a83dda45d54a0f93efeee3db31bf5a496
4
- data.tar.gz: d61f8ef46a15fb533e04fd64325d6119d0a56cd0
2
+ SHA256:
3
+ metadata.gz: 4ca879af56ef73268dbf037737e56637e05ce15ca15bcbae7ade71752f5284e1
4
+ data.tar.gz: f4c0d4ed272c48d47e6bb177ee9596f7d68bada435c26669fa935da2e0498030
5
5
  SHA512:
6
- metadata.gz: 59c8fd3d371a66bd6e7bb9ee82a936475f158e2197c99d93aec2c26c66c6b317e8f861193f587ced29ab9d4f7a8d925ba0556593bfba760ecd25ecf819bb502e
7
- data.tar.gz: f2868a3535a93364fa2e57794e0804f0fc7c31d9ac28f47b69a6bb66764d76526da06a5268d61d41a9f5eb7c0e780a9294ccf8d72d243037f6938c18d84ddae3
6
+ metadata.gz: 0420e77745e23c5103d2a45c8c7f3f4ee014b4862b1bd49e1c31cf92ed49d7ee4ac70d9810e1d4bc7241125cf5f7e4feca2067f9f79310b65141f9e65b011220
7
+ data.tar.gz: 618ed172fdc745608faff7e57cb33997938692bd0efe605a357d9c8112ee004f9d7be5a512a2cc26ff31c5221835572e36542c02ab688d9d74c635fbcada82d3
data/.gitignore CHANGED
@@ -12,5 +12,3 @@
12
12
  .rspec_status
13
13
 
14
14
  *.gem
15
-
16
- .DS_Store
@@ -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.15"
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"
@@ -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).each do |file|
22
- yield file
23
- end
24
+ yield self.crawl(query)
24
25
  else
25
- self.crawl.each do |file|
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! { |file| query.match(file) }
36
- files
34
+ files.select { |file| query.match(file) }
37
35
  end
38
36
 
39
37
  def self.copy(file, target = nil)
@@ -1,5 +1,5 @@
1
1
  module FDE
2
2
  module FileCrawler
3
- VERSION = "0.4.0"
3
+ VERSION = "0.5.0"
4
4
  end
5
5
  end
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.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: 2017-09-24 00:00:00.000000000 Z
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.15'
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.15'
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
- rubyforge_project:
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