multi_exiftool 0.16.0 → 0.17.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
  SHA256:
3
- metadata.gz: 43d4f9d91d7d4c6321b5e9698e3aaecc38fd1044e140110f5e4ff22fdf15ee96
4
- data.tar.gz: a9ff99dd7943f29ce6219f75a3dad31ce06c3e4abf458e50aa6c9e8903660022
3
+ metadata.gz: 2053e8c04690c5e8d32f19dd323c2cfbd73719ca0b4046dfa2ab5f6a460a29ef
4
+ data.tar.gz: be1df1fd8128b1907c40673c80edec623e3c95639be8938cb01bf3db1474133e
5
5
  SHA512:
6
- metadata.gz: 648a9ba62793a9c0215c06cc701935bd123612d7491be111e0e96398e9f2bcc42399f2bf42591ce70c2722579e04d113394832c337ca04674036c2b93f014f2b
7
- data.tar.gz: 17d5d839ba13f1a07f2ec586c78b68bb950e54f2e6f67f2288fcdb01dda5f5ff341db462b8d103fa510eb5eb190080cf883c8d85de16fdcda89aee994414cd4a
6
+ metadata.gz: afa561c8c911fa20bd98501e54bc95c958a9f29b4753fce76942865622e7c6f6a7c599c06da654d328f769893fbd3205b335359fc1e01695f1a8c9d7f53a62c3
7
+ data.tar.gz: b3ab0b48315d92dcea8f13aa5eb48c1b4e512df92622cf3857747c44c0dbb46dde1b582fb2133e583bc0fe81daeef3ba8b326c5250ef342b01f46bc88cfe846f
data/Changelog CHANGED
@@ -1,3 +1,7 @@
1
+ 0.17.0
2
+ In case of an invalid timestamp value return the unconverted string value of
3
+ that tag.
4
+
1
5
  0.16.0
2
6
  Add option to use config files.
3
7
 
@@ -55,7 +55,11 @@ module MultiExiftool
55
55
  second = $6.to_f
56
56
  zone = $7
57
57
  zone = '+00:00' if zone == 'Z'
58
- Time.new(year, month, day, hour, minute, second, zone)
58
+ begin
59
+ Time.new(year, month, day, hour, minute, second, zone)
60
+ rescue ArgumentError
61
+ val
62
+ end
59
63
  when REGEXP_RATIONAL
60
64
  return val if $2.to_i == 0
61
65
  Rational($1, $2)
@@ -8,7 +8,7 @@ require_relative 'multi_exiftool/batch'
8
8
 
9
9
  module MultiExiftool
10
10
 
11
- VERSION = '0.16.0'
11
+ VERSION = '0.17.0'
12
12
 
13
13
  @exiftool_command = 'exiftool'
14
14
 
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: multi_exiftool 0.16.0 ruby lib
2
+ # stub: multi_exiftool 0.17.0 ruby lib
3
3
  #
4
4
  # This file is automatically generated by rim.
5
5
  # PLEASE DO NOT EDIT IT DIRECTLY!
@@ -7,12 +7,12 @@
7
7
 
8
8
  Gem::Specification.new do |s|
9
9
  s.name = "multi_exiftool"
10
- s.version = "0.16.0"
10
+ s.version = "0.17.0"
11
11
 
12
12
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
13
13
  s.require_paths = ["lib"]
14
14
  s.authors = ["Jan Friedrich"]
15
- s.date = "2020-10-27"
15
+ s.date = "2022-02-08"
16
16
  s.description = "This library is a wrapper for the ExifTool command-line application (https://exiftool.org) written by Phil Harvey. It is designed for dealing with multiple files at once by creating commands to call exiftool with various arguments, call it and parsing the results."
17
17
  s.email = "janfri26@gmail.com"
18
18
  s.files = ["./.aspell.pws", "Changelog", "Gemfile", "LICENSE", "README.md", "Rakefile", "lib/multi_exiftool", "lib/multi_exiftool.rb", "lib/multi_exiftool/batch.rb", "lib/multi_exiftool/executable.rb", "lib/multi_exiftool/reader.rb", "lib/multi_exiftool/values.rb", "lib/multi_exiftool/writer.rb", "multi_exiftool.gemspec", "regtest/read_all_tags.rb", "regtest/read_all_tags.yml", "regtest/test.jpg", "test/data", "test/data/a.jpg", "test/data/b.jpg", "test/data/c.jpg", "test/data/example.config", "test/helper.rb", "test/test_batch.rb", "test/test_executable.rb", "test/test_exiftool_stuff.rb", "test/test_functional_api.rb", "test/test_reader.rb", "test/test_values.rb", "test/test_values_using_groups.rb", "test/test_writer.rb", "test/test_writer_groups.rb"]
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.post_install_message = "\n+-----------------------------------------------------------------------+\n| Please ensure you have installed exiftool version 7.65 or higher and |\n| it's found in your PATH (Try \"exiftool -ver\" on your commandline). |\n| For more details see |\n| https://exiftool.org/install.html |\n+-----------------------------------------------------------------------+\n "
22
22
  s.required_ruby_version = Gem::Requirement.new(">= 1.9.1")
