mini_exiftool 2.10.2 → 2.10.4

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
  SHA256:
3
- metadata.gz: 51cea5ba80431798479c6bef0c1554fd9af1f228ebcfc7944215b4bff2206087
4
- data.tar.gz: ca0f34cc3e579a6a3fb06f60f10275e57f700c0ef48e8c6ea687bc6ce3256705
3
+ metadata.gz: d02a99b3bb57a80fdd788fee4d19730b444733abba15521b3f82182c1616e2a2
4
+ data.tar.gz: c0123ea7ed1a3f61b4a0a26efaba5b25633b8219d9c4899ad76da4d295199d38
5
5
  SHA512:
6
- metadata.gz: 54713433ddd51360894ed0ca8e0cda2cd91c45c7f9c14db0cffab40296b2bf7d359abf1d41fa8b646a932eb9169795133367da38d0be226c10720d7e91e068eb
7
- data.tar.gz: 4e1906897d09383272d8cbb69abe50e4e477e6d340cf1a13a4fc29f7d5cd53c454360af44ab45f7998383437fbe1ed3fbd7543debeab8fef8172773f1267ee95
6
+ metadata.gz: af633fd3e440b6d264fe8b0b94a8c5e9ce06270cef77eed380474eff9541f63cee8f8b0521ad9637d46d4aff7b06de681e0d9fee28ea1af8babf5d3ad5269fac
7
+ data.tar.gz: a96a9ea4a784ba41b57383e72f922c06f525ec7440896bca8d5dfc33ae6fef55f66dd48d3e46429dbf4b34a281485a2fc6afe96812903f82cfac0e5c13b898e6
data/.aspell.pws CHANGED
@@ -1,4 +1,4 @@
1
- personal_ws-1.1 en 120
1
+ personal_ws-1.1 en 121
2
2
  Barushev
3
3
  Bugfix
4
4
  CaptionAbstract
@@ -56,6 +56,7 @@ Wil
56
56
  acki
57
57
  aiff
58
58
  atomar
59
+ backport
59
60
  backticks
60
61
  bundler
61
62
  ccoenen
data/Changelog CHANGED
@@ -1,3 +1,9 @@
1
+ 2.10.4
2
+ - Maintenance release.
3
+
4
+ 2.10.3
5
+ - Use YAML.unsafe_load and backport it if necessary.
6
+
1
7
  2.10.2
2
8
  - Escape backticks and use escaped values in option coord_format.
3
9
 
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.2'
30
+ VERSION = '2.10.4'
30
31
 
31
32
  # Name of the ExifTool command-line application
32
33
  @@cmd = 'exiftool'
@@ -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.
@@ -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.2 ruby lib
2
+ # stub: mini_exiftool 2.10.4 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.2"
10
+ s.version = "2.10.4"
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-06-29"
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.2.15"
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/regtest/read_all.yml CHANGED
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  sample: read Bad_PreviewIFD.jpg
3
3
  result:
4
- ExifToolVersion: 11.7
5
- FileSize: 8.4 kB
4
+ ExifToolVersion: 12.26
5
+ FileSize: 8.4 KiB
6
6
  FileType: JPEG
7
7
  FileTypeExtension: jpg
8
8
  MIMEType: image/jpeg
@@ -46,7 +46,7 @@ result:
46
46
  ImageBoundary: 0 0 3872 2592
47
47
  CropHiSpeed: Off (3904x2616 cropped to 3904x2616 at pixel 0,0)
48
48
  SerialNumber: 3365614
49
- VRInfoVersion: 100
49
+ VRInfoVersion: '0100'
50
50
  VibrationReduction: 'On'
51
51
  VRMode: Normal
52
52
  ActiveD-Lighting: 'Off'
@@ -70,7 +70,7 @@ result:
70
70
  HueAdjustment: 0
71
71
  NoiseReduction: 'Off'
72
72
  WB_RGGBLevels: 56833 1 1 7
73
- LensDataVersion: 202
73
+ LensDataVersion: '0202'
74
74
  ExitPupilPosition: 70.6 mm
75
75
  AFAperture: 4.1
76
76
  FocusPosition: '0x22'
@@ -91,23 +91,23 @@ result:
91
91
  ImageOptimization: ''
92
92
  Saturation: Auto
93
93
  VariProgram: Auto
94
- MultiExposureVersion: 100
94
+ MultiExposureVersion: '0100'
95
95
  MultiExposureMode: 'Off'
96
96
  MultiExposureShots: 0
97
97
  MultiExposureAutoGain: 'Off'
98
98
  HighISONoiseReduction: 'Off'
99
99
  PowerUpTime: 2008-12-12 11:11:24.000000000 +01:00
100
- FileInfoVersion: 100
100
+ FileInfoVersion: '0100'
101
101
  MemoryCardNumber: 0
102
102
  DirectoryNumber: 100
103
103
  FileNumber: '0081'
104
- RetouchInfoVersion: 100
104
+ RetouchInfoVersion: '0100'
105
105
  NEFBitDepth: Unknown (0 0 16723 17225)
106
106
  UserComment: ''
107
- SubSecTime: 0
108
- SubSecTimeOriginal: 0
109
- SubSecTimeDigitized: 0
110
- FlashpixVersion: 100
107
+ SubSecTime: '00'
108
+ SubSecTimeOriginal: '00'
109
+ SubSecTimeDigitized: '00'
110
+ FlashpixVersion: '0100'
111
111
  ColorSpace: sRGB
