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.01.0')
PATCHLEVEL =
0

Class Method Summary collapse

Class Method Details

.extract_versionObject

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_exiftoolObject



9
10
11
# File 'lib/exiftool_vendored.rb', line 9

def self.path_to_exiftool
  Dir[File.expand_path('../../bin/*/exiftool', __FILE__)].sort.last
end

.path_to_exiftool_homeObject



5
6
7
# File 'lib/exiftool_vendored.rb', line 5

def self.path_to_exiftool_home
  Dir[File.expand_path('../../bin/*', __FILE__)].sort.last
end

.set_exiftool_commandObject



13
14
15
# File 'lib/exiftool_vendored.rb', line 13

def self.set_exiftool_command
  Exiftool.command = ExiftoolVendored.path_to_exiftool
end