From a76392dd5f7f603e83be7bc1b6df103d731d1bf4 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sun, 7 May 2017 17:28:34 +0100 Subject: [PATCH 1/3] Revert "Merge pull request #2602 from MikeMcQuaid/travis-ci-tweaks" This reverts commit 8d948e4b0b55912c592d34cb5ea83c649b1f9d5e, reversing changes made to 2372872974d1049c2beafe7dedb7f8f882502058. --- .travis.yml | 2 -- Library/Homebrew/dev-cmd/tap-new.rb | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index dbf56e6b13..f268e40ec6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,11 +8,9 @@ matrix: osx_image: xcode8.3 rvm: system - os: linux - sudo: false rvm: 2.0.0 before_install: - - rm -rf Library/Homebrew/vendor/bundle/ - export GEM_HOME="$PWD/Library/Homebrew/vendor/ruby/2.0.0" - gem list --installed bundler || gem install bundler - export PATH="$GEM_HOME/bin:$PATH" diff --git a/Library/Homebrew/dev-cmd/tap-new.rb b/Library/Homebrew/dev-cmd/tap-new.rb index 0dbb5476da..48449e98d5 100644 --- a/Library/Homebrew/dev-cmd/tap-new.rb +++ b/Library/Homebrew/dev-cmd/tap-new.rb @@ -46,10 +46,9 @@ module Homebrew travis = <<-EOS.undent language: ruby os: osx + env: OSX=10.12 osx_image: xcode8.3 rvm: system - cache: - directories: /usr/local/Homebrew/Library/Homebrew/vendor before_install: - export TRAVIS_COMMIT="$(git rev-parse --verify -q HEAD)" From e1bbab6ca6c8f96bb53fee9af3f0c01edd2d2f94 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sun, 7 May 2017 17:28:37 +0100 Subject: [PATCH 2/3] Revert "Merge pull request #2603 from MikeMcQuaid/tweak-gem-vendoring" This reverts commit 2372872974d1049c2beafe7dedb7f8f882502058, reversing changes made to 3e4547f52e7ebec633f8bfefc8a396d944edf908. --- Library/Homebrew/brew.rb | 27 +++++++------ Library/Homebrew/brew.sh | 4 ++ Library/Homebrew/config.rb | 5 +-- Library/Homebrew/os/mac/mach.rb | 5 +-- Library/Homebrew/test/support/lib/config.rb | 6 +-- Library/Homebrew/utils.rb | 42 +++++++++++++++++++++ 6 files changed, 64 insertions(+), 25 deletions(-) diff --git a/Library/Homebrew/brew.rb b/Library/Homebrew/brew.rb index e19819cf5b..6dab50f294 100644 --- a/Library/Homebrew/brew.rb +++ b/Library/Homebrew/brew.rb @@ -8,13 +8,13 @@ std_trap = trap("INT") { exit! 130 } # no backtrace thanks RUBY_TWO = RUBY_VERSION.split(".").first.to_i >= 2 raise "Homebrew must be run under Ruby 2!" unless RUBY_TWO -require "pathname" -HOMEBREW_LIBRARY_PATH = Pathname.new(__FILE__).realpath.parent -$:.unshift(HOMEBREW_LIBRARY_PATH) +homebrew_library_path = File.dirname(File.realpath(__FILE__)) +$:.unshift(homebrew_library_path) -load_path_before_bundler = $:.dup -require_relative "#{HOMEBREW_LIBRARY_PATH}/vendor/bundler/setup" -ENV["HOMEBREW_GEMS_LOAD_PATH"] = ($: - load_path_before_bundler).join(":") +require_relative "#{homebrew_library_path}/vendor/bundler/setup" + +require "pathname" +HOMEBREW_LIBRARY_PATH = Pathname.new(homebrew_library_path) require "global" require "tap" @@ -25,6 +25,8 @@ if ARGV == %w[--version] || ARGV == %w[-v] exit 0 end +HOMEBREW_GEM_HOME = HOMEBREW_LIBRARY_PATH/"vendor/#{RUBY_ENGINE}/#{RUBY_VERSION}" + def require?(path) require path rescue LoadError => e @@ -58,21 +60,18 @@ begin path.append(Pathname.glob(Tap::TAP_DIRECTORY/"*/*/cmd")) # Add RubyGems. - HOMEBREW_GEM_HOME = HOMEBREW_LIBRARY_PATH/"vendor/#{RUBY_ENGINE}/#{RUBY_VERSION}" + ENV["GEM_HOME"] = ENV["GEM_PATH"] = HOMEBREW_GEM_HOME path.append(HOMEBREW_GEM_HOME/"bin") + # Make RubyGems notice environment changes. + Gem.clear_paths + Gem::Specification.reset + # Add SCM wrappers. path.append(HOMEBREW_SHIMS_PATH/"scm") ENV["PATH"] = path - # Setup RubyGems environment. - ENV["GEM_HOME"] = ENV["GEM_PATH"] = HOMEBREW_GEM_HOME - # Make RubyGems notice environment changes. - Gem.clear_paths - Gem::Specification.reset - Homebrew.run_bundler_if_needed! unless HOMEBREW_GEM_HOME.exist? - if cmd internal_cmd = require? HOMEBREW_LIBRARY_PATH.join("cmd", cmd) diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index 6f4453f28a..02ce5e1c15 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -69,6 +69,10 @@ then odie "Cowardly refusing to continue at this prefix: $HOMEBREW_PREFIX" fi +# Save value to use for installing gems +export GEM_OLD_HOME="$GEM_HOME" +export GEM_OLD_PATH="$GEM_PATH" + # Users may have these set, pointing the system Ruby # at non-system gem paths unset GEM_HOME diff --git a/Library/Homebrew/config.rb b/Library/Homebrew/config.rb index ef07434de0..38d7c80438 100644 --- a/Library/Homebrew/config.rb +++ b/Library/Homebrew/config.rb @@ -46,8 +46,5 @@ unless defined? HOMEBREW_LIBRARY_PATH HOMEBREW_LIBRARY_PATH = Pathname.new(__FILE__).realpath.parent end -# Load path to vendored gems used by Homebrew -HOMEBREW_GEMS_LOAD_PATH = ENV["HOMEBREW_GEMS_LOAD_PATH"] - # Load path used by standalone scripts to access the Homebrew code base -HOMEBREW_LOAD_PATH = [HOMEBREW_LIBRARY_PATH, *HOMEBREW_GEMS_LOAD_PATH].join(":") +HOMEBREW_LOAD_PATH = HOMEBREW_LIBRARY_PATH diff --git a/Library/Homebrew/os/mac/mach.rb b/Library/Homebrew/os/mac/mach.rb index 416183f686..71f501fe95 100644 --- a/Library/Homebrew/os/mac/mach.rb +++ b/Library/Homebrew/os/mac/mach.rb @@ -1,11 +1,10 @@ +require "macho" require "os/mac/architecture_list" module MachOShim # @private def macho @macho ||= begin - require "macho" - MachO.open(to_s) end end @@ -13,8 +12,6 @@ module MachOShim # @private def mach_data @mach_data ||= begin - require "macho" - machos = [] mach_data = [] diff --git a/Library/Homebrew/test/support/lib/config.rb b/Library/Homebrew/test/support/lib/config.rb index 41f4cbe330..fb5c210fee 100644 --- a/Library/Homebrew/test/support/lib/config.rb +++ b/Library/Homebrew/test/support/lib/config.rb @@ -14,9 +14,9 @@ TEST_TMPDIR = ENV.fetch("HOMEBREW_TEST_TMPDIR") do |k| end # Paths pointing into the Homebrew code base that persist across test runs -HOMEBREW_LIBRARY_PATH = Pathname.new(File.expand_path("../../../..", __FILE__)) -HOMEBREW_SHIMS_PATH = HOMEBREW_LIBRARY_PATH.parent+"Homebrew/shims" -HOMEBREW_LOAD_PATH = [File.expand_path("..", __FILE__), HOMEBREW_LIBRARY_PATH, ENV["HOMEBREW_GEMS_LOAD_PATH"]].join(":") +HOMEBREW_LIBRARY_PATH = Pathname.new(File.expand_path("../../../..", __FILE__)) +HOMEBREW_SHIMS_PATH = HOMEBREW_LIBRARY_PATH.parent+"Homebrew/shims" +HOMEBREW_LOAD_PATH = [File.expand_path("..", __FILE__), HOMEBREW_LIBRARY_PATH].join(":") # Paths redirected to a temporary directory and wiped at the end of the test run HOMEBREW_PREFIX = Pathname.new(TEST_TMPDIR).join("prefix") diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 6ae75a4fb6..60af39d930 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -179,6 +179,48 @@ module Homebrew _system(cmd, *args) end + def install_gem_setup_path!(name, version = nil, executable = name) + # Respect user's preferences for where gems should be installed. + ENV["GEM_HOME"] = ENV["GEM_OLD_HOME"].to_s + ENV["GEM_HOME"] = Gem.user_dir if ENV["GEM_HOME"].empty? + ENV["GEM_PATH"] = ENV["GEM_OLD_PATH"] unless ENV["GEM_OLD_PATH"].to_s.empty? + + # Make rubygems notice env changes. + Gem.clear_paths + Gem::Specification.reset + + # Add Gem binary directory and (if missing) Ruby binary directory to PATH. + path = PATH.new(ENV["PATH"]) + path.prepend(RUBY_BIN) if which("ruby") != RUBY_PATH + path.prepend(Gem.bindir) + ENV["PATH"] = path + + if Gem::Specification.find_all_by_name(name, version).empty? + ohai "Installing or updating '#{name}' gem" + install_args = %W[--no-ri --no-rdoc #{name}] + install_args << "--version" << version if version + + # Do `gem install [...]` without having to spawn a separate process or + # having to find the right `gem` binary for the running Ruby interpreter. + require "rubygems/commands/install_command" + install_cmd = Gem::Commands::InstallCommand.new + install_cmd.handle_options(install_args) + exit_code = 1 # Should not matter as `install_cmd.execute` always throws. + begin + install_cmd.execute + rescue Gem::SystemExitException => e + exit_code = e.exit_code + end + odie "Failed to install/update the '#{name}' gem." if exit_code.nonzero? + end + + return if which(executable) + odie <<-EOS.undent + The '#{name}' gem is installed but couldn't find '#{executable}' in the PATH: + #{ENV["PATH"]} + EOS + end + def run_bundler_if_needed! return unless Pathname.glob("#{HOMEBREW_GEM_HOME}/bin/*").empty? From 57db2e539eaa5fbae351963265312bd24ed08f6b Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sun, 7 May 2017 17:28:39 +0100 Subject: [PATCH 3/3] Revert "Merge pull request #2597 from MikeMcQuaid/vendor-gems" This reverts commit 3e4547f52e7ebec633f8bfefc8a396d944edf908, reversing changes made to 6edf9382bcc1240ad6f97c8b752cfe56cef9965d. --- .bundle/config | 5 -- .gitignore | 29 ++----- .travis.yml | 9 +- Gemfile | 36 -------- Gemfile.lock | 84 ------------------- Library/Homebrew/brew.rb | 19 +---- Library/Homebrew/cask/lib/hbc/artifact/pkg.rb | 2 +- Library/Homebrew/cask/lib/hbc/cli/style.rb | 2 +- .../cask/lib/hbc/container/executable.rb | 2 +- .../Homebrew/cask/lib/hbc/system_command.rb | 2 +- Library/Homebrew/cmd/style.rb | 2 +- Library/Homebrew/config.rb | 2 + Library/Homebrew/constants.rb | 3 + Library/Homebrew/dev-cmd/audit.rb | 3 - Library/Homebrew/dev-cmd/man.rb | 2 +- Library/Homebrew/dev-cmd/tests.rb | 20 ++--- Library/Homebrew/os/mac/mach.rb | 2 +- Library/Homebrew/test/Gemfile | 12 +++ Library/Homebrew/test/Gemfile.lock | 65 ++++++++++++++ Library/Homebrew/test/cask/cask_spec.rb | 6 +- Library/Homebrew/test/cask/cli/style_spec.rb | 4 +- .../spec/shared_context/integration_test.rb | 10 ++- Library/Homebrew/test/support/lib/config.rb | 2 + Library/Homebrew/utils.rb | 32 ------- Library/Homebrew/vendor/README.md | 54 ++++++++++++ Library/Homebrew/vendor/bundler/setup.rb | 42 ---------- .../ruby-macho-1.1.0/lib => macho}/macho.rb | 0 .../lib => macho}/macho/exceptions.rb | 0 .../lib => macho}/macho/fat_file.rb | 0 .../lib => macho}/macho/headers.rb | 0 .../lib => macho}/macho/load_commands.rb | 0 .../lib => macho}/macho/macho_file.rb | 0 .../lib => macho}/macho/sections.rb | 0 .../lib => macho}/macho/structure.rb | 0 .../lib => macho}/macho/tools.rb | 0 .../lib => macho}/macho/utils.rb | 0 .../lib => macho}/macho/view.rb | 0 .../gems/plist-3.3.0/lib => plist}/plist.rb | 6 +- .../lib => plist}/plist/generator.rb | 0 .../plist-3.3.0/lib => plist}/plist/parser.rb | 0 .../lib => plist}/plist/version.rb | 0 .../ruby/2.0.0/gems/plist-3.3.0/LICENSE.txt | 20 ----- .../ruby/2.0.0/gems/ruby-macho-1.1.0/LICENSE | 21 ----- 43 files changed, 183 insertions(+), 315 deletions(-) delete mode 100644 .bundle/config delete mode 100644 Gemfile delete mode 100644 Gemfile.lock create mode 100644 Library/Homebrew/constants.rb create mode 100644 Library/Homebrew/test/Gemfile create mode 100644 Library/Homebrew/test/Gemfile.lock create mode 100644 Library/Homebrew/vendor/README.md delete mode 100644 Library/Homebrew/vendor/bundler/setup.rb rename Library/Homebrew/vendor/{ruby/2.0.0/gems/ruby-macho-1.1.0/lib => macho}/macho.rb (100%) rename Library/Homebrew/vendor/{ruby/2.0.0/gems/ruby-macho-1.1.0/lib => macho}/macho/exceptions.rb (100%) rename Library/Homebrew/vendor/{ruby/2.0.0/gems/ruby-macho-1.1.0/lib => macho}/macho/fat_file.rb (100%) rename Library/Homebrew/vendor/{ruby/2.0.0/gems/ruby-macho-1.1.0/lib => macho}/macho/headers.rb (100%) rename Library/Homebrew/vendor/{ruby/2.0.0/gems/ruby-macho-1.1.0/lib => macho}/macho/load_commands.rb (100%) rename Library/Homebrew/vendor/{ruby/2.0.0/gems/ruby-macho-1.1.0/lib => macho}/macho/macho_file.rb (100%) rename Library/Homebrew/vendor/{ruby/2.0.0/gems/ruby-macho-1.1.0/lib => macho}/macho/sections.rb (100%) rename Library/Homebrew/vendor/{ruby/2.0.0/gems/ruby-macho-1.1.0/lib => macho}/macho/structure.rb (100%) rename Library/Homebrew/vendor/{ruby/2.0.0/gems/ruby-macho-1.1.0/lib => macho}/macho/tools.rb (100%) rename Library/Homebrew/vendor/{ruby/2.0.0/gems/ruby-macho-1.1.0/lib => macho}/macho/utils.rb (100%) rename Library/Homebrew/vendor/{ruby/2.0.0/gems/ruby-macho-1.1.0/lib => macho}/macho/view.rb (100%) rename Library/Homebrew/vendor/{ruby/2.0.0/gems/plist-3.3.0/lib => plist}/plist.rb (74%) mode change 100644 => 100755 rename Library/Homebrew/vendor/{ruby/2.0.0/gems/plist-3.3.0/lib => plist}/plist/generator.rb (100%) mode change 100644 => 100755 rename Library/Homebrew/vendor/{ruby/2.0.0/gems/plist-3.3.0/lib => plist}/plist/parser.rb (100%) rename Library/Homebrew/vendor/{ruby/2.0.0/gems/plist-3.3.0/lib => plist}/plist/version.rb (100%) mode change 100644 => 100755 delete mode 100644 Library/Homebrew/vendor/ruby/2.0.0/gems/plist-3.3.0/LICENSE.txt delete mode 100644 Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/LICENSE diff --git a/.bundle/config b/.bundle/config deleted file mode 100644 index 0007666fd0..0000000000 --- a/.bundle/config +++ /dev/null @@ -1,5 +0,0 @@ ---- -BUNDLE_CLEAN: "true" -BUNDLE_DISABLE_SHARED_GEMS: "true" -BUNDLE_PATH: "Library/Homebrew/vendor" -BUNDLE_JOBS: "3" diff --git a/.gitignore b/.gitignore index 5708a50f5a..f7770612ed 100644 --- a/.gitignore +++ b/.gitignore @@ -8,10 +8,15 @@ !/Library/ # Ignore generated files within `Library` (again). +/Library/Homebrew/**/.bundle +/Library/Homebrew/**/vendor/bundle /Library/Homebrew/doc /Library/Homebrew/cask/bin /Library/Homebrew/cask/coverage /Library/Homebrew/cask/tmp +/Library/Homebrew/test/bin +/Library/Homebrew/test/coverage +/Library/Homebrew/test/fs_leak_log /Library/Homebrew/tmp /Library/LinkedKegs /Library/Locks @@ -19,24 +24,8 @@ /Library/PinnedTaps /Library/Taps -# Ignore some vendored files within `Library`. +# Ignore vendored files within `Library`. /Library/Homebrew/vendor/portable-ruby -/Library/Homebrew/vendor/ruby/2.0.0/bin -/Library/Homebrew/vendor/ruby/2.0.0/cache -/Library/Homebrew/vendor/ruby/2.0.0/extensions -/Library/Homebrew/vendor/ruby/2.0.0/gems/* -/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-*/* -/Library/Homebrew/vendor/ruby/2.0.0/gems/plist-*/* -/Library/Homebrew/vendor/ruby/2.0.0/specifications -/Library/Homebrew/vendor/ruby/2.0.0/tmp - -# Unignore our vendored gems -!/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-* -!/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-*/LICENSE* -!/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-*/lib -!/Library/Homebrew/vendor/ruby/2.0.0/gems/plist-* -!/Library/Homebrew/vendor/ruby/2.0.0/gems/plist-*/LICENSE* -!/Library/Homebrew/vendor/ruby/2.0.0/gems/plist-*/lib # Ignore `bin` contents (again). /bin @@ -61,13 +50,13 @@ !/completions # Unignore our root-level metadata files. -!/.bundle !/.gitignore !/.travis.yml !/.yardopts !/CODEOFCONDUCT.md !/CONTRIBUTING.md -!/Gemfile -!/Gemfile.lock !/LICENSE.txt !/README.md + +# Unignore tests' bundle config +!/Library/Homebrew/test/.bundle diff --git a/.travis.yml b/.travis.yml index f268e40ec6..5e1906a5c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,8 @@ language: ruby -bundler_args: --path Library/Homebrew/vendor --standalone --jobs 3 -cache: bundler +cache: + directories: + - $HOME/.gem/ruby + - Library/Homebrew/vendor/bundle matrix: include: @@ -11,9 +13,6 @@ matrix: rvm: 2.0.0 before_install: - - export GEM_HOME="$PWD/Library/Homebrew/vendor/ruby/2.0.0" - - gem list --installed bundler || gem install bundler - - export PATH="$GEM_HOME/bin:$PATH" - export HOMEBREW_DEVELOPER=1 - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then HOMEBREW_REPOSITORY="$(brew --repo)"; diff --git a/Gemfile b/Gemfile deleted file mode 100644 index d39abd77a0..0000000000 --- a/Gemfile +++ /dev/null @@ -1,36 +0,0 @@ -source "https://rubygems.org" - -# brew * -gem "ruby-macho" - -# brew cask -gem "plist" - -# brew cask style -group :cask_style do - gem "rubocop-cask", "~> 0.12.0" -end - -# brew man -group :man do - gem "ronn" -end - -# brew style -group :style do - gem "rubocop", "~> 0.47.1" -end - -# brew tests -group :tests do - gem "parallel_tests" - gem "rspec" - gem "rspec-its", require: false - gem "rspec-wait", require: false -end - -# brew tests --coverage -group :coverage do - gem "codecov", require: false - gem "simplecov", require: false -end diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index be4521e0e8..0000000000 --- a/Gemfile.lock +++ /dev/null @@ -1,84 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - ast (2.3.0) - codecov (0.1.10) - json - simplecov - url - diff-lcs (1.3) - docile (1.1.5) - hpricot (0.8.6) - json (2.1.0) - mustache (1.0.5) - parallel (1.11.1) - parallel_tests (2.14.1) - parallel - parser (2.4.0.0) - ast (~> 2.2) - plist (3.3.0) - powerpack (0.1.1) - public_suffix (2.0.5) - rainbow (2.2.2) - rake - rake (12.0.0) - rdiscount (2.2.0.1) - ronn (0.7.3) - hpricot (>= 0.8.2) - mustache (>= 0.7.0) - rdiscount (>= 1.5.8) - rspec (3.6.0) - rspec-core (~> 3.6.0) - rspec-expectations (~> 3.6.0) - rspec-mocks (~> 3.6.0) - rspec-core (3.6.0) - rspec-support (~> 3.6.0) - rspec-expectations (3.6.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.6.0) - rspec-its (1.2.0) - rspec-core (>= 3.0.0) - rspec-expectations (>= 3.0.0) - rspec-mocks (3.6.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.6.0) - rspec-support (3.6.0) - rspec-wait (0.0.9) - rspec (>= 3, < 4) - rubocop (0.47.1) - parser (>= 2.3.3.1, < 3.0) - powerpack (~> 0.1) - rainbow (>= 1.99.1, < 3.0) - ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.0, >= 1.0.1) - rubocop-cask (0.12.0) - public_suffix (~> 2.0) - rubocop (~> 0.47.1) - ruby-macho (1.1.0) - ruby-progressbar (1.8.1) - simplecov (0.14.1) - docile (~> 1.1.0) - json (>= 1.8, < 3) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.0) - unicode-display_width (1.2.1) - url (0.3.2) - -PLATFORMS - ruby - -DEPENDENCIES - codecov - parallel_tests - plist - ronn - rspec - rspec-its - rspec-wait - rubocop (~> 0.47.1) - rubocop-cask (~> 0.12.0) - ruby-macho - simplecov - -BUNDLED WITH - 1.14.6 diff --git a/Library/Homebrew/brew.rb b/Library/Homebrew/brew.rb index 6dab50f294..e07599ac6e 100644 --- a/Library/Homebrew/brew.rb +++ b/Library/Homebrew/brew.rb @@ -8,14 +8,9 @@ std_trap = trap("INT") { exit! 130 } # no backtrace thanks RUBY_TWO = RUBY_VERSION.split(".").first.to_i >= 2 raise "Homebrew must be run under Ruby 2!" unless RUBY_TWO -homebrew_library_path = File.dirname(File.realpath(__FILE__)) -$:.unshift(homebrew_library_path) - -require_relative "#{homebrew_library_path}/vendor/bundler/setup" - require "pathname" -HOMEBREW_LIBRARY_PATH = Pathname.new(homebrew_library_path) - +HOMEBREW_LIBRARY_PATH = Pathname.new(__FILE__).realpath.parent +$:.unshift(HOMEBREW_LIBRARY_PATH.to_s) require "global" require "tap" @@ -25,8 +20,6 @@ if ARGV == %w[--version] || ARGV == %w[-v] exit 0 end -HOMEBREW_GEM_HOME = HOMEBREW_LIBRARY_PATH/"vendor/#{RUBY_ENGINE}/#{RUBY_VERSION}" - def require?(path) require path rescue LoadError => e @@ -59,14 +52,6 @@ begin # Add contributed commands to PATH before checking. path.append(Pathname.glob(Tap::TAP_DIRECTORY/"*/*/cmd")) - # Add RubyGems. - ENV["GEM_HOME"] = ENV["GEM_PATH"] = HOMEBREW_GEM_HOME - path.append(HOMEBREW_GEM_HOME/"bin") - - # Make RubyGems notice environment changes. - Gem.clear_paths - Gem::Specification.reset - # Add SCM wrappers. path.append(HOMEBREW_SHIMS_PATH/"scm") diff --git a/Library/Homebrew/cask/lib/hbc/artifact/pkg.rb b/Library/Homebrew/cask/lib/hbc/artifact/pkg.rb index 1ba2b4b97b..c43481c82b 100644 --- a/Library/Homebrew/cask/lib/hbc/artifact/pkg.rb +++ b/Library/Homebrew/cask/lib/hbc/artifact/pkg.rb @@ -2,7 +2,7 @@ require "hbc/artifact/base" require "hbc/utils/hash_validator" -require "plist" +require "vendor/plist/plist" module Hbc module Artifact diff --git a/Library/Homebrew/cask/lib/hbc/cli/style.rb b/Library/Homebrew/cask/lib/hbc/cli/style.rb index 930742ed79..191aefd3c6 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/style.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/style.rb @@ -26,7 +26,7 @@ module Hbc def install_rubocop capture_stderr do begin - Homebrew.run_bundler_if_needed! + Homebrew.install_gem_setup_path! "rubocop-cask", HOMEBREW_RUBOCOP_CASK_VERSION, "rubocop" rescue SystemExit raise CaskError, Tty.strip_ansi($stderr.string).chomp.sub(/\AError: /, "") end diff --git a/Library/Homebrew/cask/lib/hbc/container/executable.rb b/Library/Homebrew/cask/lib/hbc/container/executable.rb index 61bd4ef9bb..848f6d4be2 100644 --- a/Library/Homebrew/cask/lib/hbc/container/executable.rb +++ b/Library/Homebrew/cask/lib/hbc/container/executable.rb @@ -1,5 +1,5 @@ require "hbc/container/naked" -require "macho" +require "vendor/macho/macho" module Hbc class Container diff --git a/Library/Homebrew/cask/lib/hbc/system_command.rb b/Library/Homebrew/cask/lib/hbc/system_command.rb index d610f0fde8..c14079bc8b 100644 --- a/Library/Homebrew/cask/lib/hbc/system_command.rb +++ b/Library/Homebrew/cask/lib/hbc/system_command.rb @@ -1,6 +1,6 @@ require "open3" require "shellwords" -require "plist" +require "vendor/plist/plist" require "extend/io" diff --git a/Library/Homebrew/cmd/style.rb b/Library/Homebrew/cmd/style.rb index 48ec3ee2e5..cf41d91eeb 100644 --- a/Library/Homebrew/cmd/style.rb +++ b/Library/Homebrew/cmd/style.rb @@ -65,7 +65,7 @@ module Homebrew def check_style_impl(files, output_type, options = {}) fix = options[:fix] - Homebrew.run_bundler_if_needed! + Homebrew.install_gem_setup_path! "rubocop", HOMEBREW_RUBOCOP_VERSION require "rubocop" require_relative "../rubocops" diff --git a/Library/Homebrew/config.rb b/Library/Homebrew/config.rb index 38d7c80438..30b7bc6c9c 100644 --- a/Library/Homebrew/config.rb +++ b/Library/Homebrew/config.rb @@ -2,6 +2,8 @@ unless ENV["HOMEBREW_BREW_FILE"] raise "HOMEBREW_BREW_FILE was not exported! Please call bin/brew directly!" end +require "constants" + # Path to `bin/brew` main executable in HOMEBREW_PREFIX HOMEBREW_BREW_FILE = Pathname.new(ENV["HOMEBREW_BREW_FILE"]) diff --git a/Library/Homebrew/constants.rb b/Library/Homebrew/constants.rb new file mode 100644 index 0000000000..827d5827f2 --- /dev/null +++ b/Library/Homebrew/constants.rb @@ -0,0 +1,3 @@ +# RuboCop version used for `brew style` and `brew cask style` +HOMEBREW_RUBOCOP_VERSION = "0.47.1".freeze +HOMEBREW_RUBOCOP_CASK_VERSION = "~> 0.12.0".freeze # has to be updated when RuboCop version changes diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 9ea3faf11c..cb25ca7943 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -65,9 +65,6 @@ module Homebrew ENV.activate_extensions! ENV.setup_build_environment - # Add RubyGems (for RuboCop). - ENV["PATH"] = PATH.new(ENV["PATH"]).append(HOMEBREW_GEM_HOME/"bin") - if ARGV.named.empty? ff = Formula files = Tap.map(&:formula_dir) diff --git a/Library/Homebrew/dev-cmd/man.rb b/Library/Homebrew/dev-cmd/man.rb index 6e71c248b8..4e51039108 100644 --- a/Library/Homebrew/dev-cmd/man.rb +++ b/Library/Homebrew/dev-cmd/man.rb @@ -35,7 +35,7 @@ module Homebrew end def regenerate_man_pages - Homebrew.run_bundler_if_needed! + Homebrew.install_gem_setup_path! "ronn" markup = build_man_page convert_man_page(markup, TARGET_DOC_PATH/"Manpage.md") diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb index da1f5365cf..72d6143fcf 100644 --- a/Library/Homebrew/dev-cmd/tests.rb +++ b/Library/Homebrew/dev-cmd/tests.rb @@ -49,6 +49,8 @@ module Homebrew FileUtils.rm_f "test/coverage/.resultset.json" end + ENV["BUNDLE_GEMFILE"] = "#{HOMEBREW_LIBRARY_PATH}/test/Gemfile" + # Override author/committer as global settings might be invalid and thus # will cause silent failure during the setup of dummy Git repositories. %w[AUTHOR COMMITTER].each do |role| @@ -57,7 +59,10 @@ module Homebrew ENV["GIT_#{role}_DATE"] = "Sun Jan 22 19:59:13 2017 +0000" end - Homebrew.run_bundler_if_needed! + Homebrew.install_gem_setup_path! "bundler" + unless quiet_system("bundle", "check") + system "bundle", "install" + end parallel = true @@ -101,15 +106,10 @@ module Homebrew files = files.reject { |p| p =~ %r{^test/os/linux(/.*|_spec\.rb)$} } end - files.map! { |p| HOMEBREW_LIBRARY_PATH/p } - - (HOMEBREW_LIBRARY_PATH/"vendor/#{RUBY_ENGINE}/#{RUBY_VERSION}").cd do - if parallel - system "parallel_rspec", *opts, "--", *args, "--", *files - else - system "rspec", *args, "--", *files - end - FileUtils.rm_rf "tmp" + if parallel + system "bundle", "exec", "parallel_rspec", *opts, "--", *args, "--", *files + else + system "bundle", "exec", "rspec", *args, "--", *files end return if $?.success? diff --git a/Library/Homebrew/os/mac/mach.rb b/Library/Homebrew/os/mac/mach.rb index 71f501fe95..9b53c49797 100644 --- a/Library/Homebrew/os/mac/mach.rb +++ b/Library/Homebrew/os/mac/mach.rb @@ -1,4 +1,4 @@ -require "macho" +require "vendor/macho/macho" require "os/mac/architecture_list" module MachOShim diff --git a/Library/Homebrew/test/Gemfile b/Library/Homebrew/test/Gemfile new file mode 100644 index 0000000000..f3c16c710b --- /dev/null +++ b/Library/Homebrew/test/Gemfile @@ -0,0 +1,12 @@ +source "https://rubygems.org" + +gem "parallel_tests" +gem "rspec" +gem "rubocop" +gem "rspec-its", require: false +gem "rspec-wait", require: false + +group :coverage do + gem "simplecov", require: false + gem "codecov", require: false +end diff --git a/Library/Homebrew/test/Gemfile.lock b/Library/Homebrew/test/Gemfile.lock new file mode 100644 index 0000000000..4d4eefd7d7 --- /dev/null +++ b/Library/Homebrew/test/Gemfile.lock @@ -0,0 +1,65 @@ +GEM + remote: https://rubygems.org/ + specs: + ast (2.3.0) + codecov (0.1.9) + json + simplecov + url + diff-lcs (1.3) + docile (1.1.5) + json (2.0.3) + parallel (1.10.0) + parallel_tests (2.13.0) + parallel + parser (2.4.0.0) + ast (~> 2.2) + powerpack (0.1.1) + rainbow (2.2.1) + rspec (3.5.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-core (3.5.4) + rspec-support (~> 3.5.0) + rspec-expectations (3.5.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.5.0) + rspec-its (1.2.0) + rspec-core (>= 3.0.0) + rspec-expectations (>= 3.0.0) + rspec-mocks (3.5.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.5.0) + rspec-support (3.5.0) + rspec-wait (0.0.9) + rspec (>= 3, < 4) + rubocop (0.47.1) + parser (>= 2.3.3.1, < 3.0) + powerpack (~> 0.1) + rainbow (>= 1.99.1, < 3.0) + ruby-progressbar (~> 1.7) + unicode-display_width (~> 1.0, >= 1.0.1) + ruby-progressbar (1.8.1) + simplecov (0.13.0) + docile (~> 1.1.0) + json (>= 1.8, < 3) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.0) + unicode-display_width (1.1.3) + url (0.3.2) + +PLATFORMS + ruby + +DEPENDENCIES + codecov + parallel_tests + rspec + rspec-its + rspec-wait + rubocop + simplecov + +BUNDLED WITH + 1.14.5 diff --git a/Library/Homebrew/test/cask/cask_spec.rb b/Library/Homebrew/test/cask/cask_spec.rb index a8c4ecf5f6..3736f3c015 100644 --- a/Library/Homebrew/test/cask/cask_spec.rb +++ b/Library/Homebrew/test/cask/cask_spec.rb @@ -24,7 +24,7 @@ describe Hbc::Cask, :cask do describe "load" do let(:tap_path) { Hbc.default_tap.path } let(:file_dirname) { Pathname.new(__FILE__).dirname } - let(:relative_tap_path) { tap_path.realpath.relative_path_from(file_dirname) } + let(:relative_tap_path) { tap_path.relative_path_from(file_dirname) } it "returns an instance of the Cask for the given token" do c = Hbc::CaskLoader.load("local-caffeine") @@ -56,9 +56,7 @@ describe Hbc::Cask, :cask do end it "returns an instance of the Cask from a relative file location" do - c = file_dirname.cd do - Hbc::CaskLoader.load(relative_tap_path/"Casks/local-caffeine.rb") - end + c = Hbc::CaskLoader.load(relative_tap_path/"Casks/local-caffeine.rb") expect(c).to be_kind_of(Hbc::Cask) expect(c.token).to eq("local-caffeine") end diff --git a/Library/Homebrew/test/cask/cli/style_spec.rb b/Library/Homebrew/test/cask/cli/style_spec.rb index d021d8000a..d41636beb4 100644 --- a/Library/Homebrew/test/cask/cli/style_spec.rb +++ b/Library/Homebrew/test/cask/cli/style_spec.rb @@ -62,7 +62,7 @@ describe Hbc::CLI::Style, :cask do context "when installation succeeds" do before do - allow(Homebrew).to receive(:run_bundler_if_needed!) + allow(Homebrew).to receive(:install_gem_setup_path!) end it "exits successfully" do @@ -72,7 +72,7 @@ describe Hbc::CLI::Style, :cask do context "when installation fails" do before do - allow(Homebrew).to receive(:run_bundler_if_needed!).and_raise(SystemExit) + allow(Homebrew).to receive(:install_gem_setup_path!).and_raise(SystemExit) end it "raises an error" do diff --git a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb index 3a36f18534..ae1854f589 100644 --- a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb +++ b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb @@ -89,10 +89,12 @@ RSpec.shared_context "integration test" do ruby_args << "-rtest/support/helper/integration_mocks" ruby_args << (HOMEBREW_LIBRARY_PATH/"brew.rb").resolved_path.to_s - stdout, stderr, status = Open3.capture3(env, RUBY_PATH, *ruby_args, *args) - $stdout.print stdout - $stderr.print stderr - status + Bundler.with_original_env do + stdout, stderr, status = Open3.capture3(env, RUBY_PATH, *ruby_args, *args) + $stdout.print stdout + $stderr.print stderr + status + end end def setup_test_formula(name, content = nil) diff --git a/Library/Homebrew/test/support/lib/config.rb b/Library/Homebrew/test/support/lib/config.rb index fb5c210fee..3a0a767222 100644 --- a/Library/Homebrew/test/support/lib/config.rb +++ b/Library/Homebrew/test/support/lib/config.rb @@ -2,6 +2,8 @@ unless ENV["HOMEBREW_BREW_FILE"] raise "HOMEBREW_BREW_FILE was not exported! Please call bin/brew directly!" end +require "constants" + require "tmpdir" require "pathname" diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 60af39d930..c37633e41c 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -221,38 +221,6 @@ module Homebrew EOS end - def run_bundler_if_needed! - return unless Pathname.glob("#{HOMEBREW_GEM_HOME}/bin/*").empty? - - if Gem::Specification.find_all_by_name("bundler").empty? - ohai "Installing Bundler..." - - # Do `gem install [...]` without having to spawn a separate process or - # having to find the right `gem` binary for the running Ruby interpreter. - require "rubygems/commands/install_command" - install_cmd = Gem::Commands::InstallCommand.new - install_cmd.handle_options(%w[--no-ri --no-rdoc bundler]) - exit_code = 1 # Should not matter as `install_cmd.execute` always throws. - begin - install_cmd.execute - rescue Gem::SystemExitException => e - exit_code = e.exit_code - end - odie "Failed to install Bundler!" if exit_code.nonzero? - end - - HOMEBREW_REPOSITORY.cd do - unless quiet_system("bundle", "check") - ohai "Installing RubyGems..." - success = system "bundle", "install", - "--path", "Library/Homebrew/vendor", - "--standalone", - "--jobs", "3" - odie "Failed to install RubyGems!" unless success - end - end - end - # Hash of Module => Set(method_names) @injected_dump_stat_modules = {} diff --git a/Library/Homebrew/vendor/README.md b/Library/Homebrew/vendor/README.md new file mode 100644 index 0000000000..b408631c7a --- /dev/null +++ b/Library/Homebrew/vendor/README.md @@ -0,0 +1,54 @@ +Vendored Dependencies +===================== + +* [plist](https://github.com/patsplat/plist), version 3.3.0 + +* [ruby-macho](https://github.com/Homebrew/ruby-macho), version 1.1.0 + +## Licenses: + +### plist + +> Copyright (c) 2006-2010, Ben Bleything and Patrick May +> +> Permission is hereby granted, free of charge, to any person obtaining +> a copy of this software and associated documentation files (the +> "Software"), to deal in the Software without restriction, including +> without limitation the rights to use, copy, modify, merge, publish, +> distribute, sublicense, and/or sell copies of the Software, and to +> permit persons to whom the Software is furnished to do so, subject to +> the following conditions: +> +> The above copyright notice and this permission notice shall be included +> in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +> KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +> WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +### ruby-macho + +> The MIT License +> Copyright (c) 2015, 2016, 2017 William Woodruff +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. diff --git a/Library/Homebrew/vendor/bundler/setup.rb b/Library/Homebrew/vendor/bundler/setup.rb deleted file mode 100644 index 1fdc2512fd..0000000000 --- a/Library/Homebrew/vendor/bundler/setup.rb +++ /dev/null @@ -1,42 +0,0 @@ -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/rake-12.0.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ast-2.3.0/lib" -$:.unshift "#{path}/" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-16/2.0.0/json-2.1.0" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/json-2.1.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/docile-1.1.5/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-html-0.10.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-0.14.1/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/url-0.3.2/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/codecov-0.1.10/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/diff-lcs-1.3/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-16/2.0.0/hpricot-0.8.6" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/hpricot-0.8.6/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mustache-1.0.5/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel-1.11.1/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel_tests-2.14.1/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parser-2.4.0.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/plist-3.3.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/powerpack-0.1.1/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/public_suffix-2.0.5/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-16/2.0.0/rainbow-2.2.2" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rainbow-2.2.2/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-16/2.0.0/rdiscount-2.2.0.1" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rdiscount-2.2.0.1/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ronn-0.7.3/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-support-3.6.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-core-3.6.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-expectations-3.6.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-mocks-3.6.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-3.6.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-its-1.2.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-wait-0.0.9/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.8.1/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-1.2.1/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-0.47.1/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-cask-0.12.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-1.1.0/lib" diff --git a/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho.rb b/Library/Homebrew/vendor/macho/macho.rb similarity index 100% rename from Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho.rb rename to Library/Homebrew/vendor/macho/macho.rb diff --git a/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho/exceptions.rb b/Library/Homebrew/vendor/macho/macho/exceptions.rb similarity index 100% rename from Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho/exceptions.rb rename to Library/Homebrew/vendor/macho/macho/exceptions.rb diff --git a/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho/fat_file.rb b/Library/Homebrew/vendor/macho/macho/fat_file.rb similarity index 100% rename from Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho/fat_file.rb rename to Library/Homebrew/vendor/macho/macho/fat_file.rb diff --git a/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho/headers.rb b/Library/Homebrew/vendor/macho/macho/headers.rb similarity index 100% rename from Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho/headers.rb rename to Library/Homebrew/vendor/macho/macho/headers.rb diff --git a/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho/load_commands.rb b/Library/Homebrew/vendor/macho/macho/load_commands.rb similarity index 100% rename from Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho/load_commands.rb rename to Library/Homebrew/vendor/macho/macho/load_commands.rb diff --git a/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho/macho_file.rb b/Library/Homebrew/vendor/macho/macho/macho_file.rb similarity index 100% rename from Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho/macho_file.rb rename to Library/Homebrew/vendor/macho/macho/macho_file.rb diff --git a/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho/sections.rb b/Library/Homebrew/vendor/macho/macho/sections.rb similarity index 100% rename from Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho/sections.rb rename to Library/Homebrew/vendor/macho/macho/sections.rb diff --git a/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho/structure.rb b/Library/Homebrew/vendor/macho/macho/structure.rb similarity index 100% rename from Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho/structure.rb rename to Library/Homebrew/vendor/macho/macho/structure.rb diff --git a/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho/tools.rb b/Library/Homebrew/vendor/macho/macho/tools.rb similarity index 100% rename from Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho/tools.rb rename to Library/Homebrew/vendor/macho/macho/tools.rb diff --git a/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho/utils.rb b/Library/Homebrew/vendor/macho/macho/utils.rb similarity index 100% rename from Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho/utils.rb rename to Library/Homebrew/vendor/macho/macho/utils.rb diff --git a/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho/view.rb b/Library/Homebrew/vendor/macho/macho/view.rb similarity index 100% rename from Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/lib/macho/view.rb rename to Library/Homebrew/vendor/macho/macho/view.rb diff --git a/Library/Homebrew/vendor/ruby/2.0.0/gems/plist-3.3.0/lib/plist.rb b/Library/Homebrew/vendor/plist/plist.rb old mode 100644 new mode 100755 similarity index 74% rename from Library/Homebrew/vendor/ruby/2.0.0/gems/plist-3.3.0/lib/plist.rb rename to Library/Homebrew/vendor/plist/plist.rb index 986dad4617..82ecb27d28 --- a/Library/Homebrew/vendor/ruby/2.0.0/gems/plist-3.3.0/lib/plist.rb +++ b/Library/Homebrew/vendor/plist/plist.rb @@ -13,9 +13,9 @@ require 'base64' require 'cgi' require 'stringio' -require 'plist/generator' -require 'plist/parser' -require 'plist/version' +require_relative 'plist/generator' +require_relative 'plist/parser' +require_relative 'plist/version' module Plist end diff --git a/Library/Homebrew/vendor/ruby/2.0.0/gems/plist-3.3.0/lib/plist/generator.rb b/Library/Homebrew/vendor/plist/plist/generator.rb old mode 100644 new mode 100755 similarity index 100% rename from Library/Homebrew/vendor/ruby/2.0.0/gems/plist-3.3.0/lib/plist/generator.rb rename to Library/Homebrew/vendor/plist/plist/generator.rb diff --git a/Library/Homebrew/vendor/ruby/2.0.0/gems/plist-3.3.0/lib/plist/parser.rb b/Library/Homebrew/vendor/plist/plist/parser.rb similarity index 100% rename from Library/Homebrew/vendor/ruby/2.0.0/gems/plist-3.3.0/lib/plist/parser.rb rename to Library/Homebrew/vendor/plist/plist/parser.rb diff --git a/Library/Homebrew/vendor/ruby/2.0.0/gems/plist-3.3.0/lib/plist/version.rb b/Library/Homebrew/vendor/plist/plist/version.rb old mode 100644 new mode 100755 similarity index 100% rename from Library/Homebrew/vendor/ruby/2.0.0/gems/plist-3.3.0/lib/plist/version.rb rename to Library/Homebrew/vendor/plist/plist/version.rb diff --git a/Library/Homebrew/vendor/ruby/2.0.0/gems/plist-3.3.0/LICENSE.txt b/Library/Homebrew/vendor/ruby/2.0.0/gems/plist-3.3.0/LICENSE.txt deleted file mode 100644 index 0ccffe7bf3..0000000000 --- a/Library/Homebrew/vendor/ruby/2.0.0/gems/plist-3.3.0/LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2006-2010, Ben Bleything and Patrick May - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/LICENSE b/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/LICENSE deleted file mode 100644 index d68fe0fbd1..0000000000 --- a/Library/Homebrew/vendor/ruby/2.0.0/gems/ruby-macho-1.1.0/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015, 2016 William Woodruff - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE.