Skip to content

Commit 57db2e5

Browse files
committed
Revert "Merge pull request #2597 from MikeMcQuaid/vendor-gems"
This reverts commit 3e4547f, reversing changes made to 6edf938.
1 parent e1bbab6 commit 57db2e5

File tree

43 files changed

+183
-315
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+183
-315
lines changed

.bundle/config

Lines changed: 0 additions & 5 deletions
This file was deleted.

.gitignore

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,24 @@
88
!/Library/
99

1010
# Ignore generated files within `Library` (again).
11+
/Library/Homebrew/**/.bundle
12+
/Library/Homebrew/**/vendor/bundle
1113
/Library/Homebrew/doc
1214
/Library/Homebrew/cask/bin
1315
/Library/Homebrew/cask/coverage
1416
/Library/Homebrew/cask/tmp
17+
/Library/Homebrew/test/bin
18+
/Library/Homebrew/test/coverage
19+
/Library/Homebrew/test/fs_leak_log
1520
/Library/Homebrew/tmp
1621
/Library/LinkedKegs
1722
/Library/Locks
1823
/Library/PinnedKegs
1924
/Library/PinnedTaps
2025
/Library/Taps
2126

22-
# Ignore some vendored files within `Library`.
27+
# Ignore vendored files within `Library`.
2328
/Library/Homebrew/vendor/portable-ruby
24-
/Library/Homebrew/vendor/ruby/2.0.0/bin
25-
/Library/Homebrew/vendor/ruby/2.0.0/cache
26-
/Library/Homebrew/vendor/ruby/2.0.0/extensions
27-
/Library/Homebrew/vendor/ruby/2.0.0/gems/*
28-
/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-*/*
29-
/Library/Homebrew/vendor/ruby/2.0.0/gems/plist-*/*
30-
/Library/Homebrew/vendor/ruby/2.0.0/specifications
31-
/Library/Homebrew/vendor/ruby/2.0.0/tmp
32-
33-
# Unignore our vendored gems
34-
!/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-*
35-
!/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-*/LICENSE*
36-
!/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-*/lib
37-
!/Library/Homebrew/vendor/ruby/2.0.0/gems/plist-*
38-
!/Library/Homebrew/vendor/ruby/2.0.0/gems/plist-*/LICENSE*
39-
!/Library/Homebrew/vendor/ruby/2.0.0/gems/plist-*/lib
4029

4130
# Ignore `bin` contents (again).
4231
/bin
@@ -61,13 +50,13 @@
6150
!/completions
6251

6352
# Unignore our root-level metadata files.
64-
!/.bundle
6553
!/.gitignore
6654
!/.travis.yml
6755
!/.yardopts
6856
!/CODEOFCONDUCT.md
6957
!/CONTRIBUTING.md
70-
!/Gemfile
71-
!/Gemfile.lock
7258
!/LICENSE.txt
7359
!/README.md
60+
61+
# Unignore tests' bundle config
62+
!/Library/Homebrew/test/.bundle

.travis.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
language: ruby
2-
bundler_args: --path Library/Homebrew/vendor --standalone --jobs 3
3-
cache: bundler
2+
cache:
3+
directories:
4+
- $HOME/.gem/ruby
5+
- Library/Homebrew/vendor/bundle
46

57
matrix:
68
include:
@@ -11,9 +13,6 @@ matrix:
1113
rvm: 2.0.0
1214

1315
before_install:
14-
- export GEM_HOME="$PWD/Library/Homebrew/vendor/ruby/2.0.0"
15-
- gem list --installed bundler || gem install bundler
16-
- export PATH="$GEM_HOME/bin:$PATH"
1716
- export HOMEBREW_DEVELOPER=1
1817
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
1918
HOMEBREW_REPOSITORY="$(brew --repo)";

Gemfile

Lines changed: 0 additions & 36 deletions
This file was deleted.

Gemfile.lock

Lines changed: 0 additions & 84 deletions
This file was deleted.

Library/Homebrew/brew.rb

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,9 @@
88
RUBY_TWO = RUBY_VERSION.split(".").first.to_i >= 2
99
raise "Homebrew must be run under Ruby 2!" unless RUBY_TWO
1010

11-
homebrew_library_path = File.dirname(File.realpath(__FILE__))
12-
$:.unshift(homebrew_library_path)
13-
14-
require_relative "#{homebrew_library_path}/vendor/bundler/setup"
15-
1611
require "pathname"
17-
HOMEBREW_LIBRARY_PATH = Pathname.new(homebrew_library_path)
18-
12+
HOMEBREW_LIBRARY_PATH = Pathname.new(__FILE__).realpath.parent
13+
$:.unshift(HOMEBREW_LIBRARY_PATH.to_s)
1914
require "global"
2015
require "tap"
2116

@@ -25,8 +20,6 @@
2520
exit 0
2621
end
2722

28-
HOMEBREW_GEM_HOME = HOMEBREW_LIBRARY_PATH/"vendor/#{RUBY_ENGINE}/#{RUBY_VERSION}"
29-
3023
def require?(path)
3124
require path
3225
rescue LoadError => e
@@ -59,14 +52,6 @@ def require?(path)
5952
# Add contributed commands to PATH before checking.
6053
path.append(Pathname.glob(Tap::TAP_DIRECTORY/"*/*/cmd"))
6154

62-
# Add RubyGems.
63-
ENV["GEM_HOME"] = ENV["GEM_PATH"] = HOMEBREW_GEM_HOME
64-
path.append(HOMEBREW_GEM_HOME/"bin")
65-
66-
# Make RubyGems notice environment changes.
67-
Gem.clear_paths
68-
Gem::Specification.reset
69-
7055
# Add SCM wrappers.
7156
path.append(HOMEBREW_SHIMS_PATH/"scm")
7257

Library/Homebrew/cask/lib/hbc/artifact/pkg.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require "hbc/utils/hash_validator"
44

5-
require "plist"
5+
require "vendor/plist/plist"
66

77
module Hbc
88
module Artifact

Library/Homebrew/cask/lib/hbc/cli/style.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def run
2626
def install_rubocop
2727
capture_stderr do
2828
begin
29-
Homebrew.run_bundler_if_needed!
29+
Homebrew.install_gem_setup_path! "rubocop-cask", HOMEBREW_RUBOCOP_CASK_VERSION, "rubocop"
3030
rescue SystemExit
3131
raise CaskError, Tty.strip_ansi($stderr.string).chomp.sub(/\AError: /, "")
3232
end

Library/Homebrew/cask/lib/hbc/container/executable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
require "hbc/container/naked"
2-
require "macho"
2+
require "vendor/macho/macho"
33

44
module Hbc
55
class Container

Library/Homebrew/cask/lib/hbc/system_command.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require "open3"
22
require "shellwords"
3-
require "plist"
3+
require "vendor/plist/plist"
44

55
require "extend/io"
66

0 commit comments

Comments
 (0)