mini_exiftool 2.10.1 → 2.10.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7904a6f99bcb35d5b5d0c98cb23dfe671a8cda1d2dd61e57140fdb1c8fb17012
4
- data.tar.gz: '074899234f52fc1a42c854d5f20e373cf2970cbe186854b1bf4d51133224bddb'
3
+ metadata.gz: a72b16712f8325fadc9e21589c126bc31f88f25492f2d47b916e0f59eda5ef24
4
+ data.tar.gz: 3eb4319d36886b2b7f0caf723177d6f2bd383df090f9421b433e46b3050a1fcf
5
5
  SHA512:
6
- metadata.gz: 7409a45bf6b8bbf40eb79a288532c8019c5e14d6114e6adc1fdd2226270d9480cef568393c245595fcb1babb0f46ef840e81829813ffe16a5089c3158e2ffec6
7
- data.tar.gz: 4b2aa1e104d586d102a2ca2602621ad9418373308824598d5b01ce98c286988809a13cc758538c2bafacdde0fd4c2aec2c23c3b8b09f493172deccb538590464
6
+ metadata.gz: 56a5e0ac25ceb6b11ec7105f0bae6f69b0f871b63ab586ef50178e484acef162845115c75f9ba89b26e5858b94f937c703e7af16d40776b52da443c76e7a50ce
7
+ data.tar.gz: 2a7c1fe5b13bfaf9d88b2d26ccbfedc1c5a7379bfaa8d253c5b50ca7b8285e4b0bc35bb8785e671bf979e89b0009e4e28981ce853a8a57f9f7b0c006c55081f8
data/.aspell.pws CHANGED
@@ -1,4 +1,4 @@
1
- personal_ws-1.1 en 119
1
+ personal_ws-1.1 en 121
2
2
  Barushev
3
3
  Bugfix
4
4
  CaptionAbstract
@@ -56,6 +56,8 @@ Wil
56
56
  acki
57
57
  aiff
58
58
  atomar
59
+ backport
60
+ backticks
59
61
  bundler
60
62
  ccoenen
61
63
  cgat
data/Changelog CHANGED
@@ -1,3 +1,9 @@
1
+ 2.10.3
2
+ - Use YAML.unsafe_load and backport it if necessary.
3
+
4
+ 2.10.2
5
+ - Escape backticks and use escaped values in option coord_format.
6
+
1
7
  2.10.1
2
8
  - Make access via PStore thread-safe.
3
9
  - Fix conversion of values with leading zeros.
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # MiniExiftool [![Build Status](https://travis-ci.org/janfri/mini_exiftool.svg?branch=master)](https://travis-ci.org/janfri/mini_exiftool)
1
+ # MiniExiftool ![Test Status](https://github.com/janfri/mini_exiftool/actions/workflows/main.yml/badge.svg)
2
2
 
3
3
  This library is a wrapper for the ExifTool command-line application
