-
-
Notifications
You must be signed in to change notification settings - Fork 101
Vendorize gems #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Vendorize gems #38
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
96070b2
Vendorize gems for distribution.
georgebrock dc6e21b
We don't care if vendor/gems already exists.
georgebrock 2104349
Improve vendorized install.
georgebrock 5cb94c5
Get distcheck passing again.
georgebrock 08d5017
Fix vendorize process.
georgebrock 6eaa6c4
Re-vendorize if Gemfile.lock has changed.
georgebrock 6b325d5
Improve code style
georgebrock File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
|
|
||
| $LOAD_PATH.unshift('@rubydir@') | ||
|
|
||
| require '@gemsetuppath@' | ||
| require 'gitsh/cli' | ||
|
|
||
| begin | ||
|
|
||
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| nobase_dist_pkgdata_DATA = $(vendorfiles) | ||
| EXTRA_DIST = vendorize | ||
|
|
||
| distclean-local: | ||
| -rm -rf gems |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| #!/usr/bin/env ruby | ||
|
|
||
| require 'bundler' | ||
|
|
||
| unless ARGV.length == 1 | ||
| $stderr.puts "usage: vendorize path-to-gems" | ||
| exit 64 | ||
| end | ||
|
|
||
| TARGET_PATH = ARGV.first | ||
| SETUP_PATH = File.join(TARGET_PATH, 'setup.rb') | ||
|
|
||
| FileUtils.mkdir_p(TARGET_PATH) | ||
|
|
||
| File.open(SETUP_PATH, 'w') do |setup_file| | ||
| Bundler.definition.specs_for([:dist]).each do |gem| | ||
| if gem.name != 'bundler' | ||
| system( | ||
| '/usr/bin/env', 'gem', 'unpack', | ||
| '--target', TARGET_PATH, | ||
| '--version', gem.version.to_s, | ||
| gem.name | ||
| ) | ||
|
|
||
| setup_file << "$LOAD_PATH.unshift(File.expand_path(%s, __FILE__))\n" % [ | ||
| "../#{gem.name}-#{gem.version}/lib".inspect | ||
| ] | ||
| end | ||
| end | ||
| end | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to start a campaign to get your nickname internationally recognized as Sysexits.
George "Sysexits" Brocklehurst.