Module: ExiftoolVendored
- Defined in:
- lib/exiftool_vendored.rb,
lib/exiftool_vendored/version.rb,
lib/exiftool_vendored/version_extractor.rb
Constant Summary collapse
- VERSION =
Gem::Version.new('10.31.0')
- PATCHLEVEL =
0
Class Method Summary collapse
-
.extract_version ⇒ Object
This is only used by the rake ‘update_exiftool’ task.
- .path_to_exiftool ⇒ Object
- .path_to_exiftool_home ⇒ Object
- .set_exiftool_command ⇒ Object
Class Method Details
.extract_version ⇒ Object
This is only used by the rake ‘update_exiftool’ task.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/exiftool_vendored/version_extractor.rb', line 5 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 > 0 "#{version}.#{PATCHLEVEL}" rescue StandardError => e raise "Cannot extract version: #{e}" end |
.path_to_exiftool ⇒ Object
10 11 12 |
# File 'lib/exiftool_vendored.rb', line 10 def self.path_to_exiftool Dir[File.('../../bin/*/exiftool', __FILE__)].sort.last end |
.path_to_exiftool_home ⇒ Object
6 7 8 |
# File 'lib/exiftool_vendored.rb', line 6 def self.path_to_exiftool_home Dir[File.('../../bin/*', __FILE__)].sort.last end |
.set_exiftool_command ⇒ Object
14 15 16 |
# File 'lib/exiftool_vendored.rb', line 14 def self.set_exiftool_command Exiftool.command = ExiftoolVendored.path_to_exiftool end |