summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKoichi ITO <koic.ito@gmail.com>2017-07-15 19:11:50 +0900
committerKoichi ITO <koic.ito@gmail.com>2017-07-16 15:12:53 +0900
commit5687d01121f7e442a13b7b8caf2489811a3f4548 (patch)
treece4a20c76b7730326c9e77d672f4be82fa7d95ee /lib
parent9e42c6096a65308c6084b42d4dfceddf7ac13444 (diff)
downloadbundler-5687d01121f7e442a13b7b8caf2489811a3f4548.tar.gz
[RuboCop] Enable Layout/EmptyLineAfterMagicComment cop
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler.rb1
-rw-r--r--lib/bundler/capistrano.rb1
-rw-r--r--lib/bundler/cli.rb1
-rw-r--r--lib/bundler/cli/add.rb1
-rw-r--r--lib/bundler/cli/binstubs.rb1
-rw-r--r--lib/bundler/cli/cache.rb1
-rw-r--r--lib/bundler/cli/check.rb1
-rw-r--r--lib/bundler/cli/clean.rb1
-rw-r--r--lib/bundler/cli/common.rb1
-rw-r--r--lib/bundler/cli/config.rb1
-rw-r--r--lib/bundler/cli/console.rb1
-rw-r--r--lib/bundler/cli/exec.rb1
-rw-r--r--lib/bundler/cli/gem.rb1
-rw-r--r--lib/bundler/cli/info.rb1
-rw-r--r--lib/bundler/cli/init.rb1
-rw-r--r--lib/bundler/cli/inject.rb1
-rw-r--r--lib/bundler/cli/install.rb1
-rw-r--r--lib/bundler/cli/lock.rb1
-rw-r--r--lib/bundler/cli/open.rb1
-rw-r--r--lib/bundler/cli/outdated.rb1
-rw-r--r--lib/bundler/cli/package.rb1
-rw-r--r--lib/bundler/cli/platform.rb1
-rw-r--r--lib/bundler/cli/plugin.rb1
-rw-r--r--lib/bundler/cli/pristine.rb1
-rw-r--r--lib/bundler/cli/show.rb1
-rw-r--r--lib/bundler/cli/update.rb1
-rw-r--r--lib/bundler/cli/viz.rb1
-rw-r--r--lib/bundler/compact_index_client.rb1
-rw-r--r--lib/bundler/compact_index_client/cache.rb1
-rw-r--r--lib/bundler/compact_index_client/updater.rb1
-rw-r--r--lib/bundler/constants.rb1
-rw-r--r--lib/bundler/current_ruby.rb1
-rw-r--r--lib/bundler/definition.rb1
-rw-r--r--lib/bundler/dep_proxy.rb1
-rw-r--r--lib/bundler/dependency.rb1
-rw-r--r--lib/bundler/deprecate.rb1
-rw-r--r--lib/bundler/dsl.rb1
-rw-r--r--lib/bundler/endpoint_specification.rb1
-rw-r--r--lib/bundler/env.rb1
-rw-r--r--lib/bundler/environment_preserver.rb1
-rw-r--r--lib/bundler/errors.rb1
-rw-r--r--lib/bundler/feature_flag.rb1
-rw-r--r--lib/bundler/fetcher.rb1
-rw-r--r--lib/bundler/fetcher/base.rb1
-rw-r--r--lib/bundler/fetcher/compact_index.rb1
-rw-r--r--lib/bundler/fetcher/dependency.rb1
-rw-r--r--lib/bundler/fetcher/downloader.rb1
-rw-r--r--lib/bundler/fetcher/index.rb1
-rw-r--r--lib/bundler/friendly_errors.rb1
-rw-r--r--lib/bundler/gem_helper.rb1
-rw-r--r--lib/bundler/gem_helpers.rb1
-rw-r--r--lib/bundler/gem_remote_fetcher.rb1
-rw-r--r--lib/bundler/gem_tasks.rb1
-rw-r--r--lib/bundler/gem_version_promoter.rb1
-rw-r--r--lib/bundler/gemdeps.rb1
-rw-r--r--lib/bundler/graph.rb1
-rw-r--r--lib/bundler/index.rb1
-rw-r--r--lib/bundler/injector.rb1
-rw-r--r--lib/bundler/inline.rb1
-rw-r--r--lib/bundler/installer.rb1
-rw-r--r--lib/bundler/installer/gem_installer.rb1
-rw-r--r--lib/bundler/installer/parallel_installer.rb1
-rw-r--r--lib/bundler/installer/standalone.rb1
-rw-r--r--lib/bundler/lazy_specification.rb1
-rw-r--r--lib/bundler/lockfile_generator.rb1
-rw-r--r--lib/bundler/match_platform.rb1
-rw-r--r--lib/bundler/mirror.rb1
-rw-r--r--lib/bundler/plugin.rb1
-rw-r--r--lib/bundler/plugin/api/source.rb1
-rw-r--r--lib/bundler/psyched_yaml.rb1
-rw-r--r--lib/bundler/remote_specification.rb1
-rw-r--r--lib/bundler/resolver.rb1
-rw-r--r--lib/bundler/retry.rb1
-rw-r--r--lib/bundler/ruby_dsl.rb1
-rw-r--r--lib/bundler/ruby_version.rb1
-rw-r--r--lib/bundler/rubygems_ext.rb1
-rw-r--r--lib/bundler/rubygems_gem_installer.rb1
-rw-r--r--lib/bundler/rubygems_integration.rb1
-rw-r--r--lib/bundler/runtime.rb1
-rw-r--r--lib/bundler/settings.rb1
-rw-r--r--lib/bundler/setup.rb1
-rw-r--r--lib/bundler/shared_helpers.rb1
-rw-r--r--lib/bundler/similarity_detector.rb1
-rw-r--r--lib/bundler/source.rb1
-rw-r--r--lib/bundler/source/gemspec.rb1
-rw-r--r--lib/bundler/source/git.rb1
-rw-r--r--lib/bundler/source/git/git_proxy.rb1
-rw-r--r--lib/bundler/source/path.rb1
-rw-r--r--lib/bundler/source/path/installer.rb1
-rw-r--r--lib/bundler/source/rubygems.rb1
-rw-r--r--lib/bundler/source/rubygems/remote.rb1
-rw-r--r--lib/bundler/source_list.rb1
-rw-r--r--lib/bundler/spec_set.rb1
-rw-r--r--lib/bundler/ssl_certs/certificate_manager.rb1
-rw-r--r--lib/bundler/stub_specification.rb1
-rwxr-xr-xlib/bundler/templates/Executable1
-rw-r--r--lib/bundler/templates/Gemfile1
-rw-r--r--lib/bundler/templates/gems.rb1
-rw-r--r--lib/bundler/ui.rb1
-rw-r--r--lib/bundler/ui/rg_proxy.rb1
-rw-r--r--lib/bundler/ui/shell.rb1
-rw-r--r--lib/bundler/ui/silent.rb1
-rw-r--r--lib/bundler/uri_credentials_filter.rb1
-rw-r--r--lib/bundler/vendored_fileutils.rb1
-rw-r--r--lib/bundler/vendored_molinillo.rb1
-rw-r--r--lib/bundler/vendored_persistent.rb1
-rw-r--r--lib/bundler/vendored_thor.rb1
-rw-r--r--lib/bundler/version_ranges.rb1
-rw-r--r--lib/bundler/vlad.rb1
-rw-r--r--lib/bundler/worker.rb1
110 files changed, 110 insertions, 0 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb
index 068970fbc6..3fbd35b573 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/vendored_fileutils"
require "pathname"
require "rbconfig"
diff --git a/lib/bundler/capistrano.rb b/lib/bundler/capistrano.rb
index 7b0bbbd6d2..81d457cf26 100644
--- a/lib/bundler/capistrano.rb
+++ b/lib/bundler/capistrano.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
# Capistrano task for Bundler.
#
# Add "require 'bundler/capistrano'" in your Capistrano deploy.rb, and
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index 7992540793..c1fc40ab1f 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler"
require "bundler/vendored_thor"
diff --git a/lib/bundler/cli/add.rb b/lib/bundler/cli/add.rb
index e80c775433..3a10371994 100644
--- a/lib/bundler/cli/add.rb
+++ b/lib/bundler/cli/add.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/cli/common"
module Bundler
diff --git a/lib/bundler/cli/binstubs.rb b/lib/bundler/cli/binstubs.rb
index f872a2dcc7..ebb2979625 100644
--- a/lib/bundler/cli/binstubs.rb
+++ b/lib/bundler/cli/binstubs.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/cli/common"
module Bundler
diff --git a/lib/bundler/cli/cache.rb b/lib/bundler/cli/cache.rb
index 5ba105a31d..891671447d 100644
--- a/lib/bundler/cli/cache.rb
+++ b/lib/bundler/cli/cache.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class CLI::Cache
attr_reader :options
diff --git a/lib/bundler/cli/check.rb b/lib/bundler/cli/check.rb
index 96781b6c3a..553c48cebf 100644
--- a/lib/bundler/cli/check.rb
+++ b/lib/bundler/cli/check.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class CLI::Check
attr_reader :options
diff --git a/lib/bundler/cli/clean.rb b/lib/bundler/cli/clean.rb
index 5eba09c6bc..0534532ee2 100644
--- a/lib/bundler/cli/clean.rb
+++ b/lib/bundler/cli/clean.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class CLI::Clean
attr_reader :options
diff --git a/lib/bundler/cli/common.rb b/lib/bundler/cli/common.rb
index bacbb2edc5..c8c4115fa3 100644
--- a/lib/bundler/cli/common.rb
+++ b/lib/bundler/cli/common.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
module CLI::Common
def self.output_post_install_messages(messages)
diff --git a/lib/bundler/cli/config.rb b/lib/bundler/cli/config.rb
index a61cf128b1..12f71ea8fe 100644
--- a/lib/bundler/cli/config.rb
+++ b/lib/bundler/cli/config.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class CLI::Config
attr_reader :name, :options, :scope, :thor
diff --git a/lib/bundler/cli/console.rb b/lib/bundler/cli/console.rb
index 715abf2554..70a2c90f74 100644
--- a/lib/bundler/cli/console.rb
+++ b/lib/bundler/cli/console.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class CLI::Console
attr_reader :options, :group
diff --git a/lib/bundler/cli/exec.rb b/lib/bundler/cli/exec.rb
index 990f71f1d1..4b4a621879 100644
--- a/lib/bundler/cli/exec.rb
+++ b/lib/bundler/cli/exec.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/current_ruby"
module Bundler
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb
index 26dc8eedd9..5ebaf189e9 100644
--- a/lib/bundler/cli/gem.rb
+++ b/lib/bundler/cli/gem.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "pathname"
module Bundler
diff --git a/lib/bundler/cli/info.rb b/lib/bundler/cli/info.rb
index 4465fba9d4..68670f29f4 100644
--- a/lib/bundler/cli/info.rb
+++ b/lib/bundler/cli/info.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/cli/common"
module Bundler
diff --git a/lib/bundler/cli/init.rb b/lib/bundler/cli/init.rb
index ce41b2d784..50e01f54fb 100644
--- a/lib/bundler/cli/init.rb
+++ b/lib/bundler/cli/init.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class CLI::Init
attr_reader :options
diff --git a/lib/bundler/cli/inject.rb b/lib/bundler/cli/inject.rb
index b17292643f..b00675d348 100644
--- a/lib/bundler/cli/inject.rb
+++ b/lib/bundler/cli/inject.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class CLI::Inject
attr_reader :options, :name, :version, :group, :source, :gems
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb
index 35a0aa7b58..b9188b233c 100644
--- a/lib/bundler/cli/install.rb
+++ b/lib/bundler/cli/install.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/cli/common"
module Bundler
diff --git a/lib/bundler/cli/lock.rb b/lib/bundler/cli/lock.rb
index 223db9419f..2ac0537e39 100644
--- a/lib/bundler/cli/lock.rb
+++ b/lib/bundler/cli/lock.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/cli/common"
module Bundler
diff --git a/lib/bundler/cli/open.rb b/lib/bundler/cli/open.rb
index 9a21f6811c..380dbcb258 100644
--- a/lib/bundler/cli/open.rb
+++ b/lib/bundler/cli/open.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/cli/common"
require "shellwords"
diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb
index 07e17df981..3fb0feaddd 100644
--- a/lib/bundler/cli/outdated.rb
+++ b/lib/bundler/cli/outdated.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/cli/common"
module Bundler
diff --git a/lib/bundler/cli/package.rb b/lib/bundler/cli/package.rb
index cf65e8a68c..eca7e08342 100644
--- a/lib/bundler/cli/package.rb
+++ b/lib/bundler/cli/package.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class CLI::Package
attr_reader :options
diff --git a/lib/bundler/cli/platform.rb b/lib/bundler/cli/platform.rb
index 9fdab0a53c..e97cad49a4 100644
--- a/lib/bundler/cli/platform.rb
+++ b/lib/bundler/cli/platform.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class CLI::Platform
attr_reader :options
diff --git a/lib/bundler/cli/plugin.rb b/lib/bundler/cli/plugin.rb
index 277822dafc..5488a9f28d 100644
--- a/lib/bundler/cli/plugin.rb
+++ b/lib/bundler/cli/plugin.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/vendored_thor"
module Bundler
class CLI::Plugin < Thor
diff --git a/lib/bundler/cli/pristine.rb b/lib/bundler/cli/pristine.rb
index cfd90da34b..48c5b13899 100644
--- a/lib/bundler/cli/pristine.rb
+++ b/lib/bundler/cli/pristine.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/cli/common"
module Bundler
diff --git a/lib/bundler/cli/show.rb b/lib/bundler/cli/show.rb
index 47d4470aec..2424e301ff 100644
--- a/lib/bundler/cli/show.rb
+++ b/lib/bundler/cli/show.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/cli/common"
module Bundler
diff --git a/lib/bundler/cli/update.rb b/lib/bundler/cli/update.rb
index 9e4543668e..952076566f 100644
--- a/lib/bundler/cli/update.rb
+++ b/lib/bundler/cli/update.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/cli/common"
module Bundler
diff --git a/lib/bundler/cli/viz.rb b/lib/bundler/cli/viz.rb
index 767fe8f3de..644f9b25cf 100644
--- a/lib/bundler/cli/viz.rb
+++ b/lib/bundler/cli/viz.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class CLI::Viz
attr_reader :options, :gem_name
diff --git a/lib/bundler/compact_index_client.rb b/lib/bundler/compact_index_client.rb
index 3ed05ca484..6c241ca07a 100644
--- a/lib/bundler/compact_index_client.rb
+++ b/lib/bundler/compact_index_client.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "pathname"
require "set"
diff --git a/lib/bundler/compact_index_client/cache.rb b/lib/bundler/compact_index_client/cache.rb
index e44f05dc7e..264e31716d 100644
--- a/lib/bundler/compact_index_client/cache.rb
+++ b/lib/bundler/compact_index_client/cache.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "digest/md5"
module Bundler
diff --git a/lib/bundler/compact_index_client/updater.rb b/lib/bundler/compact_index_client/updater.rb
index b501fc194b..6a66fbc3fe 100644
--- a/lib/bundler/compact_index_client/updater.rb
+++ b/lib/bundler/compact_index_client/updater.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/vendored_fileutils"
require "stringio"
require "zlib"
diff --git a/lib/bundler/constants.rb b/lib/bundler/constants.rb
index 5b1c0a8cb1..2e4ebb37ee 100644
--- a/lib/bundler/constants.rb
+++ b/lib/bundler/constants.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
WINDOWS = RbConfig::CONFIG["host_os"] =~ /(msdos|mswin|djgpp|mingw)/
FREEBSD = RbConfig::CONFIG["host_os"] =~ /bsd/
diff --git a/lib/bundler/current_ruby.rb b/lib/bundler/current_ruby.rb
index fbdd3182a9..31532d108d 100644
--- a/lib/bundler/current_ruby.rb
+++ b/lib/bundler/current_ruby.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
# Returns current version of Ruby
#
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 23b61ffd01..a8b37499fd 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/lockfile_parser"
require "digest/sha1"
require "set"
diff --git a/lib/bundler/dep_proxy.rb b/lib/bundler/dep_proxy.rb
index 998975bbaf..637534e255 100644
--- a/lib/bundler/dep_proxy.rb
+++ b/lib/bundler/dep_proxy.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class DepProxy
attr_reader :__platform, :dep
diff --git a/lib/bundler/dependency.rb b/lib/bundler/dependency.rb
index 5f1371dd62..24257bc113 100644
--- a/lib/bundler/dependency.rb
+++ b/lib/bundler/dependency.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "rubygems/dependency"
require "bundler/shared_helpers"
require "bundler/rubygems_ext"
diff --git a/lib/bundler/deprecate.rb b/lib/bundler/deprecate.rb
index b978c0df6c..b3a9823925 100644
--- a/lib/bundler/deprecate.rb
+++ b/lib/bundler/deprecate.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
if defined? ::Deprecate
Deprecate = ::Deprecate
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index c368c533fe..e19097f57d 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/dependency"
require "bundler/ruby_dsl"
diff --git a/lib/bundler/endpoint_specification.rb b/lib/bundler/endpoint_specification.rb
index 5a1deeea47..04e42c2410 100644
--- a/lib/bundler/endpoint_specification.rb
+++ b/lib/bundler/endpoint_specification.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
# used for Creating Specifications from the Gemcutter Endpoint
class EndpointSpecification < Gem::Specification
diff --git a/lib/bundler/env.rb b/lib/bundler/env.rb
index 333173ac27..481cfb092d 100644
--- a/lib/bundler/env.rb
+++ b/lib/bundler/env.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/rubygems_integration"
require "bundler/source/git/git_proxy"
diff --git a/lib/bundler/environment_preserver.rb b/lib/bundler/environment_preserver.rb
index f78872442a..5a3e6c5785 100644
--- a/lib/bundler/environment_preserver.rb
+++ b/lib/bundler/environment_preserver.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class EnvironmentPreserver
INTENTIONALLY_NIL = "BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL".freeze
diff --git a/lib/bundler/errors.rb b/lib/bundler/errors.rb
index 6ce8493ea7..e471bce0b6 100644
--- a/lib/bundler/errors.rb
+++ b/lib/bundler/errors.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class BundlerError < StandardError
def self.status_code(code)
diff --git a/lib/bundler/feature_flag.rb b/lib/bundler/feature_flag.rb
index 2d054c2856..00523eb96e 100644
--- a/lib/bundler/feature_flag.rb
+++ b/lib/bundler/feature_flag.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class FeatureFlag
def self.settings_flag(flag, &default)
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb
index 9e208e4957..01a0679f7c 100644
--- a/lib/bundler/fetcher.rb
+++ b/lib/bundler/fetcher.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/vendored_persistent"
require "cgi"
require "securerandom"
diff --git a/lib/bundler/fetcher/base.rb b/lib/bundler/fetcher/base.rb
index 271729a534..27987f670a 100644
--- a/lib/bundler/fetcher/base.rb
+++ b/lib/bundler/fetcher/base.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class Fetcher
class Base
diff --git a/lib/bundler/fetcher/compact_index.rb b/lib/bundler/fetcher/compact_index.rb
index ec20f18edd..cfc74d642c 100644
--- a/lib/bundler/fetcher/compact_index.rb
+++ b/lib/bundler/fetcher/compact_index.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/fetcher/base"
require "bundler/worker"
diff --git a/lib/bundler/fetcher/dependency.rb b/lib/bundler/fetcher/dependency.rb
index 445b0f2332..741b81acac 100644
--- a/lib/bundler/fetcher/dependency.rb
+++ b/lib/bundler/fetcher/dependency.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/fetcher/base"
require "cgi"
diff --git a/lib/bundler/fetcher/downloader.rb b/lib/bundler/fetcher/downloader.rb
index 453e4645eb..cbc5e220bd 100644
--- a/lib/bundler/fetcher/downloader.rb
+++ b/lib/bundler/fetcher/downloader.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class Fetcher
class Downloader
diff --git a/lib/bundler/fetcher/index.rb b/lib/bundler/fetcher/index.rb
index d8e212989e..9529944391 100644
--- a/lib/bundler/fetcher/index.rb
+++ b/lib/bundler/fetcher/index.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/fetcher/base"
require "rubygems/remote_fetcher"
diff --git a/lib/bundler/friendly_errors.rb b/lib/bundler/friendly_errors.rb
index 9caeeee1a5..51dd60c931 100644
--- a/lib/bundler/friendly_errors.rb
+++ b/lib/bundler/friendly_errors.rb
@@ -1,5 +1,6 @@
# encoding: utf-8
# frozen_string_literal: true
+
require "cgi"
require "bundler/vendored_thor"
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb
index 6a0906a200..93ddeede32 100644
--- a/lib/bundler/gem_helper.rb
+++ b/lib/bundler/gem_helper.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/vendored_thor" unless defined?(Thor)
require "bundler"
diff --git a/lib/bundler/gem_helpers.rb b/lib/bundler/gem_helpers.rb
index 955834ff01..019ae10c66 100644
--- a/lib/bundler/gem_helpers.rb
+++ b/lib/bundler/gem_helpers.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
module GemHelpers
GENERIC_CACHE = {} # rubocop:disable MutableConstant
diff --git a/lib/bundler/gem_remote_fetcher.rb b/lib/bundler/gem_remote_fetcher.rb
index 481838a5e2..9577535d63 100644
--- a/lib/bundler/gem_remote_fetcher.rb
+++ b/lib/bundler/gem_remote_fetcher.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "rubygems/remote_fetcher"
module Bundler
diff --git a/lib/bundler/gem_tasks.rb b/lib/bundler/gem_tasks.rb
index 230e7f28f2..f736517bd7 100644
--- a/lib/bundler/gem_tasks.rb
+++ b/lib/bundler/gem_tasks.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "rake/clean"
CLOBBER.include "pkg"
diff --git a/lib/bundler/gem_version_promoter.rb b/lib/bundler/gem_version_promoter.rb
index d60d823d9c..52b5386045 100644
--- a/lib/bundler/gem_version_promoter.rb
+++ b/lib/bundler/gem_version_promoter.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
# This class contains all of the logic for determining the next version of a
# Gem to update to based on the requested level (patch, minor, major).
diff --git a/lib/bundler/gemdeps.rb b/lib/bundler/gemdeps.rb
index 8595b8c7ea..cd4b25d0e6 100644
--- a/lib/bundler/gemdeps.rb
+++ b/lib/bundler/gemdeps.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class Gemdeps
def initialize(runtime)
diff --git a/lib/bundler/graph.rb b/lib/bundler/graph.rb
index e145590430..de6bba0214 100644
--- a/lib/bundler/graph.rb
+++ b/lib/bundler/graph.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "set"
module Bundler
class Graph
diff --git a/lib/bundler/index.rb b/lib/bundler/index.rb
index fd4dea32e7..90521bcfb1 100644
--- a/lib/bundler/index.rb
+++ b/lib/bundler/index.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "set"
module Bundler
diff --git a/lib/bundler/injector.rb b/lib/bundler/injector.rb
index d0cece2869..7fe6a91ddd 100644
--- a/lib/bundler/injector.rb
+++ b/lib/bundler/injector.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class Injector
def self.inject(new_deps, options = {})
diff --git a/lib/bundler/inline.rb b/lib/bundler/inline.rb
index 00457d604a..a78a4c1f01 100644
--- a/lib/bundler/inline.rb
+++ b/lib/bundler/inline.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
# Allows for declaring a Gemfile inline in a ruby script, optionally installing
# any gems that aren't already installed on the user's system.
#
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index 084c49cb47..e5379513d9 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "erb"
require "rubygems/dependency_installer"
require "bundler/worker"
diff --git a/lib/bundler/installer/gem_installer.rb b/lib/bundler/installer/gem_installer.rb
index a4d9bcaa07..a9bd0f56a5 100644
--- a/lib/bundler/installer/gem_installer.rb
+++ b/lib/bundler/installer/gem_installer.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class GemInstaller
attr_reader :spec, :standalone, :worker, :force, :installer
diff --git a/lib/bundler/installer/parallel_installer.rb b/lib/bundler/installer/parallel_installer.rb
index 22bc8c51c6..c8e755d36e 100644
--- a/lib/bundler/installer/parallel_installer.rb
+++ b/lib/bundler/installer/parallel_installer.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/worker"
require "bundler/installer/gem_installer"
diff --git a/lib/bundler/installer/standalone.rb b/lib/bundler/installer/standalone.rb
index 03411d85e2..ce0c9df1eb 100644
--- a/lib/bundler/installer/standalone.rb
+++ b/lib/bundler/installer/standalone.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class Standalone
def initialize(groups, definition)
diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb
index b4fbba7789..993952c23b 100644
--- a/lib/bundler/lazy_specification.rb
+++ b/lib/bundler/lazy_specification.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "uri"
require "bundler/match_platform"
diff --git a/lib/bundler/lockfile_generator.rb b/lib/bundler/lockfile_generator.rb
index 2a29b20f79..585077d18d 100644
--- a/lib/bundler/lockfile_generator.rb
+++ b/lib/bundler/lockfile_generator.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class LockfileGenerator
attr_reader :definition
diff --git a/lib/bundler/match_platform.rb b/lib/bundler/match_platform.rb
index 050cd0efd3..56cbbfb95d 100644
--- a/lib/bundler/match_platform.rb
+++ b/lib/bundler/match_platform.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/gem_helpers"
module Bundler
diff --git a/lib/bundler/mirror.rb b/lib/bundler/mirror.rb
index 8a081ba91f..a6fa070eb8 100644
--- a/lib/bundler/mirror.rb
+++ b/lib/bundler/mirror.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "socket"
module Bundler
diff --git a/lib/bundler/plugin.rb b/lib/bundler/plugin.rb
index 66f485ef8e..99c9a867b0 100644
--- a/lib/bundler/plugin.rb
+++ b/lib/bundler/plugin.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/plugin/api"
module Bundler
diff --git a/lib/bundler/plugin/api/source.rb b/lib/bundler/plugin/api/source.rb
index 820f9ee874..aadd65e65e 100644
--- a/lib/bundler/plugin/api/source.rb
+++ b/lib/bundler/plugin/api/source.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "uri"
require "digest/sha1"
diff --git a/lib/bundler/psyched_yaml.rb b/lib/bundler/psyched_yaml.rb
index 69d2ae78c5..aeb2b30310 100644
--- a/lib/bundler/psyched_yaml.rb
+++ b/lib/bundler/psyched_yaml.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
# Psych could be a gem, so try to ask for it
begin
gem "psych"
diff --git a/lib/bundler/remote_specification.rb b/lib/bundler/remote_specification.rb
index 208ee1d4b7..23e1234330 100644
--- a/lib/bundler/remote_specification.rb
+++ b/lib/bundler/remote_specification.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "uri"
module Bundler
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb
index 39a52b4df8..aa512cb2e9 100644
--- a/lib/bundler/resolver.rb
+++ b/lib/bundler/resolver.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class Resolver
require "bundler/vendored_molinillo"
diff --git a/lib/bundler/retry.rb b/lib/bundler/retry.rb
index 092fb866b3..244606dcc9 100644
--- a/lib/bundler/retry.rb
+++ b/lib/bundler/retry.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
# General purpose class for retrying code that may fail
class Retry
diff --git a/lib/bundler/ruby_dsl.rb b/lib/bundler/ruby_dsl.rb
index a410b7f3d7..f6ba220cd5 100644
--- a/lib/bundler/ruby_dsl.rb
+++ b/lib/bundler/ruby_dsl.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
module RubyDsl
def ruby(*ruby_version)
diff --git a/lib/bundler/ruby_version.rb b/lib/bundler/ruby_version.rb
index f0a001d296..d4e1bdbfd5 100644
--- a/lib/bundler/ruby_version.rb
+++ b/lib/bundler/ruby_version.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class RubyVersion
attr_reader :versions,
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb
index 0d282a8fcc..e9f0eac355 100644
--- a/lib/bundler/rubygems_ext.rb
+++ b/lib/bundler/rubygems_ext.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "pathname"
if defined?(Gem::QuickLoader)
diff --git a/lib/bundler/rubygems_gem_installer.rb b/lib/bundler/rubygems_gem_installer.rb
index 977e13d948..1d9da0e329 100644
--- a/lib/bundler/rubygems_gem_installer.rb
+++ b/lib/bundler/rubygems_gem_installer.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "rubygems/installer"
module Bundler
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index d94abf838f..1ac040dd83 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "monitor"
require "rubygems"
require "rubygems/config_file"
diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb
index c8f5b8496d..c94effd3a8 100644
--- a/lib/bundler/runtime.rb
+++ b/lib/bundler/runtime.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "digest/sha1"
module Bundler
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index 45934f2944..96e67bfdb4 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "uri"
module Bundler
diff --git a/lib/bundler/setup.rb b/lib/bundler/setup.rb
index 9aae6478cd..ac6a5bf861 100644
--- a/lib/bundler/setup.rb
+++ b/lib/bundler/setup.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/shared_helpers"
if Bundler::SharedHelpers.in_bundle?
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index 339ddeb7de..99b073f542 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "pathname"
require "rubygems"
diff --git a/lib/bundler/similarity_detector.rb b/lib/bundler/similarity_detector.rb
index e9c1413ea3..b7f3ee7afa 100644
--- a/lib/bundler/similarity_detector.rb
+++ b/lib/bundler/similarity_detector.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class SimilarityDetector
SimilarityScore = Struct.new(:string, :distance)
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb
index f3d50adecf..48f73d960e 100644
--- a/lib/bundler/source.rb
+++ b/lib/bundler/source.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class Source
autoload :Gemspec, "bundler/source/gemspec"
diff --git a/lib/bundler/source/gemspec.rb b/lib/bundler/source/gemspec.rb
index 05e613277f..7e3447e776 100644
--- a/lib/bundler/source/gemspec.rb
+++ b/lib/bundler/source/gemspec.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class Source
class Gemspec < Path
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb
index d1e32946eb..020cf74766 100644
--- a/lib/bundler/source/git.rb
+++ b/lib/bundler/source/git.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/vendored_fileutils"
require "uri"
require "digest/sha1"
diff --git a/lib/bundler/source/git/git_proxy.rb b/lib/bundler/source/git/git_proxy.rb
index aa4c125a33..5b09b52a60 100644
--- a/lib/bundler/source/git/git_proxy.rb
+++ b/lib/bundler/source/git/git_proxy.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "shellwords"
require "tempfile"
module Bundler
diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb
index 323e60e83e..310a30f1ec 100644
--- a/lib/bundler/source/path.rb
+++ b/lib/bundler/source/path.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class Source
class Path < Source
diff --git a/lib/bundler/source/path/installer.rb b/lib/bundler/source/path/installer.rb
index 9c2f74a31b..64e63766dd 100644
--- a/lib/bundler/source/path/installer.rb
+++ b/lib/bundler/source/path/installer.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class Source
class Path
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index e76a00361a..0ac45b3d70 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "uri"
require "rubygems/user_interaction"
diff --git a/lib/bundler/source/rubygems/remote.rb b/lib/bundler/source/rubygems/remote.rb
index e60c1f9055..67f4f373db 100644
--- a/lib/bundler/source/rubygems/remote.rb
+++ b/lib/bundler/source/rubygems/remote.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class Source
class Rubygems
diff --git a/lib/bundler/source_list.rb b/lib/bundler/source_list.rb
index 136650e436..dd5a07afd7 100644
--- a/lib/bundler/source_list.rb
+++ b/lib/bundler/source_list.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
class SourceList
attr_reader :path_sources,
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb
index e68da87704..5239a96213 100644
--- a/lib/bundler/spec_set.rb
+++ b/lib/bundler/spec_set.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "tsort"
require "forwardable"
require "set"
diff --git a/lib/bundler/ssl_certs/certificate_manager.rb b/lib/bundler/ssl_certs/certificate_manager.rb
index 05de6410be..26fc38ec18 100644
--- a/lib/bundler/ssl_certs/certificate_manager.rb
+++ b/lib/bundler/ssl_certs/certificate_manager.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/vendored_fileutils"
require "net/https"
require "openssl"
diff --git a/lib/bundler/stub_specification.rb b/lib/bundler/stub_specification.rb
index aeacf245a3..0dd024024a 100644
--- a/lib/bundler/stub_specification.rb
+++ b/lib/bundler/stub_specification.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/remote_specification"
module Bundler
diff --git a/lib/bundler/templates/Executable b/lib/bundler/templates/Executable
index fe22de0a6d..86e73fbbc3 100755
--- a/lib/bundler/templates/Executable
+++ b/lib/bundler/templates/Executable
@@ -1,5 +1,6 @@
#!/usr/bin/env <%= Bundler.settings[:shebang] || RbConfig::CONFIG["ruby_install_name"] %>
# frozen_string_literal: true
+
#
# This file was generated by Bundler.
#
diff --git a/lib/bundler/templates/Gemfile b/lib/bundler/templates/Gemfile
index 21c6283123..1afd2cce67 100644
--- a/lib/bundler/templates/Gemfile
+++ b/lib/bundler/templates/Gemfile
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
diff --git a/lib/bundler/templates/gems.rb b/lib/bundler/templates/gems.rb
index 9495f50c0e..6dfb8c0836 100644
--- a/lib/bundler/templates/gems.rb
+++ b/lib/bundler/templates/gems.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
# A sample gems.rb
source "https://rubygems.org"
diff --git a/lib/bundler/ui.rb b/lib/bundler/ui.rb
index 794c000dc4..8138b30d38 100644
--- a/lib/bundler/ui.rb
+++ b/lib/bundler/ui.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
module UI
autoload :RGProxy, "bundler/ui/rg_proxy"
diff --git a/lib/bundler/ui/rg_proxy.rb b/lib/bundler/ui/rg_proxy.rb
index 95a1ecdf0c..e2f98481db 100644
--- a/lib/bundler/ui/rg_proxy.rb
+++ b/lib/bundler/ui/rg_proxy.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/ui"
require "rubygems/user_interaction"
diff --git a/lib/bundler/ui/shell.rb b/lib/bundler/ui/shell.rb
index e0d0d68aa9..3b3b6bfb53 100644
--- a/lib/bundler/ui/shell.rb
+++ b/lib/bundler/ui/shell.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/vendored_thor"
module Bundler
diff --git a/lib/bundler/ui/silent.rb b/lib/bundler/ui/silent.rb
index 48390b7198..dca1b2ac86 100644
--- a/lib/bundler/ui/silent.rb
+++ b/lib/bundler/ui/silent.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
module UI
class Silent
diff --git a/lib/bundler/uri_credentials_filter.rb b/lib/bundler/uri_credentials_filter.rb
index 997a307533..ee3692268c 100644
--- a/lib/bundler/uri_credentials_filter.rb
+++ b/lib/bundler/uri_credentials_filter.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
module URICredentialsFilter
module_function
diff --git a/lib/bundler/vendored_fileutils.rb b/lib/bundler/vendored_fileutils.rb
index b2522cd5e0..d14e98baf7 100644
--- a/lib/bundler/vendored_fileutils.rb
+++ b/lib/bundler/vendored_fileutils.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler; end
if RUBY_VERSION >= "2.4"
require "bundler/vendor/fileutils/lib/fileutils"
diff --git a/lib/bundler/vendored_molinillo.rb b/lib/bundler/vendored_molinillo.rb
index 7b231263cb..061b634f72 100644
--- a/lib/bundler/vendored_molinillo.rb
+++ b/lib/bundler/vendored_molinillo.rb
@@ -1,3 +1,4 @@
# frozen_string_literal: true
+
module Bundler; end
require "bundler/vendor/molinillo/lib/molinillo"
diff --git a/lib/bundler/vendored_persistent.rb b/lib/bundler/vendored_persistent.rb
index 729ac6b6f5..ecbf21e30a 100644
--- a/lib/bundler/vendored_persistent.rb
+++ b/lib/bundler/vendored_persistent.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
# We forcibly require OpenSSL, because net/http/persistent will only autoload
# it. On some Rubies, autoload fails but explicit require succeeds.
begin
diff --git a/lib/bundler/vendored_thor.rb b/lib/bundler/vendored_thor.rb
index 4a5d0cf6bb..8cca090f55 100644
--- a/lib/bundler/vendored_thor.rb
+++ b/lib/bundler/vendored_thor.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
def self.require_thor_actions
Kernel.send(:require, "bundler/vendor/thor/lib/thor/actions")
diff --git a/lib/bundler/version_ranges.rb b/lib/bundler/version_ranges.rb
index 1ee8440edd..ec25716cde 100644
--- a/lib/bundler/version_ranges.rb
+++ b/lib/bundler/version_ranges.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Bundler
module VersionRanges
NEq = Struct.new(:version)
diff --git a/lib/bundler/vlad.rb b/lib/bundler/vlad.rb
index db78f84baa..bd2128c73d 100644
--- a/lib/bundler/vlad.rb
+++ b/lib/bundler/vlad.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
# Vlad task for Bundler.
#
# Add "require 'bundler/vlad'" in your Vlad deploy.rb, and
diff --git a/lib/bundler/worker.rb b/lib/bundler/worker.rb
index b73a7ed04a..e91cfa7805 100644
--- a/lib/bundler/worker.rb
+++ b/lib/bundler/worker.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "thread"
module Bundler