Skip to content

Commit

Permalink
Fix reek in ruby version checker
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfioravanti committed Mar 20, 2017
1 parent b31a1b7 commit 01ee31c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/resume/ruby_version_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ def request_to_install_latest_ruby
"or higher to generate resume."
require "open3"
puts "Your Ruby version is #{user_ruby_version}"
exit(1)
rescue LoadError
# NOTE: LoadError will likely occur if someone attempts to run
# this with Ruby 1.8.7 and they don't have rubygems installed
puts "Your Ruby version is likely far too old to generate the resume."
ensure
exit(1)
end
private_class_method :request_to_install_latest_ruby
Expand Down
1 change: 1 addition & 0 deletions spec/lib/resume/ruby_version_checker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ module Resume
let(:message) do
"Please install Ruby version #{required_ruby_version} or higher "\
"to generate resume.\n"\
"Your Ruby version is likely far too old to generate the resume.\n"
end

before do
Expand Down

0 comments on commit 01ee31c

Please sign in to comment.