summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErick Sasse <esasse@gmail.com>2015-07-20 18:15:59 -0300
committerErick Sasse <esasse@gmail.com>2015-07-20 18:15:59 -0300
commit3e5b19f38ac60ea656883fb49af0b8b59ef3edce (patch)
treead5e9c0dcbbc53d229c302ac6ea7aaeb3072353c
parent336919ada2c14ddec49419529a30f268bed11da4 (diff)
downloadbundler-rubocop-fix.tar.gz
Fix Lint/StringConversionInInterpolationrubocop-fix
-rw-r--r--.rubocop_todo.yml5
-rw-r--r--lib/bundler/graph.rb2
-rw-r--r--lib/bundler/source/git.rb4
-rw-r--r--lib/bundler/source/path.rb4
-rw-r--r--spec/support/less_than_proc.rb2
5 files changed, 6 insertions, 11 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 24a617e209..7617717b22 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -25,11 +25,6 @@ Lint/NonLocalExitFromIterator:
Lint/RescueException:
Enabled: false
-# Offense count: 6
-# Cop supports --auto-correct.
-Lint/StringConversionInInterpolation:
- Enabled: false
-
# Offense count: 15
# Cop supports --auto-correct.
Lint/UnusedBlockArgument:
diff --git a/lib/bundler/graph.rb b/lib/bundler/graph.rb
index 78d6f21b9d..3806751286 100644
--- a/lib/bundler/graph.rb
+++ b/lib/bundler/graph.rb
@@ -75,7 +75,7 @@ module Bundler
when :node
if symbol_or_string_or_dependency.is_a?(Gem::Dependency)
label = symbol_or_string_or_dependency.name.dup
- label << "\n#{symbol_or_string_or_dependency.to_spec.version.to_s}" if @show_version
+ label << "\n#{symbol_or_string_or_dependency.to_spec.version}" if @show_version
else
label = symbol_or_string_or_dependency.to_s
end
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb
index a10294de5a..d4cd916b89 100644
--- a/lib/bundler/source/git.rb
+++ b/lib/bundler/source/git.rb
@@ -154,7 +154,7 @@ module Bundler
end
def install(spec, force = false)
- Bundler.ui.info "Using #{version_message(spec)} from #{to_s}"
+ Bundler.ui.info "Using #{version_message(spec)} from #{self}"
if requires_checkout? && !@copied && !force
Bundler.ui.debug " * Checking out revision: #{ref}"
@@ -182,7 +182,7 @@ module Bundler
super
rescue PathError => e
Bundler.ui.trace e
- raise GitError, "#{to_s} is not yet checked out. Run `bundle install` first."
+ raise GitError, "#{self} is not yet checked out. Run `bundle install` first."
end
# This is the path which is going to contain a cache
diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb
index a1d821d120..4cd7361d5b 100644
--- a/lib/bundler/source/path.rb
+++ b/lib/bundler/source/path.rb
@@ -69,7 +69,7 @@ module Bundler
end
def install(spec, force = false)
- Bundler.ui.info "Using #{version_message(spec)} from #{to_s}"
+ Bundler.ui.info "Using #{version_message(spec)} from #{self}"
generate_bin(spec, :disable_extensions)
nil # no post-install message
end
@@ -80,7 +80,7 @@ module Bundler
return if expand(@original_path).to_s.index(Bundler.root.to_s) == 0
unless @original_path.exist?
- raise GemNotFound, "Can't cache gem #{version_message(spec)} because #{to_s} is missing!"
+ raise GemNotFound, "Can't cache gem #{version_message(spec)} because #{self} is missing!"
end
FileUtils.rm_rf(app_cache_path)
diff --git a/spec/support/less_than_proc.rb b/spec/support/less_than_proc.rb
index 04195dfbae..5098befbf1 100644
--- a/spec/support/less_than_proc.rb
+++ b/spec/support/less_than_proc.rb
@@ -13,6 +13,6 @@ class LessThanProc < Proc
end
def inspect
- "\"=< #{present.to_s}\""
+ "\"=< #{present}\""
end
end