summaryrefslogtreecommitdiff
path: root/lib/bundler
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-01-18 14:12:18 -0800
committerAndre Arko <andre@arko.net>2011-01-18 14:39:27 -0800
commit4d6c3daeaa7e64408cd43b7823c0abc23c2b72c7 (patch)
tree2e514756d0f5f7a928b15f1049acabf68bd011ed /lib/bundler
parent2418bc9755ecca2ae91d846a9a444ec3d2a662a7 (diff)
downloadbundler-4d6c3daeaa7e64408cd43b7823c0abc23c2b72c7.tar.gz
fixing some useless assignment warnings
Diffstat (limited to 'lib/bundler')
-rw-r--r--lib/bundler/gem_helper.rb7
-rw-r--r--lib/bundler/index.rb2
-rw-r--r--lib/bundler/resolver.rb4
3 files changed, 6 insertions, 7 deletions
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb
index 5cc5c82503..b2510f60de 100644
--- a/lib/bundler/gem_helper.rb
+++ b/lib/bundler/gem_helper.rb
@@ -51,7 +51,7 @@ module Bundler
def install_gem
built_gem_path = build_gem
- out, code = sh_with_code("gem install #{built_gem_path}")
+ out, _ = sh_with_code("gem install #{built_gem_path}")
raise "Couldn't install gem, run `gem install #{built_gem_path}' for more detailed output" unless out[/Successfully installed/]
Bundler.ui.confirm "#{name} (#{version}) installed"
end
@@ -68,7 +68,7 @@ module Bundler
protected
def rubygem_push(path)
- out, status = sh("gem push #{path}")
+ out, _ = sh("gem push #{path}")
raise "Gem push failed due to lack of RubyGems.org credentials." if out[/Enter your RubyGems.org credentials/]
Bundler.ui.confirm "Pushed #{name} #{version} to rubygems.org"
end
@@ -100,8 +100,7 @@ module Bundler
end
def clean?
- out, code = sh_with_code("git diff --exit-code")
- code == 0
+ sh_with_code("git diff --exit-code")[1] == 0
end
def tag_version
diff --git a/lib/bundler/index.rb b/lib/bundler/index.rb
index 1ca9af19a0..b2105cf682 100644
--- a/lib/bundler/index.rb
+++ b/lib/bundler/index.rb
@@ -104,7 +104,7 @@ module Bundler
def same_version?(a, b)
regex = /^(.*?)(?:\.0)*$/
- ret = a.to_s[regex, 1] == b.to_s[regex, 1]
+ a.to_s[regex, 1] == b.to_s[regex, 1]
end
def spec_satisfies_dependency?(spec, dep)
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb
index 0a27c09227..4948357c9b 100644
--- a/lib/bundler/resolver.rb
+++ b/lib/bundler/resolver.rb
@@ -407,7 +407,7 @@ module Bundler
end
def error_message
- output = errors.inject("") do |o, (conflict, (origin, requirement))|
+ errors.inject("") do |o, (conflict, (origin, requirement))|
# origin is the SpecSet of specs from the Gemfile that is conflicted with
if origin
@@ -422,7 +422,7 @@ module Bundler
o << " Current Bundler version:\n"
newer_bundler_required = requirement.requirement > Gem::Requirement.new(origin.version)
# If the origin is a LockfileParser, it does not respond_to :required_by
- elsif !origin.respond_to?(:required_by) || !(required_by = origin.required_by.first)
+ elsif !origin.respond_to?(:required_by) || !(origin.required_by.first)
o << " In snapshot (Gemfile.lock):\n"
end