mini_exiftool 2.4.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 945fdce2c08a3ae7c09603eb14156ccc853ad8c8
4
- data.tar.gz: 29a87004f5057d4b647a17a0818c02d98700b92f
3
+ metadata.gz: 4f207a729994bb4e72cb5957037646c49a35a09f
4
+ data.tar.gz: 020d0c56fd4ff0287ac289abd877f86d28d9719a
5
5
  SHA512:
6
- metadata.gz: 468bd686cc92722e3b516e046681a8ae1854a68ea9089beaa4cbdd51aa2eddcb120e8f3776d3ab66db6f0ca1105f6a36aabc5dd83f13594e3d453b1057e5cf20
7
- data.tar.gz: 9400b0fdfc174246734c2071e4e76a9f0253215c70c4d89eb317327fe1f9f65af34e8e97f54c8d8518ad3c4f7927888024590aa54837f7184026d1a9289f008a
6
+ metadata.gz: 34de6483132b8ed9847799b7b6fdf85d49c3590322366a89eb5a5af890c4c063e681297e962bac6b73f57ec8a685fc87199e701fe6833cd3513436d1db678100
7
+ data.tar.gz: 0d19ac96d865f72e9edfee75a787a8d9487afb6f8580b94ca3b9af18f1f22d589aa99fcc69b05f6e83723cb87037857400988acd79109843e7bffc4dfb7f9526
data/Changelog CHANGED
@@ -1,3 +1,8 @@
1
+ 2.4.1
2
+ - Handling tag values of the form x/0 correct.
3
+ Thanks to Picturelife for a clever solution to solve this.
4
+ - Some internal housekeeping.
5
+
1
6
  2.4.0
2
7
  - New method MiniExiftool#copy_tags_from.
3
8
  Many thanks to cgat for the hint and implementing a first
@@ -61,7 +61,7 @@ feel free to contribute!
61
61
  Jan Friedrich <janfri26@gmail.com>
62
62
 
63
63
  == Copyright / License
64
- Copyright (c) 2007-2013 by Jan Friedrich
64
+ Copyright (c) 2007-2014 by Jan Friedrich
65
65
 
66
66
  Licensed under terms of the GNU LESSER GENERAL PUBLIC LICENSE, Version 2.1,
67
67
  February 1999 (see file COPYING for more details)
@@ -25,7 +25,7 @@ require 'time'
25
25
  # Simple OO access to the Exiftool command-line application.
26
26
  class MiniExiftool
27
27
 
28
- VERSION = '2.4.0'
28
+ VERSION = '2.4.1'
29
29
 
30
30
  # Name of the Exiftool command-line application
31
31
  @@cmd = 'exiftool'
@@ -426,7 +426,7 @@ class MiniExiftool
426
426
  when /^-?\d+$/
427
427
  value = value.to_i
428
428
  when %r(^(\d+)/(\d+)$)
429
- value = Rational($1.to_i, $2.to_i)
429
+ value = Rational($1.to_i, $2.to_i) rescue value
430
430
  when /^[\d ]+$/
431
431
  # nothing => String
432
432
  end
@@ -0,0 +1,3 @@
1
+ [{
2
+ "UserComment": "1/0"
3
+ }]
@@ -0,0 +1,13 @@
1
+ # -- encoding: utf-8 --
2
+ require 'helpers_for_test'
3
+
4
+ class TestInvalidRational < TestCase
5
+
6
+ def test_rescue_from_invalid_rational
7
+ mini_exiftool = MiniExiftool.from_json(File.read('test/data/invalid_rational.json'))
8
+ assert_equal '1/0', mini_exiftool.user_comment
9
+ rescue Exception
10
+ assert false, 'Tag values of the form x/0 should not raise an Exception.'
11
+ end
12
+
13
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_exiftool
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Friedrich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-10 00:00:00.000000000 Z
11
+ date: 2014-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rim
@@ -40,6 +40,7 @@ files:
40
40
  - test/data/Canon.jpg
41
41
  - test/data/INFORMATION
42
42
  - test/data/invalid_byte_sequence_in_utf8.json
43
+ - test/data/invalid_rational.json
43
44
  - test/data/test.jpg
44
45
  - test/data/test.jpg.json
45
46
  - test/data/test_coordinates.jpg
@@ -49,12 +50,13 @@ files:
49
50
  - test/test_bad_preview_ifd.rb
50
51
  - test/test_class_methods.rb
51
52
  - test/test_composite.rb
52
- - test/test_cop_tags_from.rb
53
+ - test/test_copy_tags_from.rb
53
54
  - test/test_dumping.rb
54
55
  - test/test_encodings.rb
55
56
  - test/test_filename_access.rb
56
57
  - test/test_from_hash.rb
57
58
  - test/test_invalid_byte_sequence_in_utf8.rb
59
+ - test/test_invalid_rational.rb
58
60
  - test/test_read.rb
59
61
  - test/test_read_coordinates.rb
60
62
  - test/test_read_numerical.rb