Rufo updated causes spec failures
I've noticed a few pipeline failures (including at https://gitlab.com/gitlab-org/labkit-ruby/merge_requests/27) with the following error when using bundle exec rake fix:
This is caused by rufo being updated to 0.10.0, which included this style decision: https://github.com/ruby-formatter/rufo/blob/master/CHANGELOG.md#changed-1
This looks like it's incompatible with rubocop:
Rubocop wants this format for a case statement:
request = case method
when :get
Net::HTTP::Get.new(url)
when :post
Net::HTTP::Post.new(url)
when :put
Net::HTTP::Put.new(url)
else
raise "Unknown method: #{method}"
end
While rufo changes that to
request = case method
when :get
Net::HTTP::Get.new(url)
when :post
Net::HTTP::Post.new(url)
when :put
Net::HTTP::Put.new(url)
else
raise "Unknown method: #{method}"
end
Edited by Bob Van Landuyt