mini_exiftool 2.4.1 → 2.4.2

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: 4f207a729994bb4e72cb5957037646c49a35a09f
4
- data.tar.gz: 020d0c56fd4ff0287ac289abd877f86d28d9719a
3
+ metadata.gz: 85c8d58c8a6e5dd3372fab24ddcbad3d8ec940a5
4
+ data.tar.gz: 2de6dc0ca9ea4fc221d9e019dca237d555c8bc13
5
5
  SHA512:
6
- metadata.gz: 34de6483132b8ed9847799b7b6fdf85d49c3590322366a89eb5a5af890c4c063e681297e962bac6b73f57ec8a685fc87199e701fe6833cd3513436d1db678100
7
- data.tar.gz: 0d19ac96d865f72e9edfee75a787a8d9487afb6f8580b94ca3b9af18f1f22d589aa99fcc69b05f6e83723cb87037857400988acd79109843e7bffc4dfb7f9526
6
+ metadata.gz: 01aafd921026ba2f6828cb3cb1355d86bfaa9dbac7b5d09da7db514aa3109b4d88680ea702bf7fbba4b3360bf6c35f6336c5770dbb7d29e518af66e24380e87f
7
+ data.tar.gz: 2d7b5ef57000167e18523b47cf9945a6c74598469be6d74957e2095bd29b78dc7ebcae8e3dbea854eba4847a334906d6c188fa3cd79b9d7c375451805f513665
data/Changelog CHANGED
@@ -1,3 +1,6 @@
1
+ 2.4.2
2
+ - Bugfix: Don't ignoring *_encoding options when saving.
3
+
1
4
  2.4.1
2
5
  - Handling tag values of the form x/0 correct.
3
6
  Thanks to Picturelife for a clever solution to solve this.
@@ -150,7 +153,7 @@ The Encoding Release
150
153
  - MiniExiftool#to_yaml
151
154
  Thanks to Andrew Bennett for the initial idea of YAML-serialization
152
155
  - Refactoring of tests
153
- - Small documetation update
156
+ - Small documentation update
154
157
 
155
158
  0.5.1
156
159
  - Warning "parenthesize argument(s) for future version" removed
@@ -172,7 +175,7 @@ The Encoding Release
172
175
  Saving of non-read tags doesn't work with tags with hyphen
173
176
  Thanks to Robin Romahn for reporting the bug
174
177
  - New methods: MiniExiftool.all_tags and MiniExiftool.original_tag
175
- - Interna: Original tag names (all and writable) are now saved via pstore in
178
+ - Internal: Original tag names (all and writable) are now saved via pstore in
176
179
  a file for better performance
177
180
 
178
181
  0.3.1
data/README.rdoc CHANGED
@@ -14,7 +14,7 @@ Instructions for installation you can find under
14
14
  http://www.sno.phy.queensu.ca/~phil/exiftool/install.html .
15
15
 
16
16
  Alternatively Wil Gieseler has bundled a meta-gem that eliminates the
17
- need for a seperate Exiftool installation. Have a look at
17
+ need for a separate Exiftool installation. Have a look at
18
18
  http://github.com/wilg/mini_exiftool_vendored or
19
19
  http://rubygems.org/gems/mini_exiftool_vendored .
20
20
 
@@ -51,7 +51,7 @@ examples.
51
51
 
52
52
  == Contribution
53
53
 
54
- The code is hostet in a git repository on Gitorious at
54
+ The code is hosted in a git repository on Gitorious at
55
55
  http://gitorious.org/mini_exiftool
56
56
  and github at
57
57
  https://github.com/janfri/mini_exiftool
data/Rakefile CHANGED
@@ -1,7 +1,5 @@
1
- require 'rim'
2
- require 'rim/check_version'
3
- require 'rim/gem'
4
- require 'rim/test'
1
+ require 'rim/tire'
2
+ require 'rim/version'
5
3
  require 'regtest/task'
6
4
 
7
5
  $:.unshift 'lib'
@@ -14,6 +12,7 @@ Rim.setup do |p|
14
12
  p.email = 'janfri26@gmail.com'
15
13
  p.summary = 'This library is wrapper for the Exiftool command-line application (http://www.sno.phy.queensu.ca/~phil/exiftool).'
16
14
  p.homepage = 'http://gitorious.org/mini_exiftool'
