From 921d4aad77fa940d66407efbc3c7342bbf8a081c Mon Sep 17 00:00:00 2001
From: Mike McQuaid <mike@mikemcquaid.com>
Date: Thu, 21 Feb 2019 15:40:43 +0000
Subject: [PATCH] Unify test/vendor Gemfiles and bundler configuration.

---
 Library/Homebrew/{test => }/.bundle/config    |  4 +-
 Library/Homebrew/Gemfile                      | 22 ++++++++
 Library/Homebrew/{test => }/Gemfile.lock      | 54 ++++++++++++++++++-
 Library/Homebrew/test/Gemfile                 | 18 -------
 Library/Homebrew/vendor/.bundle/config        |  5 --
 .../vendor/bundle-standalone/bundler/setup.rb | 44 ---------------
 6 files changed, 77 insertions(+), 70 deletions(-)
 rename Library/Homebrew/{test => }/.bundle/config (58%)
 create mode 100644 Library/Homebrew/Gemfile
 rename Library/Homebrew/{test => }/Gemfile.lock (59%)
 delete mode 100644 Library/Homebrew/test/Gemfile
 delete mode 100644 Library/Homebrew/vendor/.bundle/config
 delete mode 100644 Library/Homebrew/vendor/bundle-standalone/bundler/setup.rb

diff --git a/Library/Homebrew/test/.bundle/config b/Library/Homebrew/.bundle/config
similarity index 58%
rename from Library/Homebrew/test/.bundle/config
rename to Library/Homebrew/.bundle/config
index 065e005f2b..d5b0b36bc4 100644
--- a/Library/Homebrew/test/.bundle/config
+++ b/Library/Homebrew/.bundle/config
@@ -1,6 +1,6 @@
 ---
-BUNDLE_BIN: "../bin"
-BUNDLE_PATH: "../vendor/bundle"
+BUNDLE_BIN: "false"
 BUNDLE_DISABLE_SHARED_GEMS: "true"
 BUNDLE_JOBS: "4"
+BUNDLE_PATH: "vendor/bundle"
 BUNDLE_RETRY: "3"
diff --git a/Library/Homebrew/Gemfile b/Library/Homebrew/Gemfile
new file mode 100644
index 0000000000..8fc84b9e5e
--- /dev/null
+++ b/Library/Homebrew/Gemfile
@@ -0,0 +1,22 @@
+source "https://rubygems.org"
+
+# installed gems
+gem "coveralls", require: false
+gem "parallel_tests"
+gem "ronn", require: false
+gem "rspec"
+gem "rspec-its", require: false
+gem "rspec-retry", require: false
+gem "rspec-wait", require: false
+gem "rubocop"
+gem "simplecov", require: false
+gem "simplecov-cobertura", require: false
+
+# vendored gems
+gem "activesupport"
+gem "backports"
+gem "concurrent-ruby"
+gem "mechanize"
+gem "plist"
+gem "rubocop-rspec"
+gem "ruby-macho"
diff --git a/Library/Homebrew/test/Gemfile.lock b/Library/Homebrew/Gemfile.lock
similarity index 59%
rename from Library/Homebrew/test/Gemfile.lock
rename to Library/Homebrew/Gemfile.lock
index 9e85fb2cfd..a7339496b2 100644
--- a/Library/Homebrew/test/Gemfile.lock
+++ b/Library/Homebrew/Gemfile.lock
@@ -1,7 +1,15 @@
 GEM
   remote: https://rubygems.org/
   specs:
+    activesupport (5.2.2)
+      concurrent-ruby (~> 1.0, >= 1.0.2)
+      i18n (>= 0.7, < 2)
+      minitest (~> 5.1)
+      tzinfo (~> 1.1)
     ast (2.4.0)
+    backports (3.12.0)
+    concurrent-ruby (1.1.4)
+    connection_pool (2.2.2)
     coveralls (0.8.22)
       json (>= 1.8, < 3)
       simplecov (~> 0.16.1)
@@ -10,15 +18,42 @@ GEM
       tins (~> 1.6)
     diff-lcs (1.3)
     docile (1.3.1)
+    domain_name (0.5.20180417)
+      unf (>= 0.0.5, < 1.0.0)
     hpricot (0.8.6)
+    http-cookie (1.0.3)
+      domain_name (~> 0.5)
+    i18n (1.5.3)
+      concurrent-ruby (~> 1.0)
     jaro_winkler (1.5.2)
     json (2.1.0)
+    mechanize (2.7.6)
+      domain_name (~> 0.5, >= 0.5.1)
+      http-cookie (~> 1.0)
+      mime-types (>= 1.17.2)
+      net-http-digest_auth (~> 1.1, >= 1.1.1)
+      net-http-persistent (>= 2.5.2)
+      nokogiri (~> 1.6)
+      ntlm-http (~> 0.1, >= 0.1.1)
+      webrobots (>= 0.0.9, < 0.2)
+    mime-types (3.2.2)
+      mime-types-data (~> 3.2015)
+    mime-types-data (3.2018.0812)
+    mini_portile2 (2.4.0)
+    minitest (5.11.3)
     mustache (1.1.0)
