file_pipeline 0.0.8 → 0.0.9

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: d91b7a6c23d1882671966e17afc994e18ccb2d5aa26105d9759e8b37ee393109
4
- data.tar.gz: adeea178ac4e331b837a014b91572b1e498f215f3d81b854b1744dc8738eb113
3
+ metadata.gz: f3f6b6e99dc8156e49b60208f23adb7f3d32a22df01f91bdbb9165f6faebaf5e
4
+ data.tar.gz: 9fe9fb46bb93632d0468228d5cf7ade776ca77ee0e9d5e5a2ee988b695f3b8d5
5
5
  SHA512:
6
- metadata.gz: f5671985f69f7600efd16bbc4ad9ff56c815268deb0ef3f4f76dacc9de56c422a3e8f8a35b1d4c1b52c707144b8287ef64c7b91d773b3d4d6be8c0dd235ffb93
7
- data.tar.gz: ba7d56495aca8c56cce1bea10f27467703f4c1121632ce34de07b6f7e693c3b0648e6b4fb4c7c213d07ff1649c1248c29f6eae971b813c2c78655d766af6387d
6
+ metadata.gz: 891ba99532a1d81bc8af613e02daba79d20e7591cd82461b26230da57293c78101c96a6a9fb57472e41b09b076327c8088c22bd22a4ba2f6d1eded1e017b2ff3
7
+ data.tar.gz: a08cf5f620a820cc2149c2807f9f8bea8177307d9d674d6edbd0817ae8ab8d05a5fad8b51eff6f4d4dc12d164f1892d01ae3d623e3ca610e015807570f8ba14a
@@ -34,7 +34,7 @@ module FilePipeline
34
34
  def operation(*args)
35
35
  src_file, out_file = args
36
36
  image = Vips::Image.new_from_file src_file
37
- image.tiffsave(out_file, options)
37
+ image.tiffsave(out_file, **options)
38
38
  # Return lof if any
39
39
  end
40
40
 
@@ -88,7 +88,7 @@ module FilePipeline
88
88
  #
89
89
  def define_operation(file_operation, options = {})
90
90
  operation = FilePipeline.load file_operation
91
- self << operation.new(options)
91
+ self << operation.new(**options)
92
92
  self
93
93
  end
94
94
 
@@ -85,7 +85,7 @@ module FilePipeline
85
85
  def <<(version_info)
86
86
  file, info = version_info
87
87
  if info&.failure
88
- raise Errors::FailedModificationError, info: info, file: original
88
+ raise Errors::FailedModificationError.new info: info, file: original
89
89
  end
90
90
 
91
91
  version = validate(file)
@@ -229,7 +229,9 @@ module FilePipeline
229
229
  def validate(file)
230
230
  return current unless file
231
231
 
232
- raise Errors::MissingVersionFileError, file: file unless File.exist? file
232
+ unless File.exist? file
233
+ raise Errors::MissingVersionFileError.new file: file
234
+ end
233
235
 
234
236
  return file if File.dirname(file) == directory
235
237
 
data/lib/file_pipeline.rb CHANGED
@@ -23,7 +23,7 @@ module FilePipeline
23
23
  return source_directories if source_directories.include? directory_path
24
24
 
25
25
  no_dir = !File.directory?(directory_path)
26
- raise Errors::SourceDirectoryError, dir: directory if no_dir
26
+ raise Errors::SourceDirectoryError.new dir: directory if no_dir
27
27
 
28
28
  @src_directories.prepend directory_path
29
29
  end
@@ -45,9 +45,10 @@ module FilePipeline
45
45
  src_file += '.rb' unless src_file.end_with? '.rb'
46
46
  src_path = FilePipeline.source_path src_file
47
47
  if src_path.nil?
48
- raise Errors::SourceFileError,
49
- file: src_file,
50
- directories: FilePipeline.source_directories
48
+ raise Errors::SourceFileError.new(
49
+ file: src_file,
50
+ directories: FilePipeline.source_directories
51
+ )
51
52
  end
52
53
  require src_path
53
54
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: file_pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Stein
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-11 00:00:00.000000000 Z
11
+ date: 2020-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_exiftool
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.11.0
19
+ version: 0.12.0
20
20
  type: :runtime
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: 0.11.0
26
+ version: 0.12.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: ruby-vips
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.0.16
33
+ version: 2.0.17
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 2.0.16
40
+ version: 2.0.17
41
41
  description: The file_pipeline gem provides a framework for nondestructive application
42
42
  of file operation batches to files.
43
43
  email: loveablelobster@fastmail.fm
@@ -80,14 +80,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - ">="
82
82
  - !ruby/object:Gem::Version
83
- version: '2.6'
83
+ version: '2.7'
84
84
  required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - ">="
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  requirements: []
90
- rubygems_version: 3.0.6
90
+ rubygems_version: 3.1.2
91
91
  signing_key:
92
92
  specification_version: 4
93
93
  summary: Nondestructive file processing with a defined batch