summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel E. Giddins <segiddins@segiddins.me>2015-07-15 20:15:44 -0700
committerSamuel E. Giddins <segiddins@segiddins.me>2015-07-15 20:15:44 -0700
commite6b2964a5ee97357a7352bf102ae860848ee521d (patch)
tree58cbca0ddb332798ed49896d6ecfe68cfcf2617a
parent3a889f0214345f91686cc6a804b49a042eaca824 (diff)
parentf2dd60a902f2eadf1fee9f1c7bb92fae7861f073 (diff)
downloadbundler-e6b2964a5ee97357a7352bf102ae860848ee521d.tar.gz
Merge pull request #3812 from bundler/seg-binstubs
Add new binstubs for rake and rspec in bin, move executables to exe
-rwxr-xr-xbin/rake8
-rwxr-xr-xbin/rspec8
-rw-r--r--bundler.gemspec1
-rwxr-xr-xexe/bundle (renamed from bin/bundle)0
-rwxr-xr-xexe/bundle_ruby (renamed from bin/bundle_ruby)0
-rwxr-xr-xexe/bundler (renamed from bin/bundler)0
-rw-r--r--spec/commands/exec_spec.rb2
-rw-r--r--spec/support/helpers.rb4
-rw-r--r--spec/support/rubygems_ext.rb2
9 files changed, 21 insertions, 4 deletions
diff --git a/bin/rake b/bin/rake
new file mode 100755
index 0000000000..4abe5efe45
--- /dev/null
+++ b/bin/rake
@@ -0,0 +1,8 @@
+#!/usr/bin/env ruby
+
+bundler_spec = Gem::Specification.load(File.expand_path("../../bundler.gemspec", __FILE__))
+bundler_spec.dependencies.each do |dep|
+ gem dep.name, dep.requirement.to_s
+end
+
+load Gem.bin_path('rake', 'rake')
diff --git a/bin/rspec b/bin/rspec
new file mode 100755
index 0000000000..0f8def6897
--- /dev/null
+++ b/bin/rspec
@@ -0,0 +1,8 @@
+#!/usr/bin/env ruby
+
+bundler_spec = Gem::Specification.load(File.expand_path("../../bundler.gemspec", __FILE__))
+bundler_spec.dependencies.each do |dep|
+ gem dep.name, dep.requirement.to_s
+end
+
+load Gem.bin_path('rspec-core', 'rspec')
diff --git a/bundler.gemspec b/bundler.gemspec
index 142e3d33f3..c2a6340b77 100644
--- a/bundler.gemspec
+++ b/bundler.gemspec
@@ -27,6 +27,7 @@ Gem::Specification.new do |s|
# we use them to generate the long-form help for each command.
s.files += Dir.glob('lib/bundler/man/**/*')
+ s.bindir = "exe"
s.executables = %w(bundle bundler)
s.require_paths = ["lib"]
end
diff --git a/bin/bundle b/exe/bundle
index 89c823eae3..89c823eae3 100755
--- a/bin/bundle
+++ b/exe/bundle
diff --git a/bin/bundle_ruby b/exe/bundle_ruby
index d0cfdc2778..d0cfdc2778 100755
--- a/bin/bundle_ruby
+++ b/exe/bundle_ruby
diff --git a/bin/bundler b/exe/bundler
index 89c823eae3..89c823eae3 100755
--- a/bin/bundler
+++ b/exe/bundler
diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb
index 9884eee6b3..d613851843 100644
--- a/spec/commands/exec_spec.rb
+++ b/spec/commands/exec_spec.rb
@@ -60,7 +60,7 @@ describe "bundle exec" do
it "handles --keep-file-descriptors" do
require 'tempfile'
- bundle_bin = File.expand_path('../../../bin/bundle', __FILE__)
+ bundle_bin = File.expand_path('../../../exe/bundle', __FILE__)
command = Tempfile.new("io-test")
command.sync = true
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb
index c1d9bfc28c..12bfaaa2e9 100644
--- a/spec/support/helpers.rb
+++ b/spec/support/helpers.rb
@@ -61,7 +61,7 @@ module Spec
sudo = "sudo" if options.delete(:sudo)
options["no-color"] = true unless options.key?("no-color") || %w(exec conf).include?(cmd.to_s[0..3])
- bundle_bin = File.expand_path('../../../bin/bundle', __FILE__)
+ bundle_bin = File.expand_path('../../../exe/bundle', __FILE__)
requires = options.delete(:requires) || []
requires << File.expand_path('../fakeweb/'+options.delete(:fakeweb)+'.rb', __FILE__) if options.key?(:fakeweb)
@@ -81,7 +81,7 @@ module Spec
expect_err = options.delete(:expect_err)
options["no-color"] = true unless options.key?("no-color")
- bundle_bin = File.expand_path('../../../bin/bundle_ruby', __FILE__)
+ bundle_bin = File.expand_path('../../../exe/bundle_ruby', __FILE__)
requires = options.delete(:requires) || []
requires << File.expand_path('../fakeweb/'+options.delete(:fakeweb)+'.rb', __FILE__) if options.key?(:fakeweb)
diff --git a/spec/support/rubygems_ext.rb b/spec/support/rubygems_ext.rb
index 47f660f0b3..0d0e35c452 100644
--- a/spec/support/rubygems_ext.rb
+++ b/spec/support/rubygems_ext.rb
@@ -8,7 +8,7 @@ module Spec
ENV['BUNDLE_PATH'] = nil
ENV['GEM_HOME'] = ENV['GEM_PATH'] = Path.base_system_gems.to_s
- ENV['PATH'] = ["#{Path.root}/bin", "#{Path.system_gem_path}/bin", ENV['PATH']].join(File::PATH_SEPARATOR)
+ ENV['PATH'] = ["#{Path.root}/exe", "#{Path.system_gem_path}/bin", ENV['PATH']].join(File::PATH_SEPARATOR)
unless File.exist?("#{Path.base_system_gems}")
FileUtils.mkdir_p(Path.base_system_gems)