This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Go back to generating ./bin/gem_bin_stub
- Loading branch information
Carl Lerche
committed
Jul 9, 2010
1 parent
2199c87
commit ce7db1b
Showing
5 changed files
with
23 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,14 @@ | ||
#!/usr/bin/env ruby | ||
# This is not actually required by the actual library | ||
# loads the bundled environment | ||
require 'rubygems' | ||
|
||
begin | ||
require 'bundler/setup' | ||
rescue LoadError | ||
# Let's not complain if bundler isn't around | ||
end | ||
|
||
base = File.basename($0) | ||
paths = ENV['PATH'].split(File::PATH_SEPARATOR) | ||
here = File.expand_path(File.dirname(__FILE__)) | ||
# | ||
# This file was generated by Bundler. | ||
# | ||
# The application '<%= executable %>' is installed as part of a gem, and | ||
# this file is here to facilitate running it. | ||
# | ||
|
||
gem_stub = paths.find do |path| | ||
path = File.expand_path(path) | ||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../<%= relative_gemfile_path %>", __FILE__) | ||
|
||
next if path == here | ||
|
||
File.exist?("#{path}/#{base}") | ||
end | ||
require 'rubygems' | ||
require 'bundler/setup' | ||
|
||
if gem_stub | ||
load "#{gem_stub}/#{base}" | ||
else | ||
abort "The gem stub #{base} could not be found" | ||
end | ||
load Gem.bin_path('<%= spec.name %>', '<%= executable %>') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters