mini_exiftool 2.12.0 → 2.13.0

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/Changelog +7 -0
  3. data/lib/mini_exiftool.rb +8 -10
  4. metadata +6 -9
  5. data/Gemfile +0 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7dca9467c295a50ea6b98a4ff39da9bed396f914c507ca52097de8ad6ce7018
4
- data.tar.gz: af9d622e53dde26096285f120bfd78b35082ecdac9bf3360d5696863de386ceb
3
+ metadata.gz: dbcf3b035e8e2bfe73392ee5ef8e63ff2125d88b1c1ec32b1d8d86dba15f7f5a
4
+ data.tar.gz: ba2b4c2e8ea43a0cd1ac79283d7b83cdfbf4a8551b8a70ba22529b1fd94f984e
5
5
  SHA512:
6
- metadata.gz: d57db9046a9d94127c53a6f99265a819d86fe5abb1e5dc18ee82ed29a10a93b355084114d2165f537aafbe7c88e9983a87a2cf8df2f8113e715e2a07e5e77a78
7
- data.tar.gz: b2af043e5674d0fc45b537b676f64db74f5972a64329425071380636b6046e35373719e1810cf1f97cea05a40256232b1c263d39ca43fc4a12098fbac14d2f59
6
+ metadata.gz: 0acb2a5a18ceba9f3e8750882510cd14570d036caa868d90a8ffe2132c3e85068b5d81a8c7b182024609c4d08418e1843dc15d68d1eaf43696b034eb56ca5810
7
+ data.tar.gz: baea546851320c8068c3c1b91726f2b96fa96a03fd4c11d95bf6c2d36e6e0a1ed46144560aff1a3717c6100505650cb3917b5a94d5a003fa60830898c36e510a
data/Changelog CHANGED
@@ -1,3 +1,10 @@
1
+ 2.13.0
2
+ - Fix bug when using Pathname instances of filenames.
3
+ Thanks Ryan Lue for reporting this problem (github issue #50).
4
+
5
+ 2.12.1
6
+ - Maintenance release: Optimizing some internals.
7
+
1
8
  2.12.0
2
9
  - Make mini_exiftool Ruby 3.5 ready.
3
10
  - Minimize gem file size.
data/lib/mini_exiftool.rb CHANGED
@@ -3,13 +3,13 @@
3
3
  #
4
4
  # MiniExiftool
5
5
  #
6
- # This library is wrapper for the ExifTool command-line
6
+ # This library is a wrapper for the ExifTool command-line
7
7
  # application (https://exiftool.org/)
8
8
  # written by Phil Harvey.
9
9
  # Read and write access is done in a clean OO manner.
10
10
  #
11
11
  # Author: Jan Friedrich
12
- # Copyright (c) 2007-2019 by Jan Friedrich
12
+ # Copyright (c) 2007-2021, 2023-2024 by Jan Friedrich
13
13
  # Licensed under the GNU LESSER GENERAL PUBLIC LICENSE,
14
14
  # Version 2.1, February 1999
15
15
  #
@@ -28,7 +28,7 @@ require 'yaml'
28
28
  # Simple OO access to the ExifTool command-line application.
29
29
  class MiniExiftool
30
30
 
31
- VERSION = '2.12.0'
31
+ VERSION = '2.13.0'
32
32
 
33
33
  # Name of the ExifTool command-line application
34
34
  @@cmd = 'exiftool'
@@ -132,7 +132,10 @@ class MiniExiftool
132
132
 
133
133
  # Load the tags of filename or io.
134
134
  def load filename_or_io
135
- if filename_or_io.respond_to? :to_str # String-like
135
+ if filename_or_io.respond_to? :read # IO-like
136
+ @io = filename_or_io
137
+ @filename = '-'
138
+ else
136
139
  unless filename_or_io && File.exist?(filename_or_io)
137
140
  raise MiniExiftool::Error.new("File '#{filename_or_io}' does not exist.")
138
141
  end
@@ -140,11 +143,6 @@ class MiniExiftool
140
143
  raise MiniExiftool::Error.new("'#{filename_or_io}' is a directory.")
141
144
  end
142
145
  @filename = filename_or_io.to_str
143
- elsif filename_or_io.respond_to? :read # IO-like
144
- @io = filename_or_io
145
- @filename = '-'
146
- else
147
- raise MiniExiftool::Error.new("Could not open filename_or_io.")
148
146
  end
149
147
  @values.clear
150
148
  @changed_values.clear
@@ -385,7 +383,7 @@ class MiniExiftool
385
383
  ############################################################################
386
384
 
387
385
  def cmd_gen arg_str='', filename
388
- [@@cmd, arg_str.encode('UTF-8'), escape(filename.encode(@@fs_enc))].map {|s| s.force_encoding('UTF-8')}.join(' ')
386
+ [+@@cmd, arg_str.encode('UTF-8'), escape(filename.encode(@@fs_enc))].map {|s| s.force_encoding('UTF-8')}.join(' ')
389
387
  end
390
388
 
391
389
  def run cmd
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_exiftool
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.0
4
+ version: 2.13.0
5
5
  platform: ruby
6
- original_platform: ''
7
6
  authors:
8
7
  - Jan Friedrich
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-11-23 00:00:00.000000000 Z
10
+ date: 2024-12-30 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: ostruct
@@ -106,7 +105,6 @@ extra_rdoc_files: []
106
105
  files:
107
106
  - COPYING
108
107
  - Changelog
109
- - Gemfile
110
108
  - README.md
111
109
  - Tutorial.md
112
110
  - examples/copy_icc_profile.rb
@@ -119,7 +117,6 @@ homepage: https://github.com/janfri/mini_exiftool
119
117
  licenses:
120
118
  - LGPL-2.1
121
119
  metadata:
122
- homepage_uri: https://github.com/janfri/mini_exiftool
123
120
  source_code_uri: https://github.com/janfri/mini_exiftool
124
121
  post_install_message: |
125
122
  +-----------------------------------------------------------------------+
@@ -127,8 +124,8 @@ post_install_message: |
127
124
  | and it's found in your PATH (Try 'exiftool -ver' on your commandline).|
128
125
  | For more details see |
129
126
  | https://exiftool.org/install.html |
130
- | You need also Ruby 1.9 or higher. |
131
- | If you need support for Ruby < 1.9 or exiftool < 7.65 then install |
127
+ | You need also Ruby 2.3 or higher. |
128
+ | If you need support for Ruby < 2.3 or exiftool < 7.65 then install |
132
129
  | mini_exiftool version < 2.0.0. |
133
130
  +-----------------------------------------------------------------------+
134
131
  rdoc_options: []
@@ -138,7 +135,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
135
  requirements:
139
136
  - - ">="
140
137
  - !ruby/object:Gem::Version
141
- version: '1.9'
138
+ version: '2.3'
142
139
  required_rubygems_version: !ruby/object:Gem::Requirement
143
140
  requirements:
144
141
  - - ">="
@@ -146,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
143
  version: '0'
147
144
  requirements:
148
145
  - exiftool, version >= 7,65
149
- rubygems_version: 3.6.0.dev
146
+ rubygems_version: 3.7.0.dev
150
147
  specification_version: 4
151
148
  summary: This library is a wrapper for the ExifTool command-line application (https://exiftool.org).
152
149
  test_files: []
data/Gemfile DELETED
@@ -1,3 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec