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 ~> 0.87.0 to ~> 0.89.1 #5

Merged
merged 1 commit into from
Aug 11, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Layout/LineLength:
Enabled: false

Metrics/AbcSize:
Max: 39.29
Max: 44.11

Metrics/CyclomaticComplexity:
Max: 19
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ end
group :development do
gem 'rake', '~> 13.0'
gem 'rspec', '~> 3.9'
gem 'rubocop', '~> 0.87.0'
gem 'rubocop', '~> 0.89.1'
gem 'rubocop-performance', '~> 1.7'
gem 'rubocop-rspec', '~> 1.41'
gem 'truthy', '~> 1.0'
Expand Down
2 changes: 1 addition & 1 deletion bin/coveralls
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

lib = File.expand_path(File.dirname(__FILE__) + '/../lib')
lib = File.expand_path('../lib', __dir__)
$LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib)

require 'coveralls'
Expand Down
4 changes: 2 additions & 2 deletions lib/coveralls/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def disable_net_blockers!
begin
require 'webmock'

allow = WebMock::Config.instance.allow || []
WebMock::Config.instance.allow = [*allow].push API_HOST
allow = Array(WebMock::Config.instance.allow)
WebMock::Config.instance.allow = allow.push API_HOST
rescue LoadError
rescue StandardError => e
# TODO: Add error action
Expand Down
2 changes: 1 addition & 1 deletion lib/coveralls/rake/task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Coveralls
class RakeTask < ::Rake::TaskLib
include ::Rake::DSL if defined?(::Rake::DSL)

def initialize(*_args)
def initialize(*_args) # rubocop:disable Lint/MissingSuper
namespace :coveralls do
desc 'Push latest coverage results to Coveralls.io'
task :push do
Expand Down
8 changes: 3 additions & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def setup_formatter

def stub_api_post
body = '{"message":"","url":""}'
stub_request(:post, Coveralls::API::API_BASE + '/jobs').with(
stub_request(:post, "#{Coveralls::API::API_BASE}/jobs").with(
headers: {
'Accept' => '*/*; q=0.5, application/xml',
'Accept-Encoding' => 'gzip, deflate',
Expand All @@ -60,12 +60,10 @@ def stub_api_post
).to_return(status: 200, body: body, headers: {})
end

def silence
def silence(&block)
return yield if ENV['silence'] == 'false'

silence_stream(STDOUT) do
yield
end
silence_stream($stdout, &block)
end

def silence_stream(stream)
Expand Down