4
4
  (https://exiftool.org) written by Phil Harvey.
data/lib/mini_exiftool.rb CHANGED
@@ -22,11 +22,12 @@ require 'rbconfig'
22
22
  require 'set'
23
23
  require 'tempfile'
24
24
  require 'time'
25
+ require 'yaml'
25
26
 
26
27
  # Simple OO access to the ExifTool command-line application.
27
28
  class MiniExiftool
28
29
 
29
- VERSION = '2.10.1'
30
+ VERSION = '2.10.3'
30
31
 
31
32
  # Name of the ExifTool command-line application
32
33
  @@cmd = 'exiftool'
@@ -149,7 +150,7 @@ class MiniExiftool
149
150
  params = '-j '
150
151
  params << (@opts[:numerical] ? '-n ' : '')
151
152
  params << (@opts[:composite] ? '' : '-e ')
152
- params << (@opts[:coord_format] ? "-c \"#{@opts[:coord_format]}\"" : '')
153
+ params << (@opts[:coord_format] ? "-c #{escape(@opts[:coord_format])}" : '')
153
154
  params << (@opts[:fast] ? '-fast ' : '')
154
155
  params << (@opts[:fast2] ? '-fast2 ' : '')
155
156
  params << generate_encoding_params
@@ -304,7 +305,7 @@ class MiniExiftool
304
305
  # Create a MiniExiftool instance from YAML data created with
305
306
  # MiniExiftool#to_yaml
306
307
  def self.from_yaml yaml, opts={}
307
- MiniExiftool.from_hash YAML.load(yaml), opts
308
+ MiniExiftool.from_hash YAML.unsafe_load(yaml), opts
308
309
  end
309
310
 
310
311
  # Returns the command name of the called ExifTool application.
@@ -535,11 +536,11 @@ class MiniExiftool
535
536
 
536
537
  if @@running_on_windows
537
538
  def escape val
538
- '"' << val.to_s.gsub(/([\\"])/, "\\\\\\1") << '"'
539
+ '"' << val.to_s.gsub(/([\\"`])/, "\\\\\\1") << '"'
539
540
  end
540
541
  else
541
542
  def escape val
542
- '"' << val.to_s.gsub(/([\\"$])/, "\\\\\\1") << '"'
543
+ '"' << val.to_s.gsub(/([\\"$`])/, "\\\\\\1") << '"'
543
544
  end
544
545
  end
545
546
 
@@ -553,6 +554,16 @@ class MiniExiftool
553
554
  params
554
555
  end
555
556
 
557
+ # Backport YAML.unsafe_load
558
+ unless defined? YAML.unsafe_load
559
+ module BackportYAML
560
+ def unsafe_load *args
561
+ load *args
562
+ end
563
+ end
564
+ YAML.extend BackportYAML
565
+ end
566
+
556
567
  # Hash with indifferent access:
557
568
  # DateTimeOriginal == datetimeoriginal == date_time_original
558
569
  class TagHash < Hash # :nodoc:
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: mini_exiftool 2.10.1 ruby lib
2
+ # stub: mini_exiftool 2.10.3 ruby lib
3
3
  #
4
4
  # This file is automatically generated by rim.
5
5
  # PLEASE DO NOT EDIT IT DIRECTLY!
@@ -7,34 +7,25 @@
7
7
 
8
8
  Gem::Specification.new do |s|
9
9
  s.name = "mini_exiftool"
10
- s.version = "2.10.1"
10
+ s.version = "2.10.3"
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 = "2021-05-15"
15
+ s.date = "2023-10-06"
16
16
  s.description = "This library is a wrapper for the ExifTool command-line application\n(https://exiftool.org) 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_instance_methods.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| https://exiftool.org/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 = "3.1.2"
22
+ s.rubygems_version = "3.5.0.dev"
23
23
  s.summary = "This library is a wrapper for the ExifTool command-line application (https://exiftool.org)."
24
24
 
25
- if s.respond_to? :specification_version then
26
- s.specification_version = 4
27
- end
25
+ s.specification_version = 4
28
26
 
29
- if s.respond_to? :add_runtime_dependency then
30
- s.add_development_dependency(%q<rake>, [">= 0"])
31
- s.add_development_dependency(%q<rim>, ["~> 2.17"])
32
- s.add_development_dependency(%q<test-unit>, [">= 0"])
33
- s.add_development_dependency(%q<regtest>, ["~> 2"])
34
- else
35
- s.add_dependency(%q<rake>, [">= 0"])
36
- s.add_dependency(%q<rim>, ["~> 2.17"])
37
- s.add_dependency(%q<test-unit>, [">= 0"])
38
- s.add_dependency(%q<regtest>, ["~> 2"])
39
- end
27
+ s.add_development_dependency(%q<rake>, [">= 0"])
28
+ s.add_development_dependency(%q<rim>, ["~> 2.17"])
29
+ s.add_development_dependency(%q<test-unit>, [">= 0"])
30
+ s.add_development_dependency(%q<regtest>, ["~> 2"])
40
31
  end
data/test/test_dumping.rb CHANGED
@@ -48,7 +48,7 @@ class TestDumping < TestCase
48
48
  def test_to_yaml
49
49
  hash = @mini_exiftool.to_hash
50
50
  yaml = @mini_exiftool.to_yaml
51
- assert_equal hash, YAML.load(yaml)
51
+ assert_equal hash, YAML.unsafe_load(yaml)
52
52
  end
53
53
 
54
54
  def test_from_yaml
data/test/test_pstore.rb CHANGED
@@ -31,7 +31,7 @@ class TestPstore < TestCase
31
31
  puts YAML.dump res
32
32
  END
33
33
  cmd = %Q(#{RUBY_ENGINE} -EUTF-8 -I lib -r mini_exiftool -r yaml -e "#{script}")
34
- YAML.load(`#{cmd}`)
34
+ YAML.unsafe_load(`#{cmd}`)
35
35
  end
36
36
 
37
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.10.1
4
+ version: 2.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Friedrich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-15 00:00:00.000000000 Z
11
+ date: 2023-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  requirements: []
154
- rubygems_version: 3.1.2
154
+ rubygems_version: 3.5.0.dev
155
155
  signing_key:
156
156
  specification_version: 4
157
157
  summary: This library is a wrapper for the ExifTool command-line application (https://exiftool.org).