mini_exiftool 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog +4 -0
- data/Rakefile +0 -1
- data/lib/mini_exiftool.rb +8 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 159cfbc0f0d31089460212c5e262d0f33741fab9
|
4
|
+
data.tar.gz: 5371c34ee8764f93c172b45d831d0b5ef25f39d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b954c6e2d92c8a355a2d1be4b84f321ee5f8ecdd2a1005ab02f9a4898080ab92514df488e306d4124e3fc8f1e714aa5e23e313a9b8440992682ca59354854ea8
|
7
|
+
data.tar.gz: 31d4634627c91a491018ae78cc768c692f54c2e080b4cf5da827ce8bfa50adadb52625448932f1fb1361880ba17f2048e1550c3e969394b5920b54a2f311b57e
|
data/Changelog
CHANGED
data/Rakefile
CHANGED
@@ -15,7 +15,6 @@ Rim.setup do |p|
|
|
15
15
|
p.summary = 'This library is wrapper for the Exiftool command-line application (http://www.sno.phy.queensu.ca/~phil/exiftool).'
|
16
16
|
p.homepage = 'http://gitorious.org/mini_exiftool'
|
17
17
|
p.gem_files << 'Tutorial.rdoc'
|
18
|
-
puts p.rdoc_files
|
19
18
|
p.rdoc_files << 'Tutorial.rdoc'
|
20
19
|
p.install_message = %q{
|
21
20
|
+-----------------------------------------------------------------------+
|
data/lib/mini_exiftool.rb
CHANGED
@@ -39,7 +39,7 @@ class MiniExiftool
|
|
39
39
|
attr_accessor :numerical, :composite, :ignore_minor_errors, :errors,
|
40
40
|
:replace_invalid_chars, :timestamps
|
41
41
|
|
42
|
-
VERSION = '2.2.
|
42
|
+
VERSION = '2.2.1'
|
43
43
|
|
44
44
|
# +opts+ support at the moment
|
45
45
|
# * <code>:numerical</code> for numerical values, default is +false+
|
@@ -80,7 +80,7 @@ class MiniExiftool
|
|
80
80
|
|
81
81
|
def initialize_from_hash hash # :nodoc:
|
82
82
|
hash.each_pair do |tag,value|
|
83
|
-
set_value tag, convert_after_load(value)
|
83
|
+
set_value tag, convert_after_load(tag, value)
|
84
84
|
end
|
85
85
|
set_attributes_by_heuristic
|
86
86
|
self
|
@@ -357,13 +357,17 @@ class MiniExiftool
|
|
357
357
|
@output.encode!('UTF-16le', invalid: :replace, replace: @replace_invalid_chars).encode!('UTF-8')
|
358
358
|
end
|
359
359
|
JSON.parse(@output)[0].each do |tag,value|
|
360
|
-
value = convert_after_load(value)
|
360
|
+
value = convert_after_load(tag, value)
|
361
361
|
set_value tag, value
|
362
362
|
end
|
363
363
|
end
|
364
364
|
|
365
|
-
def convert_after_load value
|
365
|
+
def convert_after_load tag, value
|
366
366
|
return value unless value.kind_of?(String)
|
367
|
+
if %w(sourcefile filename directory).include?(MiniExiftool.unify(tag))
|
368
|
+
# ignore filesystem relevant tags to avoid encoding problems
|
369
|
+
return nil
|
370
|
+
end
|
367
371
|
case value
|
368
372
|
when /^\d{4}:\d\d:\d\d \d\d:\d\d:\d\d/
|
369
373
|
s = value.sub(/^(\d+):(\d+):/, '\1-\2-')
|
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.2.
|
4
|
+
version: 2.2.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: 2013-06-
|
11
|
+
date: 2013-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rim
|