15
+ p.license = 'LPGLv2'
17
16
  p.gem_files << 'Tutorial.rdoc'
18
17
  p.install_message = %q{
19
18
  +-----------------------------------------------------------------------+
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.1'
28
+ VERSION = '2.4.2'
29
29
 
30
30
  # Name of the Exiftool command-line application
31
31
  @@cmd = 'exiftool'
@@ -130,11 +130,7 @@ class MiniExiftool
130
130
  params << (@opts[:numerical] ? '-n ' : '')
131
131
  params << (@opts[:composite] ? '' : '-e ')
132
132
  params << (@opts[:coord_format] ? "-c \"#{@opts[:coord_format]}\"" : '')
133
- @@encoding_types.each do |enc_type|
134
- if enc_val = @opts[MiniExiftool.encoding_opt(enc_type)]
135
- params << "-charset #{enc_type}=#{enc_val} "
136
- end
137
- end
133
+ params << generate_encoding_params
138
134
  if run(cmd_gen(params, @filename))
139
135
  parse_output
140
136
  else
@@ -207,6 +203,7 @@ class MiniExiftool
207
203
  params = '-q -P -overwrite_original '
208
204
  params << (arr_val.detect {|x| x.kind_of?(Numeric)} ? '-n ' : '')
209
205
  params << (@opts[:ignore_minor_errors] ? '-m ' : '')
206
+ params << generate_encoding_params
210
207
  arr_val.each do |v|
211
208
  params << %Q(-#{original_tag}=#{escape(v)} )
212
209
  end
@@ -506,6 +503,16 @@ class MiniExiftool
506
503
  end
507
504
  end
508
505
 
506
+ def generate_encoding_params
507
+ params = ''
508
+ @@encoding_types.each do |enc_type|
509
+ if enc_val = @opts[MiniExiftool.encoding_opt(enc_type)]
510
+ params << "-charset #{enc_type}=#{enc_val} "
511
+ end
512
+ end
513
+ params
514
+ end
515
+
509
516
  # Hash with indifferent access:
510
517
  # DateTimeOriginal == datetimeoriginal == date_time_original
511
518
  class TagHash < Hash # :nodoc:
@@ -3,7 +3,10 @@ require 'helpers_for_test'
3
3
 
4
4
  class TestEncodings < TestCase
5
5
 
6
+ include TempfileTest
7
+
6
8
  def setup
9
+ super
7
10
  @data_dir = File.dirname(__FILE__) + '/data'
8
11
  @filename_test = @data_dir + '/test_encodings.jpg'
9
12
  @mini_exiftool = MiniExiftool.new @filename_test
@@ -14,6 +17,14 @@ class TestEncodings < TestCase
14
17
  assert_not_equal object_name, @mini_exiftool.object_name
15
18
  correct_iptc = MiniExiftool.new(@filename_test, iptc_encoding: 'MacRoman')
16
19
  assert_equal object_name, correct_iptc.object_name
20
+ FileUtils.cp(@filename_test, @temp_filename)
21
+ correct_iptc_write = MiniExiftool.new(@temp_filename, iptc_encoding: 'MacRoman')
22
+ caption = 'Das ist eine Möhre'
23
+ correct_iptc_write.caption_abstract = caption
24
+ correct_iptc_write.save!
25
+ correct_iptc_write.reload
26
+ assert_equal object_name, correct_iptc_write.object_name
27
+ assert_equal caption, correct_iptc_write.caption_abstract
17
28
  end
18
29
 
19
30
  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.1
4
+ version: 2.4.2
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 00:00:00.000000000 Z
11
+ date: 2014-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rim
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.8.1
19
+ version: '2.4'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.8.1
26
+ version: '2.4'
27
27
  description: ''
28
28
  email: janfri26@gmail.com
29
29
  executables: []
@@ -65,7 +65,8 @@ files:
65
65
  - test/test_special_dates.rb
66
66
  - test/test_write.rb
67
67
  homepage: http://gitorious.org/mini_exiftool
68
- licenses: []
68
+ licenses:
69
+ - LPGLv2
69
70
  metadata: {}
70
71
  post_install_message: "\n+-----------------------------------------------------------------------+\n|
71
72
  Please ensure you have installed exiftool at least version 7.65 |\n| and it's