diff --git a/.tool-versions b/.tool-versions index 0129093..27a8619 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -ruby 2.6.9 +ruby 3.4.5 diff --git a/imessage.gemspec b/imessage.gemspec index 8bfc2e5..bad914f 100644 --- a/imessage.gemspec +++ b/imessage.gemspec @@ -18,6 +18,7 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ['lib'] + spec.add_dependency 'ostruct' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec', '~> 3.3' end diff --git a/lib/imessage/parser.rb b/lib/imessage/parser.rb index 220982c..09b682a 100644 --- a/lib/imessage/parser.rb +++ b/lib/imessage/parser.rb @@ -29,7 +29,7 @@ def opt_parser(args) end opts.on("-a", "--attachment [ATTACHMENT]", String, "Add an attachment") do |attachment| - if File.exists?(attachment) + if File.exist?(attachment) args.attachment = File.expand_path(attachment) else puts "Can not find file #{attachment}"