aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/installer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/installer.rb')
-rw-r--r--lib/bundler/installer.rb30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index 38869c09..432cdd01 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -1,6 +1,6 @@
-require 'erb'
-require 'rubygems/dependency_installer'
-require 'bundler/worker'
+require "erb"
+require "rubygems/dependency_installer"
+require "bundler/worker"
module Bundler
class Installer < Environment
@@ -125,7 +125,7 @@ module Bundler
if options.any?
Bundler.ui.warn "#{spec.name} has no executables, but you may want " +
"one from a gem it depends on."
- options.each{|name,bins| Bundler.ui.warn " #{name} has: #{bins.join(', ')}" }
+ options.each{|name,bins| Bundler.ui.warn " #{name} has: #{bins.join(", ")}" }
else
Bundler.ui.warn "There are no executables for the gem #{spec.name}."
end
@@ -134,7 +134,7 @@ module Bundler
# double-assignment to avoid warnings about variables that will be used by ERB
bin_path = bin_path = Bundler.bin_path
- template = template = File.read(File.expand_path('../templates/Executable', __FILE__))
+ template = template = File.read(File.expand_path("../templates/Executable", __FILE__))
relative_gemfile_path = relative_gemfile_path = Bundler.default_gemfile.relative_path_from(bin_path)
ruby_command = ruby_command = Thor::Util.ruby_command
@@ -148,8 +148,8 @@ module Bundler
next
end
- File.open(binstub_path, 'w', 0777 & ~File.umask) do |f|
- f.puts ERB.new(template, nil, '-').result(binding)
+ File.open(binstub_path, "w", 0777 & ~File.umask) do |f|
+ f.puts ERB.new(template, nil, "-").result(binding)
end
end
@@ -158,10 +158,10 @@ module Bundler
when 1
Bundler.ui.warn "Skipped #{exists[0]} since it already exists."
when 2
- Bundler.ui.warn "Skipped #{exists.join(' and ')} since they already exist."
+ Bundler.ui.warn "Skipped #{exists.join(" and ")} since they already exist."
else
- items = exists[0...-1].empty? ? nil : exists[0...-1].join(', ')
- skipped = [items, exists[-1]].compact.join(' and ')
+ items = exists[0...-1].empty? ? nil : exists[0...-1].join(", ")
+ skipped = [items, exists[-1]].compact.join(" and ")
Bundler.ui.warn "Skipped #{skipped} since they already exist."
end
Bundler.ui.warn "If you want to overwrite skipped stubs, use --force."
@@ -178,7 +178,7 @@ module Bundler
force = options["force"]
jobs = [Bundler.settings[:jobs].to_i-1, 1].max
if jobs > 1 && can_install_in_parallel?
- require 'bundler/installer/parallel_installer'
+ require "bundler/installer/parallel_installer"
install_in_parallel jobs, options[:standalone], force
else
install_sequentially options[:standalone], force
@@ -199,15 +199,15 @@ module Bundler
def generate_standalone_bundler_executable_stubs(spec)
# double-assignment to avoid warnings about variables that will be used by ERB
bin_path = Bundler.bin_path
- template = File.read(File.expand_path('../templates/Executable.standalone', __FILE__))
+ template = File.read(File.expand_path("../templates/Executable.standalone", __FILE__))
ruby_command = ruby_command = Thor::Util.ruby_command
spec.executables.each do |executable|
next if executable == "bundle"
standalone_path = standalone_path = Pathname(Bundler.settings[:path]).expand_path.relative_path_from(bin_path)
executable_path = executable_path = Pathname(spec.full_gem_path).join(spec.bindir, executable).relative_path_from(bin_path)
- File.open "#{bin_path}/#{executable}", 'w', 0755 do |f|
- f.puts ERB.new(template, nil, '-').result(binding)
+ File.open "#{bin_path}/#{executable}", "w", 0755 do |f|
+ f.puts ERB.new(template, nil, "-").result(binding)
end
end
end
@@ -232,7 +232,7 @@ module Bundler
spec.require_paths.each do |path|
full_path = File.join(spec.full_gem_path, path)
gem_path = Pathname.new(full_path).relative_path_from(Bundler.root.join(bundler_path))
- paths << gem_path.to_s.sub("#{Bundler.ruby_version.engine}/#{RbConfig::CONFIG['ruby_version']}", '#{ruby_engine}/#{ruby_version}')
+ paths << gem_path.to_s.sub("#{Bundler.ruby_version.engine}/#{RbConfig::CONFIG["ruby_version"]}", "#{ruby_engine}/#{ruby_version}")
end
end