-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Use Bundler to manage vendor directory #4895
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
require "vendor/plist/plist" | ||
require "plist" | ||
|
||
require "cask/artifact/abstract_artifact" | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Contains backports from newer versions of Ruby | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment is perhaps no longer needed as it's a bit more obvious from the |
||
require_relative "../vendor/backports/string" | ||
require "backports/2.4.0/string/match" | ||
|
||
class String | ||
# String.chomp, but if result is empty: returns nil instead. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ | |
unless $LOAD_PATH.include?(HOMEBREW_LIBRARY_PATH.to_s) | ||
$LOAD_PATH.push(HOMEBREW_LIBRARY_PATH.to_s) | ||
end | ||
|
||
require "vendor/bundle-standalone/bundler/setup" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Check below if interested; this file is generated by bundler and sets up the load path for all the relevant gems. This means they can live in versioned directories but we never need to manually update the names of those directories. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
require "vendor/macho/macho" | ||
require "macho" | ||
require "os/mac/architecture_list" | ||
|
||
module MachOShim | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
BUNDLE_PATH: "bundle-standalone" | ||
BUNDLE_DISABLE_SHARED_GEMS: "true" | ||
BUNDLE_BIN: "false" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
source "https://rubygems.org" | ||
|
||
gem "backports" | ||
gem "plist" | ||
gem "ruby-macho" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
backports (3.8.0) | ||
plist (3.3.0) | ||
ruby-macho (2.0.0) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
backports | ||
plist | ||
ruby-macho | ||
|
||
BUNDLED WITH | ||
1.16.4 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require 'rbconfig' | ||
# ruby 1.8.7 doesn't define RUBY_ENGINE | ||
ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby' | ||
ruby_version = RbConfig::CONFIG["ruby_version"] | ||
path = File.expand_path('..', __FILE__) | ||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/backports-3.8.0/lib" | ||
$:.unshift "#{path}/" | ||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/plist-3.3.0/lib" | ||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-2.0.0/lib" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# Taken from https://github.com/marcandre/backports/blob/v3.8.0/lib/backports/2.4.0/string/match.rb | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is not present in the upstream file so was removed by Bundler. |
||
unless String.method_defined? :match? | ||
class String | ||
def match?(*args) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,9 @@ | |
require 'cgi' | ||
require 'stringio' | ||
|
||
require_relative 'plist/generator' | ||
require_relative 'plist/parser' | ||
require_relative 'plist/version' | ||
require 'plist/generator' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These changes are not present in the upstream file so were removed by Bundler. |
||
require 'plist/parser' | ||
require 'plist/version' | ||
|
||
module Plist | ||
end |
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.
This requires
git add -f
to add additional backports files but I think it's the best approach to avoid making this.gitignore
very messy andbackports
-specific.