112
112
  ExifImageWidth: 1
113
113
  ExifImageHeight: 1
@@ -187,8 +187,8 @@ result:
187
187
  ---
188
188
  sample: read Canon.jpg
189
189
  result:
190
- ExifToolVersion: 11.7
191
- FileSize: 2.6 kB
190
+ ExifToolVersion: 12.26
191
+ FileSize: 2.6 KiB
192
192
  FileType: JPEG
193
193
  FileTypeExtension: jpg
194
194
  MIMEType: image/jpeg
@@ -272,7 +272,7 @@ result:
272
272
  BracketShotNumber: 0
273
273
  CanonImageType: CRW:EOS DIGITAL REBEL CMOS RAW
274
274
  CanonFirmwareVersion: Firmware Version 1.1.1
275
- SerialNumber: 560018150
275
+ SerialNumber: '0560018150'
276
276
  SerialNumberFormat: Format 1
277
277
  FileNumber: 118-1861
278
278
  OwnerName: Phil Harvey
@@ -303,12 +303,12 @@ result:
303
303
  AFPointsInFocus: "(none)"
304
304
  ThumbnailImageValidArea: 0 159 7 112
305
305
  UserComment: ''
306
- FlashpixVersion: 100
306
+ FlashpixVersion: '0100'
307
307
  ColorSpace: sRGB
308
308
  ExifImageWidth: 160
309
309
  ExifImageHeight: 120
310
310
  InteropIndex: THM - DCF thumbnail file
311
- InteropVersion: 100
311
+ InteropVersion: '0100'
312
312
  RelatedImageWidth: 3072
313
313
  RelatedImageHeight: 2048
314
314
  FocalPlaneXResolution: 3443.946188
@@ -347,8 +347,8 @@ result:
347
347
  ---
348
348
  sample: read test.jpg
349
349
  result:
350
- ExifToolVersion: 11.7
351
- FileSize: 46 kB
350
+ ExifToolVersion: 12.26
351
+ FileSize: 46 KiB
352
352
  FileType: JPEG
353
353
  FileTypeExtension: jpg
354
354
  MIMEType: image/jpeg
@@ -409,7 +409,7 @@ result:
409
409
  ColorTemperature: 0
410
410
  LensType: Minolta AF 28-135mm F4-4.5 or Other Lens
411
411
  UserComment: ''
412
- FlashpixVersion: 100
412
+ FlashpixVersion: '0100'
413
413
  ColorSpace: sRGB
414
414
  ExifImageWidth: 3008
415
415
  ExifImageHeight: 2000
@@ -422,7 +422,7 @@ result:
422
422
  Contrast: Normal
423
423
  Saturation: Normal
424
424
  Sharpness: Normal
425
- PrintIMVersion: 300
425
+ PrintIMVersion: '0300'
426
426
  Compression: JPEG (old-style)
427
427
  ThumbnailOffset: 39274
428
428
  ThumbnailLength: 1820
@@ -457,8 +457,8 @@ result:
457
457
  ---
458
458
  sample: read test_coordinates.jpg
459
459
  result:
460
- ExifToolVersion: 11.7
461
- FileSize: 251 kB
460
+ ExifToolVersion: 12.26
461
+ FileSize: 251 KiB
462
462
  FileType: JPEG
463
463
  FileTypeExtension: jpg
464
464
  MIMEType: image/jpeg
@@ -487,7 +487,7 @@ result:
487
487
  FocalLength: 4.1 mm
488
488
  SubjectArea: 519 403 239 180
489
489
  UserComment: clip
490
- FlashpixVersion: 100
490
+ FlashpixVersion: '0100'
491
491
  ColorSpace: sRGB
492
492
  ExifImageWidth: 1280
493
493
  ExifImageHeight: 720
@@ -529,7 +529,7 @@ result:
529
529
  ---
530
530
  sample: read test_encodings.jpg
531
531
  result:
532
- ExifToolVersion: 11.7
532
+ ExifToolVersion: 12.26
533
533
  FileSize: 660 bytes
534
534
  FileType: JPEG
535
535
  FileTypeExtension: jpg
@@ -548,8 +548,8 @@ result:
548
548
  ---
549
549
  sample: read test_special_dates.jpg
550
550
  result:
551
- ExifToolVersion: 11.7
552
- FileSize: 3.7 kB
551
+ ExifToolVersion: 12.26
552
+ FileSize: 3.7 KiB
553
553
  FileType: JPEG
554
554
  FileTypeExtension: jpg
555
555
  MIMEType: image/jpeg
@@ -559,10 +559,10 @@ result:
559
559
  ResolutionUnit: inches
560
560
  ModifyDate: false
561
561
  YCbCrPositioning: Centered
562
- ExifVersion: 220
562
+ ExifVersion: '0220'
563
563
  DateTimeOriginal: 1961-08-13 12:08:25.000000000 +01:00
564
564
  ComponentsConfiguration: Y, Cb, Cr, -
565
- FlashpixVersion: 100
565
+ FlashpixVersion: '0100'
566
566
  ColorSpace: Uncalibrated
567
567
  PreviewDateTime: 1961-08-13 12:08:25.000000000 +01:00
568
568
  ImageWidth: 300
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.2
4
+ version: 2.10.4
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-06-29 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.2.15
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).