summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2013-01-06 17:12:31 -0800
committerAndre Arko <andre@arko.net>2013-01-06 17:12:31 -0800
commit8bbd5b7b9d2b78c312f66312e1d34e29de35ab04 (patch)
tree68b2fdbe07c2194f38099605674d2e34f9be95df
parent78e3eb9385f943a314863388a8652e3f1e737121 (diff)
downloadbundler-execless.tar.gz
-rw-r--r--lib/bundler/installer.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index 95a4f02dda..9e1ea6e27e 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -142,6 +142,21 @@ module Bundler
end
end
end
+
+ def generate_bundle_aware_executable_stubs(spec)
+ # 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__))
+ relative_gemfile_path = relative_gemfile_path = Bundler.default_gemfile.relative_path_from(bin_path)
+ ruby_command = ruby_command = Thor::Util.ruby_command
+
+ spec.executables.each do |executable|
+ next if executable == "bundle"
+ File.open "#{bin_path}/#{executable}", 'w', 0755 do |f|
+ f.puts ERB.new(template, nil, '-').result(binding)
+ end
+ end
+ end
def generate_standalone_bundler_executable_stubs(spec)
# double-assignment to avoid warnings about variables that will be used by ERB