aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/cli/config.rb6
-rw-r--r--lib/bundler/dep_proxy.rb3
-rw-r--r--lib/bundler/installer/parallel_installer.rb3
-rw-r--r--lib/bundler/lockfile_parser.rb13
-rw-r--r--lib/bundler/rubygems_integration.rb6
-rw-r--r--lib/bundler/spec_set.rb4
6 files changed, 24 insertions, 11 deletions
diff --git a/lib/bundler/cli/config.rb b/lib/bundler/cli/config.rb
index 91633b02..0caabfb0 100644
--- a/lib/bundler/cli/config.rb
+++ b/lib/bundler/cli/config.rb
@@ -13,9 +13,11 @@ module Bundler
peek = args.shift
if peek && peek =~ /^\-\-/
- name, scope = args.shift, $'
+ name = args.shift
+ scope = $'
else
- name, scope = peek, "global"
+ name = peek
+ scope = "global"
end
unless name
diff --git a/lib/bundler/dep_proxy.rb b/lib/bundler/dep_proxy.rb
index 8d960835..378cefa1 100644
--- a/lib/bundler/dep_proxy.rb
+++ b/lib/bundler/dep_proxy.rb
@@ -3,7 +3,8 @@ module Bundler
attr_reader :__platform, :dep
def initialize(dep, platform)
- @dep, @__platform = dep, platform
+ @dep = dep
+ @__platform = platform
end
def hash
diff --git a/lib/bundler/installer/parallel_installer.rb b/lib/bundler/installer/parallel_installer.rb
index b962563a..84bdb425 100644
--- a/lib/bundler/installer/parallel_installer.rb
+++ b/lib/bundler/installer/parallel_installer.rb
@@ -4,7 +4,8 @@ class ParallelInstaller
class SpecInstallation
attr_accessor :spec, :name, :post_install_message, :state
def initialize(spec)
- @spec, @name = spec, spec.name
+ @spec = spec
+ @name = spec.name
@state = :none
@post_install_message = ""
end
diff --git a/lib/bundler/lockfile_parser.rb b/lib/bundler/lockfile_parser.rb
index e44f9420..78d5cb9d 100644
--- a/lib/bundler/lockfile_parser.rb
+++ b/lib/bundler/lockfile_parser.rb
@@ -92,7 +92,8 @@ module Bundler
case line
when GIT, GEM, PATH
@current_source = nil
- @opts, @type = {}, line
+ @opts = {}
+ @type = line
when SPECS
case @type
when PATH
@@ -137,7 +138,9 @@ module Bundler
def parse_dependency(line)
if line =~ NAME_VERSION_2
- name, version, pinned = $1, $2, $4
+ name = $1
+ version = $2
+ pinned = $4
version = version.split(",").map(&:strip) if version
dep = Bundler::Dependency.new(name, version)
@@ -162,7 +165,8 @@ module Bundler
def parse_spec(line)
if line =~ NAME_VERSION_4
- name, version = $1, Gem::Version.new($2)
+ name = $1
+ version = Gem::Version.new($2)
platform = $3 ? Gem::Platform.new($3) : Gem::Platform::RUBY
@current_spec = LazySpecification.new(name, version, platform)
@current_spec.source = @current_source
@@ -171,7 +175,8 @@ module Bundler
# duplicate GIT sections)
@specs[@current_spec.identifier] ||= @current_spec
elsif line =~ NAME_VERSION_6
- name, version = $1, $2
+ name = $1
+ version = $2
version = version.split(",").map(&:strip) if version
dep = Gem::Dependency.new(name, version)
@current_spec.dependencies << dep
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index d8c3b8d0..b33d76b1 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -521,7 +521,8 @@ module Bundler
# you call Gem::Installer#install with an :install_dir set. We have to
# change it back for our sudo mode to work.
def preserve_paths
- old_dir, old_path = gem_dir, gem_path
+ old_dir = gem_dir
+ old_path = gem_path
yield
Gem.use_paths(old_dir, old_path)
end
@@ -583,7 +584,8 @@ module Bundler
def download_gem(spec, uri, path)
require "resolv"
uri = Bundler.settings.mirror_for(uri)
- proxy, dns = configuration[:http_proxy], Resolv::DNS.new
+ proxy = configuration[:http_proxy]
+ dns = Resolv::DNS.new
fetcher = Gem::RemoteFetcher.new(proxy, dns)
fetcher.download(spec, uri, path)
end
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb
index bf064eb2..855a6e33 100644
--- a/lib/bundler/spec_set.rb
+++ b/lib/bundler/spec_set.rb
@@ -14,7 +14,9 @@ module Bundler
end
def for(dependencies, skip = [], check = false, match_current_platform = false)
- handled, deps, specs = {}, dependencies.dup, []
+ handled = {}
+ deps = dependencies.dup
+ specs = []
skip << "bundler"
until deps.empty?