+    net-http-digest_auth (1.4.1)
+    net-http-persistent (3.0.0)
+      connection_pool (~> 2.2)
+    nokogiri (1.10.1)
+      mini_portile2 (~> 2.4.0)
+    ntlm-http (0.1.1)
     parallel (1.13.0)
     parallel_tests (2.28.0)
       parallel
     parser (2.6.0.0)
       ast (~> 2.4.0)
+    plist (3.5.0)
     powerpack (0.1.2)
     psych (3.1.0)
     rainbow (3.0.0)
@@ -56,6 +91,9 @@ GEM
       rainbow (>= 2.2.2, < 4.0)
       ruby-progressbar (~> 1.7)
       unicode-display_width (~> 1.4.0)
+    rubocop-rspec (1.32.0)
+      rubocop (>= 0.60.0)
+    ruby-macho (2.2.0)
     ruby-progressbar (1.10.0)
     simplecov (0.16.1)
       docile (~> 1.1)
@@ -67,23 +105,37 @@ GEM
     term-ansicolor (1.7.1)
       tins (~> 1.0)
     thor (0.19.4)
+    thread_safe (0.3.6)
     tins (1.20.2)
+    tzinfo (1.2.5)
+      thread_safe (~> 0.1)
+    unf (0.1.4)
+      unf_ext
+    unf_ext (0.0.7.5)
     unicode-display_width (1.4.1)
+    webrobots (0.1.2)
 
 PLATFORMS
   ruby
 
 DEPENDENCIES
+  activesupport
+  backports
+  concurrent-ruby
   coveralls
+  mechanize
   parallel_tests
+  plist
   ronn
   rspec
   rspec-its
   rspec-retry
   rspec-wait
   rubocop
+  rubocop-rspec
+  ruby-macho
   simplecov
   simplecov-cobertura
 
 BUNDLED WITH
-   1.16.6
+   2.0.1
diff --git a/Library/Homebrew/test/Gemfile b/Library/Homebrew/test/Gemfile
deleted file mode 100644
index 16cc49d415..0000000000
--- a/Library/Homebrew/test/Gemfile
+++ /dev/null
@@ -1,18 +0,0 @@
-source "https://rubygems.org"
-
-gem "parallel_tests"
-gem "rspec"
-gem "rspec-its", require: false
-gem "rspec-retry", require: false
-gem "rspec-wait", require: false
-gem "rubocop"
-
-group :development do
-  gem "ronn", require: false
-end
-
-group :coverage do
-  gem "coveralls", require: false
-  gem "simplecov", require: false
-  gem "simplecov-cobertura", require: false
-end
diff --git a/Library/Homebrew/vendor/.bundle/config b/Library/Homebrew/vendor/.bundle/config
deleted file mode 100644
index d43d1a4c41..0000000000
--- a/Library/Homebrew/vendor/.bundle/config
+++ /dev/null
@@ -1,5 +0,0 @@
----
-BUNDLE_PATH: "bundle-standalone"
-BUNDLE_DISABLE_SHARED_GEMS: "true"
-BUNDLE_BIN: "false"
-BUNDLE_CLEAN: "true"
diff --git a/Library/Homebrew/vendor/bundle-standalone/bundler/setup.rb b/Library/Homebrew/vendor/bundle-standalone/bundler/setup.rb
deleted file mode 100644
index d666f45a1d..0000000000
--- a/Library/Homebrew/vendor/bundle-standalone/bundler/setup.rb
+++ /dev/null
@@ -1,44 +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/concurrent-ruby-1.1.4/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/i18n-1.5.3/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/minitest-5.11.3/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/thread_safe-0.3.6/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tzinfo-1.2.5/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/activesupport-5.2.2/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ast-2.4.0/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/backports-3.12.0/lib"
-$:.unshift "#{path}/"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/connection_pool-2.2.2/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-18/2.3.0/unf_ext-0.0.7.5"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unf_ext-0.0.7.5/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unf-0.1.4/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/domain_name-0.5.20180417/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/http-cookie-1.0.3/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-18/2.3.0/jaro_winkler-1.5.2"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/jaro_winkler-1.5.2/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mime-types-data-3.2018.0812/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mime-types-3.2.2/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/net-http-digest_auth-1.4.1/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/net-http-persistent-3.0.0/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mini_portile2-2.4.0/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-18/2.3.0/nokogiri-1.10.1"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/nokogiri-1.10.1/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ntlm-http-0.1.1/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/webrobots-0.1.2/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mechanize-2.7.6/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel-1.13.0/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parser-2.6.0.0/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/plist-3.5.0/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/powerpack-0.1.2/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-18/2.3.0/psych-3.1.0"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/psych-3.1.0/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rainbow-3.0.0/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.10.0/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-1.4.1/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-0.65.0/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-1.32.0/lib"
-$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-2.2.0/lib"
-- 
GitLab