Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rubocop requirement from 1.11.0 to 1.12.0 #226

Merged
merged 2 commits into from
Apr 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ gem "minitest", "~> 5.11"
gem "minitest-ci", "~> 3.4"
gem "minitest-reporters", "~> 1.3"
gem "rake", "~> 13.0"
gem "rubocop", "1.11.0"
gem "rubocop", "1.12.0"
gem "rubocop-minitest", "0.11.1"
gem "rubocop-packaging", "0.5.1"
gem "rubocop-performance", "1.10.2"
Expand Down
16 changes: 7 additions & 9 deletions lib/tomo/error/suggestions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@ def any?
end

def to_a
@_suggestions ||= begin
if defined?(DidYouMean::SpellChecker)
checker = DidYouMean::SpellChecker.new(dictionary: dictionary)
suggestions = checker.correct(word)
suggestions || []
else
[]
end
end
@_suggestions ||= if defined?(DidYouMean::SpellChecker)
checker = DidYouMean::SpellChecker.new(dictionary: dictionary)
suggestions = checker.correct(word)
suggestions || []
else
[]
end
end

def to_console
Expand Down
4 changes: 1 addition & 3 deletions lib/tomo/testing/docker_image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ def set_up_build_dir
end

def build_dir
@_build_dir ||= begin
File.join(Dir.tmpdir, "tomo_docker_#{SecureRandom.hex(8)}")
end
@_build_dir ||= File.join(Dir.tmpdir, "tomo_docker_#{SecureRandom.hex(8)}")
end
end
end
Expand Down