diff --git a/.rubocop.yml b/.rubocop.yml index f42b629..6f69cdd 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -3,7 +3,7 @@ require: - rubocop-rake AllCops: - TargetRubyVersion: 2.7 + TargetRubyVersion: 3.0 NewCops: enable Style/SpecialGlobalVars: diff --git a/Gemfile b/Gemfile index 7a02df0..44ee141 100644 --- a/Gemfile +++ b/Gemfile @@ -4,3 +4,18 @@ source 'https://rubygems.org' # Specify your gem's dependencies in exiftoolr.gemspec gemspec + +group :development do + gem 'bundler' + gem 'minitest' + gem 'minitest-great_expectations' + gem 'minitest-reporters' unless ENV['CI'] + gem 'rake' + gem 'rubocop' + gem 'rubocop-minitest' + gem 'rubocop-rake' + gem 'simplecov' + gem 'simplecov-console' + gem 'simplecov_json_formatter' + gem 'yard' +end diff --git a/exiftool.gemspec b/exiftool.gemspec index 15382e0..58189e9 100644 --- a/exiftool.gemspec +++ b/exiftool.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |spec| spec.metadata['rubygems_mfa_required'] = 'true' - spec.required_ruby_version = '>= 2.7' + spec.required_ruby_version = '>= 3.0' spec.files = `git ls-files -- lib`.split($/) spec.require_paths = %w[lib] @@ -24,16 +24,4 @@ Gem::Specification.new do |spec| spec.requirements << 'ExifTool (see http://exiftool.org)' spec.add_dependency 'json' - spec.add_development_dependency 'bundler' - spec.add_development_dependency 'minitest' - spec.add_development_dependency 'minitest-great_expectations' - spec.add_development_dependency 'minitest-reporters' unless ENV['CI'] - spec.add_development_dependency 'rake' - spec.add_development_dependency 'rubocop' - spec.add_development_dependency 'rubocop-minitest' - spec.add_development_dependency 'rubocop-rake' - spec.add_development_dependency 'simplecov' - spec.add_development_dependency 'simplecov-console' - spec.add_development_dependency 'simplecov_json_formatter' - spec.add_development_dependency 'yard' end diff --git a/lib/exiftool/field_parser.rb b/lib/exiftool/field_parser.rb index 45a299e..0c2572b 100644 --- a/lib/exiftool/field_parser.rb +++ b/lib/exiftool/field_parser.rb @@ -6,9 +6,9 @@ class Exiftool # Exiftool FiledParser Class class FieldParser WORD_BOUNDARY_RES = [/([A-Z\d]+)([A-Z][a-z])/, /([a-z\d])([A-Z])/].freeze - FRACTION_RE = %r{^(\d+)/(\d+)$}.freeze - YMD_RE = /\A(\d{4}):(\d{2}):(\d{2})\b/.freeze - ZERO_DATE_RE = /\A[+:0 ]+\z/.freeze + FRACTION_RE = %r{^(\d+)/(\d+)$} + YMD_RE = /\A(\d{4}):(\d{2}):(\d{2})\b/ + ZERO_DATE_RE = /\A[+:0 ]+\z/ attr_reader :key, :display_key, :sym_key, :raw_value