diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-03-04 17:26:50 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-03-04 19:25:20 +0100 |
commit | 4706e4a00f686ca64783de7b86aa67f3a40fb833 (patch) | |
tree | 6cfd759c45bc66c80776d85471928a3b85774d11 | |
parent | 900f5f1e6285de591e89664cffe5818e0b5d88d0 (diff) | |
download | bundler-4706e4a00f686ca64783de7b86aa67f3a40fb833.tar.gz |
Auto-correct `Style/StderrPuts` rubocop offenses
-rw-r--r-- | .rubocop_todo.yml | 9 | ||||
-rwxr-xr-x | bin/rake | 2 | ||||
-rw-r--r-- | lib/bundler/graph.rb | 2 | ||||
-rw-r--r-- | spec/support/artifice/compact_index_api_missing.rb | 2 | ||||
-rw-r--r-- | spec/support/artifice/endpoint_api_missing.rb | 2 |
5 files changed, 4 insertions, 13 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index ef3186ee8d..28d8f79b8c 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -579,15 +579,6 @@ Style/RescueStandardError: Style/SafeNavigation: Enabled: false -# Offense count: 4 -# Cop supports --auto-correct. -Style/StderrPuts: - Exclude: - - 'bin/rake' - - 'lib/bundler/graph.rb' - - 'spec/support/artifice/compact_index_api_missing.rb' - - 'spec/support/artifice/endpoint_api_missing.rb' - # Offense count: 57 # Cop supports --auto-correct. # Configuration parameters: MinSize. @@ -11,7 +11,7 @@ unless ARGV[0] == "spec:deps" begin gem dep.name, dep.requirement rescue Gem::LoadError => e - $stderr.puts "#{e.message} (#{e.class})" + warn "#{e.message} (#{e.class})" end end diff --git a/lib/bundler/graph.rb b/lib/bundler/graph.rb index 648754df29..5644e41079 100644 --- a/lib/bundler/graph.rb +++ b/lib/bundler/graph.rb @@ -142,7 +142,7 @@ module Bundler g.output @output_format.to_sym => "#{@output_file}.#{@output_format}" Bundler.ui.info "#{@output_file}.#{@output_format}" rescue ArgumentError => e - $stderr.puts "Unsupported output format. See Ruby-Graphviz/lib/graphviz/constants.rb" + warn "Unsupported output format. See Ruby-Graphviz/lib/graphviz/constants.rb" raise e end end diff --git a/spec/support/artifice/compact_index_api_missing.rb b/spec/support/artifice/compact_index_api_missing.rb index d4e68c38e8..94e6b73000 100644 --- a/spec/support/artifice/compact_index_api_missing.rb +++ b/spec/support/artifice/compact_index_api_missing.rb @@ -6,7 +6,7 @@ Artifice.deactivate class CompactIndexApiMissing < CompactIndexAPI get "/fetch/actual/gem/:id" do - $stderr.puts params[:id] + warn params[:id] if params[:id] == "rack-1.0.gemspec.rz" halt 404 else diff --git a/spec/support/artifice/endpoint_api_missing.rb b/spec/support/artifice/endpoint_api_missing.rb index 95db8e2a7e..2ada0dc553 100644 --- a/spec/support/artifice/endpoint_api_missing.rb +++ b/spec/support/artifice/endpoint_api_missing.rb @@ -6,7 +6,7 @@ Artifice.deactivate class EndpointApiMissing < Endpoint get "/fetch/actual/gem/:id" do - $stderr.puts params[:id] + warn params[:id] if params[:id] == "rack-1.0.gemspec.rz" halt 404 else |