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

Class Method Details

.extract_versionObject



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_exiftoolObject



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

def self.path_to_exiftool
  File.expand_path('../bin/exiftool', __dir__)
end

.path_to_exiftool_homeObject



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

def self.path_to_exiftool_home
  File.expand_path('../bin', __dir__)
end

.set_exiftool_commandObject



16
17
18
# File 'lib/exiftool_vendored.rb', line 16

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