diff --git a/Changelog b/Changelog index 999c42d..e06b03d 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,3 @@ -2.10.5 -- Fix a problem with frozen string in newer Ruby versions. - 2.10.4 - Maintenance release. diff --git a/lib/mini_exiftool.rb b/lib/mini_exiftool.rb index 8dc0e3b..9147d3d 100644 --- a/lib/mini_exiftool.rb +++ b/lib/mini_exiftool.rb @@ -27,7 +27,7 @@ # Simple OO access to the ExifTool command-line application. class MiniExiftool - VERSION = '2.10.5' + VERSION = '2.10.4' # Name of the ExifTool command-line application @@cmd = 'exiftool' @@ -147,14 +147,14 @@ def load filename_or_io end @values.clear @changed_values.clear - params = ['-j'] - params << ('-n' if @opts[:numerical]) - params << ('-e' unless @opts[:composite]) - params << ("-c #{escape(@opts[:coord_format])}" if @opts[:coord_format]) - params << ('-fast' if @opts[:fast]) - params << ('-fast2' if @opts[:fast2]) + params = '-j ' + params << (@opts[:numerical] ? '-n ' : '') + params << (@opts[:composite] ? '' : '-e ') + params << (@opts[:coord_format] ? "-c #{escape(@opts[:coord_format])}" : '') + params << (@opts[:fast] ? '-fast ' : '') + params << (@opts[:fast2] ? '-fast2 ' : '') params << generate_encoding_params - if run(cmd_gen(params.compact.join(' '), @filename)) + if run(cmd_gen(params, @filename)) parse_output else raise MiniExiftool::Error.new(@error_text) @@ -225,14 +225,14 @@ def save original_tag = MiniExiftool.original_tag(tag) arr_val = val.kind_of?(Array) ? val : [val] arr_val.map! {|e| convert_before_save(e)} - params = ['-q -P -overwrite_original'] - params << (arr_val.detect {|x| x.kind_of?(Numeric)} ? '-n' : '') - params << (@opts[:ignore_minor_errors] ? '-m' : '') + params = '-q -P -overwrite_original ' + params << (arr_val.detect {|x| x.kind_of?(Numeric)} ? '-n ' : '') + params << (@opts[:ignore_minor_errors] ? '-m ' : '') params << generate_encoding_params arr_val.each do |v| params << %Q(-#{original_tag}=#{escape(v)} ) end - result = run(cmd_gen(params.compact.join(' '), temp_filename)) + result = run(cmd_gen(params, temp_filename)) unless result all_ok = false @errors[tag] = @error_text.gsub(/Nothing to do.\n\z/, '').chomp @@ -545,11 +545,13 @@ def escape val end def generate_encoding_params - @@encoding_types.map do |enc_type| + params = '' + @@encoding_types.each do |enc_type| if enc_val = @opts[MiniExiftool.encoding_opt(enc_type)] - "-charset #{enc_type}=#{enc_val}" + params << "-charset #{enc_type}=#{enc_val} " end - end.compact.join(' ') + end + params end # Backport YAML.unsafe_load diff --git a/mini_exiftool.gemspec b/mini_exiftool.gemspec index 2ba6d0c..7ba75a2 100644 --- a/mini_exiftool.gemspec +++ b/mini_exiftool.gemspec @@ -1,5 +1,5 @@ # -*- encoding: utf-8 -*- -# stub: mini_exiftool 2.10.5 ruby lib +# stub: mini_exiftool 2.10.4 ruby lib # # This file is automatically generated by rim. # PLEASE DO NOT EDIT IT DIRECTLY! @@ -7,7 +7,7 @@ Gem::Specification.new do |s| s.name = "mini_exiftool" - s.version = "2.10.5" + s.version = "2.10.4" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.require_paths = ["lib"]