mini_exiftool 2.4.0 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog +5 -0
- data/README.rdoc +1 -1
- data/lib/mini_exiftool.rb +2 -2
- data/test/data/invalid_rational.json +3 -0
- data/test/{test_cop_tags_from.rb → test_copy_tags_from.rb} +0 -0
- data/test/test_invalid_rational.rb +13 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f207a729994bb4e72cb5957037646c49a35a09f
|
4
|
+
data.tar.gz: 020d0c56fd4ff0287ac289abd877f86d28d9719a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34de6483132b8ed9847799b7b6fdf85d49c3590322366a89eb5a5af890c4c063e681297e962bac6b73f57ec8a685fc87199e701fe6833cd3513436d1db678100
|
7
|
+
data.tar.gz: 0d19ac96d865f72e9edfee75a787a8d9487afb6f8580b94ca3b9af18f1f22d589aa99fcc69b05f6e83723cb87037857400988acd79109843e7bffc4dfb7f9526
|
data/Changelog
CHANGED
data/README.rdoc
CHANGED
@@ -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-
|
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)
|
data/lib/mini_exiftool.rb
CHANGED
@@ -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.
|
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
|
File without changes
|
@@ -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.
|
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-
|
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/
|
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
|