Module: ExiftoolVendored
- Defined in:
- lib/exiftool_vendored.rb,
lib/exiftool_vendored/version.rb,
lib/exiftool_vendored/version_extractor.rb
Overview
This is only used by the rake ‘update_exiftool’ task.
Constant Summary collapse
- VERSION =
Gem::Version.new('11.76.0')
- PATCHLEVEL =
0
Class Method Summary collapse
- .extract_version ⇒ Object
- .path_to_exiftool ⇒ Object
- .path_to_exiftool_home ⇒ Object
- .set_exiftool_command ⇒ Object
Class Method Details
.extract_version ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/exiftool_vendored/version_extractor.rb', line 7 def self.extract_version require 'exiftool' require 'exiftool_vendored' ExiftoolVendored.set_exiftool_command # < in case it was already run version = ::Exiftool.exiftool_version raise "version is missing from #{dirname}" unless version.to_f.positive? "#{version}.#{PATCHLEVEL}" rescue StandardError => e raise "Cannot extract version: #{e}" end |
.path_to_exiftool ⇒ Object
12 13 14 |
# File 'lib/exiftool_vendored.rb', line 12 def self.path_to_exiftool File.('../bin/exiftool', __dir__) end |
.path_to_exiftool_home ⇒ Object
8 9 10 |
# File 'lib/exiftool_vendored.rb', line 8 def self.path_to_exiftool_home File.('../bin', __dir__) end |
.set_exiftool_command ⇒ Object
16 17 18 |
# File 'lib/exiftool_vendored.rb', line 16 def self.set_exiftool_command Exiftool.command = ExiftoolVendored.path_to_exiftool end |