23
23
  s.requirements = ["exiftool, version 7.65 or higher"]
24
- s.rubygems_version = "3.1.2"
24
+ s.rubygems_version = "3.2.15"
25
25
  s.summary = "This library is a wrapper for the ExifTool command-line application (https://exiftool.org)."
26
26
 
27
27
  if s.respond_to? :specification_version then
@@ -167,7 +167,7 @@
167
167
  # specified, then at least one of the Desire'd tags must exist. See
168
168
  # the Composite table in Image::ExifTool::Exif for more examples,
169
169
  # and lib/Image/ExifTool/README for all of the details.
170
- BaseName => {
170
+ MyBaseName => {
171
171
  Require => {
172
172
  0 => 'FileName',
173
173
  },
@@ -62,12 +62,12 @@ class TestFunctionalApi < Test::Unit::TestCase
62
62
 
63
63
  test 'successful reading with user defined tags in config file' do
64
64
  run_in_temp_dir do
65
- values, errors = MultiExiftool.read(%w[a.jpg b.jpg c.jpg], tags: %w[basename fileextension])
66
- assert_equal [nil, nil, nil], values.map(&:basename)
65
+ values, errors = MultiExiftool.read(%w[a.jpg b.jpg c.jpg], tags: %w[mybasename fileextension])
66
+ assert_equal [nil, nil, nil], values.map(&:mybasename)
67
67
  assert_equal [nil, nil, nil], values.map(&:file_extension)
68
68
  assert_equal [], errors
69
- values, errors = MultiExiftool.read(%w[a.jpg b.jpg c.jpg], config: 'example.config', tags: %w[basename fileextension])
70
- assert_equal %w[a b c], values.map(&:basename)
69
+ values, errors = MultiExiftool.read(%w[a.jpg b.jpg c.jpg], config: 'example.config', tags: %w[mybasename fileextension])
70
+ assert_equal %w[a b c], values.map(&:mybasename)
71
71
  assert_equal %w[jpg]*3, values.map(&:file_extension)
72
72
  assert_equal [], errors
73
73
  end
data/test/test_reader.rb CHANGED
@@ -160,13 +160,13 @@ class TestReader < Test::Unit::TestCase
160
160
  test 'successful reading with user defined tags in config file' do
161
161
  run_in_temp_dir do
162
162
  @reader.filenames = %w(a.jpg b.jpg c.jpg)
163
- @reader.tags = %w[basename]
163
+ @reader.tags = %w[mybasename]
164
164
  res = @reader.read
165
- assert_equal [nil, nil, nil], res.map(&:basename)
165
+ assert_equal [nil, nil, nil], res.map(&:mybasename)
166
166
  assert_equal [], @reader.errors
167
167
  @reader.config = 'example.config'
168
168
  res = @reader.read
169
- assert_equal %w[a b c], res.map(&:basename)
169
+ assert_equal %w[a b c], res.map(&:mybasename)
170
170
  assert_equal [], @reader.errors
171
171
  end
172
172
  end
data/test/test_values.rb CHANGED
@@ -120,6 +120,12 @@ class TestValues < Test::Unit::TestCase
120
120
  assert_nil values['TimeWithOnlyZeros']
121
121
  end
122
122
 
123
+ test 'timestamp with invalid data' do
124
+ ts = '2022:25:01 16:25'
125
+ values = MultiExiftool::Values.new('InvalidTimestamp' => ts)
126
+ assert_equal ts, values['InvalidTimestamp']
127
+ end
128
+
123
129
  test 'rational with denominator zero' do
124
130
  values = MultiExiftool::Values.new('DenominatorZero' => '1/0')
125
131
  assert_equal '1/0', values['DenominatorZero']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multi_exiftool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Friedrich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-27 00:00:00.000000000 Z
11
+ date: 2022-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  version: '0'
145
145
  requirements:
146
146
  - exiftool, version 7.65 or higher
147
- rubygems_version: 3.1.2
147
+ rubygems_version: 3.2.15
148
148
  signing_key:
149
149
  specification_version: 4
150
150
  summary: This library is a wrapper for the ExifTool command-line application (https://exiftool.org).