Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixing some useless assignment warnings

  • Loading branch information...
commit 4d6c3daeaa7e64408cd43b7823c0abc23c2b72c7 1 parent 2418bc9
@tenderlove tenderlove authored indirect committed
View
7 lib/bundler/gem_helper.rb
@@ -51,7 +51,7 @@ def build_gem
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 @@ def release_gem
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 @@ def guard_clean
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
View
2  lib/bundler/index.rb
@@ -104,7 +104,7 @@ def search_by_spec(spec)
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)
View
4 lib/bundler/resolver.rb
@@ -407,7 +407,7 @@ def gem_message(requirement)
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 @@ def error_message
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
View
2  spec/install/gems/groups_spec.rb
@@ -45,7 +45,7 @@
end
it "removes old groups when new groups are set up" do
- out = run <<-RUBY, :emo, :expect_err => true
+ run <<-RUBY, :emo, :expect_err => true
Bundler.setup(:default)
require 'thin'; puts THIN
RUBY
View
2  spec/install/gems/platform_spec.rb
@@ -177,7 +177,7 @@
end
it "does not blow up on sources with all platform-excluded specs" do
- git = build_git "foo"
+ build_git "foo"
install_gemfile <<-G
platform :#{not_local_tag} do
View
2  spec/quality_spec.rb
@@ -49,7 +49,7 @@ def check_for_extra_spaces(filename)
it "can still be built" do
Dir.chdir(root) do
`gem build bundler.gemspec`
- $?.should == 0
+ check $?.should == 0
# clean up the .gem generated
system("rm bundler-#{Bundler::VERSION}.gem")
View
2  spec/runtime/setup_spec.rb
@@ -68,7 +68,7 @@
gem "rack"
G
- lockfile = File.read(bundled_app("Gemfile.lock"))
+ File.read(bundled_app("Gemfile.lock"))
FileUtils.rm(bundled_app("Gemfile.lock"))
View
2  spec/support/builders.rb
@@ -489,7 +489,7 @@ def _build(options)
end
class GitUpdater < LibBuilder
- WINDOWS = Config::CONFIG["host_os"] =~ %r!(msdos|mswin|djgpp|mingw)!
+ WINDOWS = RbConfig::CONFIG["host_os"] =~ %r!(msdos|mswin|djgpp|mingw)!
NULL = WINDOWS ? "NUL" : "/dev/null"
def silently(str)
Please sign in to comment.
Something went wrong with that request. Please try again.