mini_exiftool 2.9.0 → 2.9.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 +5 -5
- data/.aspell.pws +13 -13
- data/Changelog +4 -0
- data/README.md +4 -4
- data/lib/mini_exiftool.rb +3 -3
- data/mini_exiftool.gemspec +10 -10
- data/test/helpers_for_test.rb +1 -9
- data/test/test_dumping.rb +0 -1
- data/test/test_invalid_byte_sequence_in_utf8.rb +1 -0
- data/test/test_pstore.rb +24 -11
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9155fb65753a3a7afec540dc62c9581c2f70056b1812e52bbf2d3312d4cc9450
|
4
|
+
data.tar.gz: f6553477f4adb5b0e876ec60d5f70eaa32127f083dfdc5608312eb6929fd1c03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18b3388e4e0449701228a31c7cc669e5545b46baef1233eeedd4a19dba09408c3254fb8f64ba0288a2a5760bf59e8f1020ac8c162f62b634f11d7591ace2b5e3
|
7
|
+
data.tar.gz: 7de184378b9a27ae702b3d71b127821188180a80c586996f05f85c7ba51bd918c51075ede14551131dc284a52e8c59fd86226945cd5c54b9e2c34a88f2ac0db7
|
data/.aspell.pws
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
personal_ws-1.1 en 114
|
2
|
-
CodedCharacterSet
|
3
2
|
Stjernstrom
|
4
3
|
iptc
|
5
4
|
README
|
@@ -7,6 +6,7 @@ releating
|
|
7
6
|
Gemfile
|
8
7
|
Friedrich
|
9
8
|
echoe
|
9
|
+
CaptionAbstract
|
10
10
|
encodings
|
11
11
|
stderr
|
12
12
|
Cypriano
|
@@ -18,30 +18,30 @@ jpg
|
|
18
18
|
Soika
|
19
19
|
rdoc
|
20
20
|
ccoenen
|
21
|
-
StandardError
|
22
21
|
gemspec
|
23
22
|
Kulander
|
24
23
|
exif
|
25
|
-
|
24
|
+
SubjectLocation
|
26
25
|
FNumber
|
27
26
|
dir
|
28
27
|
popen
|
29
28
|
io
|
29
|
+
multi
|
30
30
|
JPEG
|
31
31
|
yaml
|
32
32
|
mfo
|
33
33
|
coord
|
34
34
|
md
|
35
|
-
MiniExiftool
|
36
35
|
Tempfile
|
37
36
|
warings
|
38
37
|
Gaelan
|
39
38
|
atomar
|
40
|
-
Atomar
|
41
39
|
Regexes
|
42
40
|
mie
|
43
41
|
�ml�uts
|
42
|
+
CodedCharacterSet
|
44
43
|
commandline
|
44
|
+
TestEscapeFilename
|
45
45
|
robotmay
|
46
46
|
params
|
47
47
|
Soutar
|
@@ -49,19 +49,17 @@ metadata
|
|
49
49
|
filename
|
50
50
|
OO
|
51
51
|
rb
|
52
|
-
SupplementalCategories
|
53
52
|
stdout
|
54
|
-
exiftool
|
55
53
|
ExifTool
|
54
|
+
exiftool
|
56
55
|
prerelease
|
57
56
|
str
|
58
57
|
Henning
|
58
|
+
SupplementalCategories
|
59
59
|
Krogmann
|
60
60
|
timestamps
|
61
61
|
encod
|
62
|
-
customizable
|
63
62
|
bundler
|
64
|
-
CaptionAbstract
|
65
63
|
Picturelife
|
66
64
|
cgat
|
67
65
|
Hinrich
|
@@ -73,7 +71,7 @@ aiff
|
|
73
71
|
pdf
|
74
72
|
MacRoman
|
75
73
|
DateTime
|
76
|
-
|
74
|
+
refactorings
|
77
75
|
ptore
|
78
76
|
ws
|
79
77
|
icc
|
@@ -82,17 +80,18 @@ UTF
|
|
82
80
|
Wil
|
83
81
|
shioyama
|
84
82
|
Joshfindit
|
83
|
+
StandardError
|
85
84
|
Dungan
|
86
85
|
Romahn
|
87
86
|
uwe
|
88
|
-
|
89
|
-
datetimeoriginal
|
87
|
+
MiniExiftool
|
90
88
|
filenames
|
91
89
|
POSIX
|
92
90
|
darwin
|
93
|
-
SubjectLocation
|
94
91
|
GPS
|
95
92
|
quicktime
|
93
|
+
DateTimeOriginal
|
94
|
+
datetimeoriginal
|
96
95
|
pstore
|
97
96
|
PStore
|
98
97
|
shellwords
|
@@ -111,5 +110,6 @@ Horrocks
|
|
111
110
|
acki
|
112
111
|
Salzberg
|
113
112
|
Hoy
|
113
|
+
customizable
|
114
114
|
regtest
|
115
115
|
json
|
data/Changelog
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# MiniExiftool
|
1
|
+
# MiniExiftool [](https://travis-ci.org/janfri/mini_exiftool)
|
2
2
|
|
3
3
|
This library is a wrapper for the ExifTool command-line application
|
4
4
|
(http://www.sno.phy.queensu.ca/~phil/exiftool) written by Phil Harvey.
|
@@ -28,7 +28,7 @@ gem install mini_exiftool
|
|
28
28
|
```
|
29
29
|
or simply add to the following to your Gemfile:
|
30
30
|
```ruby
|
31
|
-
gem '
|
31
|
+
gem 'mini_exiftool'
|
32
32
|
```
|
33
33
|
|
34
34
|
If you need to support older versions of Ruby or Exiftool (see Requirements above)
|
@@ -40,7 +40,7 @@ gem install --version "< 2.0.0" mini_exiftool
|
|
40
40
|
or if you use a Gemfile add:
|
41
41
|
|
42
42
|
```ruby
|
43
|
-
gem '
|
43
|
+
gem 'mini_exiftool', '<2.0.0'
|
44
44
|
```
|
45
45
|
|
46
46
|
## Configuration
|
@@ -100,7 +100,7 @@ examples.
|
|
100
100
|
|
101
101
|
The philosophy of MiniExiftool is safety over performance.
|
102
102
|
It can not handle more than one file at once. Writing operations are
|
103
|
-
executed on a copy of the original file to have
|
103
|
+
executed on a copy of the original file to have atomic writing: Either
|
104
104
|
all changed values are written or none.
|
105
105
|
To be able to assign errors to a specific tag writing operations also call
|
106
106
|
the Exiftool command-line application once for each changed tag!
|
data/lib/mini_exiftool.rb
CHANGED
@@ -26,7 +26,7 @@ require 'time'
|
|
26
26
|
# Simple OO access to the ExifTool command-line application.
|
27
27
|
class MiniExiftool
|
28
28
|
|
29
|
-
VERSION = '2.9.
|
29
|
+
VERSION = '2.9.1'
|
30
30
|
|
31
31
|
# Name of the ExifTool command-line application
|
32
32
|
@@cmd = 'exiftool'
|
@@ -418,8 +418,8 @@ class MiniExiftool
|
|
418
418
|
|
419
419
|
def method_missing symbol, *args
|
420
420
|
tag_name = symbol.id2name
|
421
|
-
if tag_name
|
422
|
-
self[
|
421
|
+
if tag_name =~ /^(.+)=$/
|
422
|
+
self[$1] = args.first
|
423
423
|
else
|
424
424
|
self[tag_name]
|
425
425
|
end
|
data/mini_exiftool.gemspec
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: mini_exiftool 2.9.
|
2
|
+
# stub: mini_exiftool 2.9.1 ruby lib
|
3
3
|
#
|
4
4
|
# This file is automatically generated by rim.
|
5
5
|
# PLEASE DO NOT EDIT IT DIRECTLY!
|
@@ -7,19 +7,19 @@
|
|
7
7
|
|
8
8
|
Gem::Specification.new do |s|
|
9
9
|
s.name = "mini_exiftool"
|
10
|
-
s.version = "2.9.
|
10
|
+
s.version = "2.9.1"
|
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 = "
|
15
|
+
s.date = "2019-10-28"
|
16
16
|
s.description = "This library is a wrapper for the ExifTool command-line application\n(http://www.sno.phy.queensu.ca/~phil/exiftool) written by Phil Harvey.\nIt provides the full power of ExifTool to Ruby: reading and writing of\nEXIF-data, IPTC-data and XMP-data.\n"
|
17
17
|
s.email = "janfri26@gmail.com"
|
18
18
|
s.files = ["./.aspell.pws", "COPYING", "Changelog", "Gemfile", "README.md", "Rakefile", "Tutorial.md", "examples/copy_icc_profile.rb", "examples/external_photo.rb", "examples/print_portraits.rb", "examples/shift_time.rb", "examples/show_speedup_with_fast_option.rb", "lib/mini_exiftool.rb", "mini_exiftool.gemspec", "regtest/read_all.rb", "regtest/read_all.yml", "test/data", "test/data/Bad_PreviewIFD.jpg", "test/data/Canon.jpg", "test/data/INFORMATION", "test/data/invalid_byte_sequence_in_utf8.json", "test/data/invalid_rational.json", "test/data/test.jpg", "test/data/test.jpg.json", "test/data/test_coordinates.jpg", "test/data/test_encodings.jpg", "test/data/test_special_dates.jpg", "test/helpers_for_test.rb", "test/test_bad_preview_ifd.rb", "test/test_class_methods.rb", "test/test_composite.rb", "test/test_copy_tags_from.rb", "test/test_dumping.rb", "test/test_encodings.rb", "test/test_filename_access.rb", "test/test_from_hash.rb", "test/test_invalid_byte_sequence_in_utf8.rb", "test/test_invalid_rational.rb", "test/test_io.rb", "test/test_pstore.rb", "test/test_read.rb", "test/test_read_coordinates.rb", "test/test_read_numerical.rb", "test/test_save.rb", "test/test_special.rb", "test/test_special_dates.rb", "test/test_write.rb"]
|
19
19
|
s.homepage = "https://github.com/janfri/mini_exiftool"
|
20
20
|
s.licenses = ["LGPL-2.1"]
|
21
21
|
s.post_install_message = "+-----------------------------------------------------------------------+\n| Please ensure you have installed exiftool at least version 7.65 |\n| and it's found in your PATH (Try \"exiftool -ver\" on your commandline).|\n| For more details see |\n| http://www.sno.phy.queensu.ca/~phil/exiftool/install.html |\n| You need also Ruby 1.9 or higher. |\n| If you need support for Ruby 1.8 or exiftool prior 7.65 install |\n| mini_exiftool version < 2.0.0. |\n+-----------------------------------------------------------------------+\n"
|
22
|
-
s.rubygems_version = "
|
22
|
+
s.rubygems_version = "3.0.3"
|
23
23
|
s.summary = "This library is a wrapper for the ExifTool command-line application (http://www.sno.phy.queensu.ca/~phil/exiftool)."
|
24
24
|
|
25
25
|
if s.respond_to? :specification_version then
|
@@ -27,19 +27,19 @@ Gem::Specification.new do |s|
|
|
27
27
|
|
28
28
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
29
29
|
s.add_development_dependency(%q<rake>, [">= 0"])
|
30
|
-
s.add_development_dependency(%q<rim>, ["~> 2.
|
30
|
+
s.add_development_dependency(%q<rim>, ["~> 2.17"])
|
31
31
|
s.add_development_dependency(%q<test-unit>, [">= 0"])
|
32
|
-
s.add_development_dependency(%q<regtest>, ["~>
|
32
|
+
s.add_development_dependency(%q<regtest>, ["~> 2"])
|
33
33
|
else
|
34
34
|
s.add_dependency(%q<rake>, [">= 0"])
|
35
|
-
s.add_dependency(%q<rim>, ["~> 2.
|
35
|
+
s.add_dependency(%q<rim>, ["~> 2.17"])
|
36
36
|
s.add_dependency(%q<test-unit>, [">= 0"])
|
37
|
-
s.add_dependency(%q<regtest>, ["~>
|
37
|
+
s.add_dependency(%q<regtest>, ["~> 2"])
|
38
38
|
end
|
39
39
|
else
|
40
40
|
s.add_dependency(%q<rake>, [">= 0"])
|
41
|
-
s.add_dependency(%q<rim>, ["~> 2.
|
41
|
+
s.add_dependency(%q<rim>, ["~> 2.17"])
|
42
42
|
s.add_dependency(%q<test-unit>, [">= 0"])
|
43
|
-
s.add_dependency(%q<regtest>, ["~>
|
43
|
+
s.add_dependency(%q<regtest>, ["~> 2"])
|
44
44
|
end
|
45
45
|
end
|
data/test/helpers_for_test.rb
CHANGED
@@ -3,15 +3,7 @@ require 'mini_exiftool'
|
|
3
3
|
require 'test/unit'
|
4
4
|
require 'fileutils'
|
5
5
|
require 'tempfile'
|
6
|
-
|
7
|
-
require 'turn'
|
8
|
-
rescue LoadError
|
9
|
-
begin
|
10
|
-
require 'rubygems'
|
11
|
-
require 'turn'
|
12
|
-
rescue LoadError
|
13
|
-
end
|
14
|
-
end
|
6
|
+
require 'yaml'
|
15
7
|
|
16
8
|
include Test::Unit
|
17
9
|
|
data/test/test_dumping.rb
CHANGED
@@ -12,6 +12,7 @@ class TestInvalidByteSequenceInUtf8 < TestCase
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def test_invalid_byte_sequence_gets_unconverted_value_with_invalid_encoding
|
15
|
+
omit 'Java version of json gem can not handle invalid encoded data' if RUBY_PLATFORM == 'java'
|
15
16
|
assert_nothing_raised do
|
16
17
|
mini_exiftool = MiniExiftool.from_json(@json)
|
17
18
|
assert_equal 1561, mini_exiftool.color_balance_unknown.size
|
data/test/test_pstore.rb
CHANGED
@@ -5,20 +5,33 @@ class TestPstore < TestCase
|
|
5
5
|
|
6
6
|
def test_pstore
|
7
7
|
pstore_dir = Dir.mktmpdir
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
b = Time.now
|
13
|
-
assert_equal s, result.chomp
|
8
|
+
writable_tags = MiniExiftool.writable_tags
|
9
|
+
res = execute(pstore_dir)
|
10
|
+
t1 = res['time']
|
11
|
+
assert_equal writable_tags, res['writable_tags']
|
14
12
|
assert_equal 1, Dir[File.join(pstore_dir, '*')].size
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
assert 10 * (
|
13
|
+
res = execute(pstore_dir)
|
14
|
+
t2 = res['time']
|
15
|
+
assert_equal writable_tags, res['writable_tags']
|
16
|
+
assert t2 < 1.0, format('loading cached tag information should be done in under 1 second but needed %.2fs', t2)
|
17
|
+
assert 10 * t2 < t1, format('loading cached tag information (%.2fs) should be 10 times faster than loading uncached information (%.2fs)', t2, t1)
|
20
18
|
ensure
|
21
19
|
FileUtils.rm_rf pstore_dir
|
22
20
|
end
|
23
21
|
|
22
|
+
private
|
23
|
+
|
24
|
+
def execute pstore_dir
|
25
|
+
script = <<-END
|
26
|
+
MiniExiftool.pstore_dir = '#{pstore_dir}'
|
27
|
+
res = {}
|
28
|
+
start = Time.now
|
29
|
+
res['writable_tags'] = MiniExiftool.writable_tags
|
30
|
+
res['time'] = Time.now - start
|
31
|
+
puts YAML.dump res
|
32
|
+
END
|
33
|
+
cmd = %Q(#{RUBY_ENGINE} -EUTF-8 -I lib -r mini_exiftool -r yaml -e "#{script}")
|
34
|
+
YAML.load(`#{cmd}`)
|
35
|
+
end
|
36
|
+
|
24
37
|
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.9.
|
4
|
+
version: 2.9.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:
|
11
|
+
date: 2019-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '2.
|
33
|
+
version: '2.17'
|
34
34
|
type: :development
|
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.
|
40
|
+
version: '2.17'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: test-unit
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '2'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '2'
|
69
69
|
description: |
|
70
70
|
This library is a wrapper for the ExifTool command-line application
|
71
71
|
(http://www.sno.phy.queensu.ca/~phil/exiftool) written by Phil Harvey.
|
@@ -150,8 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
150
|
- !ruby/object:Gem::Version
|
151
151
|
version: '0'
|
152
152
|
requirements: []
|
153
|
-
|
154
|
-
rubygems_version: 2.6.13
|
153
|
+
rubygems_version: 3.0.3
|
155
154
|
signing_key:
|
156
155
|
specification_version: 4
|
157
156
|
summary: This library is a wrapper for the ExifTool command-line application (http://www.sno.phy.queensu.ca/~phil/exiftool).
|