bundler 1.11.2 → 1.12.0.pre.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bundler might be problematic. Click here for more details.

Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +24 -0
  3. data/.gitignore +2 -2
  4. data/.rubocop.yml +17 -2
  5. data/.rubocop_todo.yml +145 -18
  6. data/.travis.yml +9 -2
  7. data/CHANGELOG.md +42 -0
  8. data/Rakefile +20 -13
  9. data/bin/rake +5 -0
  10. data/bin/rspec +5 -0
  11. data/bin/rubocop +7 -1
  12. data/bundler.gemspec +2 -1
  13. data/exe/bundle +10 -2
  14. data/exe/bundle_ruby +2 -1
  15. data/exe/bundler +3 -1
  16. data/lib/bundler.rb +54 -51
  17. data/lib/bundler/capistrano.rb +1 -0
  18. data/lib/bundler/cli.rb +26 -4
  19. data/lib/bundler/cli/binstubs.rb +1 -0
  20. data/lib/bundler/cli/cache.rb +1 -0
  21. data/lib/bundler/cli/check.rb +4 -1
  22. data/lib/bundler/cli/clean.rb +1 -0
  23. data/lib/bundler/cli/common.rb +1 -0
  24. data/lib/bundler/cli/config.rb +5 -5
  25. data/lib/bundler/cli/console.rb +1 -0
  26. data/lib/bundler/cli/exec.rb +4 -9
  27. data/lib/bundler/cli/gem.rb +12 -9
  28. data/lib/bundler/cli/init.rb +1 -0
  29. data/lib/bundler/cli/inject.rb +1 -0
  30. data/lib/bundler/cli/install.rb +8 -5
  31. data/lib/bundler/cli/lock.rb +2 -0
  32. data/lib/bundler/cli/open.rb +1 -0
  33. data/lib/bundler/cli/outdated.rb +36 -9
  34. data/lib/bundler/cli/package.rb +1 -0
  35. data/lib/bundler/cli/platform.rb +4 -1
  36. data/lib/bundler/cli/show.rb +1 -0
  37. data/lib/bundler/cli/update.rb +6 -6
  38. data/lib/bundler/cli/viz.rb +4 -6
  39. data/lib/bundler/constants.rb +1 -0
  40. data/lib/bundler/current_ruby.rb +34 -168
  41. data/lib/bundler/definition.rb +41 -15
  42. data/lib/bundler/dep_proxy.rb +1 -0
  43. data/lib/bundler/dependency.rb +10 -0
  44. data/lib/bundler/deployment.rb +1 -0
  45. data/lib/bundler/deprecate.rb +1 -0
  46. data/lib/bundler/dsl.rb +19 -9
  47. data/lib/bundler/endpoint_specification.rb +37 -8
  48. data/lib/bundler/env.rb +4 -3
  49. data/lib/bundler/environment.rb +1 -0
  50. data/lib/bundler/errors.rb +51 -32
  51. data/lib/bundler/fetcher.rb +44 -30
  52. data/lib/bundler/fetcher/base.rb +3 -2
  53. data/lib/bundler/fetcher/compact_index.rb +98 -0
  54. data/lib/bundler/fetcher/dependency.rb +36 -36
  55. data/lib/bundler/fetcher/downloader.rb +14 -8
  56. data/lib/bundler/fetcher/index.rb +28 -5
  57. data/lib/bundler/friendly_errors.rb +93 -85
  58. data/lib/bundler/gem_helper.rb +20 -21
  59. data/lib/bundler/gem_helpers.rb +9 -2
  60. data/lib/bundler/gem_remote_fetcher.rb +1 -0
  61. data/lib/bundler/gem_tasks.rb +1 -0
  62. data/lib/bundler/graph.rb +16 -17
  63. data/lib/bundler/index.rb +4 -6
  64. data/lib/bundler/injector.rb +1 -0
  65. data/lib/bundler/inline.rb +8 -2
  66. data/lib/bundler/installer.rb +4 -4
  67. data/lib/bundler/installer/gem_installer.rb +1 -0
  68. data/lib/bundler/installer/parallel_installer.rb +3 -2
  69. data/lib/bundler/installer/standalone.rb +5 -1
  70. data/lib/bundler/lazy_specification.rb +5 -2
  71. data/lib/bundler/lockfile_parser.rb +22 -15
  72. data/lib/bundler/match_platform.rb +1 -0
  73. data/lib/bundler/mirror.rb +218 -0
  74. data/lib/bundler/path_preserver.rb +12 -0
  75. data/lib/bundler/psyched_yaml.rb +1 -0
  76. data/lib/bundler/remote_specification.rb +4 -1
  77. data/lib/bundler/resolver.rb +17 -16
  78. data/lib/bundler/retry.rb +1 -0
  79. data/lib/bundler/ruby_dsl.rb +8 -2
  80. data/lib/bundler/ruby_version.rb +58 -61
  81. data/lib/bundler/rubygems_ext.rb +4 -3
  82. data/lib/bundler/rubygems_gem_installer.rb +1 -0
  83. data/lib/bundler/rubygems_integration.rb +9 -14
  84. data/lib/bundler/runtime.rb +17 -22
  85. data/lib/bundler/settings.rb +17 -21
  86. data/lib/bundler/setup.rb +1 -0
  87. data/lib/bundler/shared_helpers.rb +47 -17
  88. data/lib/bundler/similarity_detector.rb +1 -0
  89. data/lib/bundler/source.rb +2 -1
  90. data/lib/bundler/source/git.rb +2 -1
  91. data/lib/bundler/source/git/git_proxy.rb +33 -7
  92. data/lib/bundler/source/path.rb +17 -10
  93. data/lib/bundler/source/path/installer.rb +1 -0
  94. data/lib/bundler/source/rubygems.rb +4 -3
  95. data/lib/bundler/source/rubygems/remote.rb +16 -0
  96. data/lib/bundler/source_list.rb +1 -0
  97. data/lib/bundler/spec_set.rb +1 -0
  98. data/lib/bundler/ssl_certs/certificate_manager.rb +1 -0
  99. data/lib/bundler/stub_specification.rb +1 -0
  100. data/lib/bundler/templates/Executable +1 -0
  101. data/lib/bundler/templates/Gemfile +1 -0
  102. data/lib/bundler/templates/newgem/.travis.yml.tt +1 -0
  103. data/lib/bundler/templates/newgem/newgem.gemspec.tt +2 -2
  104. data/lib/bundler/ui.rb +1 -0
  105. data/lib/bundler/ui/rg_proxy.rb +1 -0
  106. data/lib/bundler/ui/shell.rb +2 -1
  107. data/lib/bundler/ui/silent.rb +1 -0
  108. data/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb +78 -0
  109. data/lib/bundler/vendor/compact_index_client/lib/compact_index_client/cache.rb +97 -0
  110. data/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb +55 -0
  111. data/lib/bundler/vendor/compact_index_client/lib/compact_index_client/version.rb +3 -0
  112. data/lib/bundler/vendor/molinillo/lib/molinillo.rb +4 -0
  113. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +13 -0
  114. data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +5 -0
  115. data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +2 -1
  116. data/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +2 -1
  117. data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +37 -14
  118. data/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +2 -1
  119. data/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +7 -7
  120. data/lib/bundler/vendored_molinillo.rb +1 -0
  121. data/lib/bundler/vendored_persistent.rb +1 -0
  122. data/lib/bundler/vendored_thor.rb +1 -0
  123. data/lib/bundler/version.rb +6 -1
  124. data/lib/bundler/vlad.rb +1 -0
  125. data/lib/bundler/worker.rb +12 -2
  126. data/man/bundle-config.ronn +6 -0
  127. data/man/bundle-gem.ronn +5 -5
  128. metadata +14 -6
  129. data/lib/bundler/gem_path_manipulation.rb +0 -8
data/lib/bundler/setup.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "bundler/shared_helpers"
2
3
 
3
4
  if Bundler::SharedHelpers.in_bundle?
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "pathname"
2
3
  require "rubygems"
3
4
 
@@ -74,26 +75,14 @@ module Bundler
74
75
  end
75
76
 
76
77
  def set_bundle_environment
77
- # Set PATH
78
- paths = (ENV["PATH"] || "").split(File::PATH_SEPARATOR)
79
- paths.unshift "#{Bundler.bundle_path}/bin"
80
- ENV["PATH"] = paths.uniq.join(File::PATH_SEPARATOR)
81
-
82
- # Set RUBYOPT
83
- rubyopt = [ENV["RUBYOPT"]].compact
84
- if rubyopt.empty? || rubyopt.first !~ %r{-rbundler/setup}
85
- rubyopt.unshift %(-rbundler/setup)
86
- ENV["RUBYOPT"] = rubyopt.join(" ")
87
- end
88
-
89
- # Set RUBYLIB
90
- rubylib = (ENV["RUBYLIB"] || "").split(File::PATH_SEPARATOR)
91
- rubylib.unshift File.expand_path("../..", __FILE__)
92
- ENV["RUBYLIB"] = rubylib.uniq.join(File::PATH_SEPARATOR)
78
+ set_bundle_variables
79
+ set_path
80
+ set_rubyopt
81
+ set_rubylib
93
82
  end
94
83
 
95
84
  # Rescues permissions errors raised by file system operations
96
- # (ie. Errno:EACCESS) and raises more friendly errors instead.
85
+ # (ie. Errno:EACCESS, Errno::EAGAIN) and raises more friendly errors instead.
97
86
  #
98
87
  # @param path [String] the path that the action will be attempted to
99
88
  # @param action [Symbol, #to_s] the type of operation that will be
@@ -103,6 +92,8 @@ module Bundler
103
92
  #
104
93
  # @raise [Bundler::PermissionError] if Errno:EACCES is raised in the
105
94
  # given block
95
+ # @raise [Bundler::TemporaryResourceError] if Errno:EAGAIN is raised in the
96
+ # given block
106
97
  #
107
98
  # @example
108
99
  # filesystem_access("vendor/cache", :write) do
@@ -114,6 +105,15 @@ module Bundler
114
105
  yield path
115
106
  rescue Errno::EACCES
116
107
  raise PermissionError.new(path, action)
108
+ rescue Errno::EAGAIN
109
+ raise TemporaryResourceError.new(path, action)
110
+ end
111
+
112
+ def const_get_safely(constant_name, namespace)
113
+ const_in_namespace = namespace.constants.include?(constant_name.to_s) ||
114
+ namespace.constants.include?(constant_name.to_sym)
115
+ return nil unless const_in_namespace
116
+ namespace.const_get(constant_name)
117
117
  end
118
118
 
119
119
  private
@@ -156,6 +156,36 @@ module Bundler
156
156
  end
157
157
  end
158
158
 
159
+ def set_bundle_variables
160
+ begin
161
+ ENV["BUNDLE_BIN_PATH"] = Bundler.rubygems.bin_path("bundler", "bundle", VERSION)
162
+ rescue Gem::GemNotFoundException
163
+ ENV["BUNDLE_BIN_PATH"] = File.expand_path("../../../exe/bundle", __FILE__)
164
+ end
165
+
166
+ # Set BUNDLE_GEMFILE
167
+ ENV["BUNDLE_GEMFILE"] = find_gemfile.to_s
168
+ end
169
+
170
+ def set_path
171
+ paths = (ENV["PATH"] || "").split(File::PATH_SEPARATOR)
172
+ paths.unshift "#{Bundler.bundle_path}/bin"
173
+ ENV["PATH"] = paths.uniq.join(File::PATH_SEPARATOR)
174
+ end
175
+
176
+ def set_rubyopt
177
+ rubyopt = [ENV["RUBYOPT"]].compact
178
+ return if !rubyopt.empty? && rubyopt.first =~ %r{-rbundler/setup}
179
+ rubyopt.unshift %(-rbundler/setup)
180
+ ENV["RUBYOPT"] = rubyopt.join(" ")
181
+ end
182
+
183
+ def set_rubylib
184
+ rubylib = (ENV["RUBYLIB"] || "").split(File::PATH_SEPARATOR)
185
+ rubylib.unshift File.expand_path("../..", __FILE__)
186
+ ENV["RUBYLIB"] = rubylib.uniq.join(File::PATH_SEPARATOR)
187
+ end
188
+
159
189
  def clean_load_path
160
190
  # handle 1.9 where system gems are always on the load path
161
191
  if defined?(::Gem)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Bundler
2
3
  class SimilarityDetector
3
4
  SimilarityScore = Struct.new(:string, :distance)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Bundler
2
3
  class Source
3
4
  autoload :Rubygems, "bundler/source/rubygems"
@@ -17,7 +18,7 @@ module Bundler
17
18
  locked_spec = Bundler.locked_gems.specs.find {|s| s.name == spec.name }
18
19
  locked_spec_version = locked_spec.version if locked_spec
19
20
  if locked_spec_version && spec.version != locked_spec_version
20
- message << " (was #{locked_spec_version})"
21
+ message += " (was #{locked_spec_version})"
21
22
  end
22
23
  end
23
24
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "fileutils"
2
3
  require "uri"
3
4
  require "digest/sha1"
@@ -35,7 +36,7 @@ module Bundler
35
36
  end
36
37
 
37
38
  def to_lock
38
- out = "GIT\n"
39
+ out = String.new("GIT\n")
39
40
  out << " remote: #{@uri}\n"
40
41
  out << " revision: #{revision}\n"
41
42
  %w(ref branch tag submodules).each do |opt|
@@ -1,9 +1,11 @@
1
+ # frozen_string_literal: true
1
2
  module Bundler
2
3
  class Source
3
4
  class Git < Path
4
5
  class GitNotInstalledError < GitError
5
6
  def initialize
6
- msg = "You need to install git to be able to use gems from git repositories. "
7
+ msg = String.new
8
+ msg << "You need to install git to be able to use gems from git repositories. "
7
9
  msg << "For help installing git, please refer to GitHub's tutorial at https://help.github.com/articles/set-up-git"
8
10
  super msg
9
11
  end
@@ -11,7 +13,8 @@ module Bundler
11
13
 
12
14
  class GitNotAllowedError < GitError
13
15
  def initialize(command)
14
- msg = "Bundler is trying to run a `git #{command}` at runtime. You probably need to run `bundle install`. However, "
16
+ msg = String.new
17
+ msg << "Bundler is trying to run a `git #{command}` at runtime. You probably need to run `bundle install`. However, "
15
18
  msg << "this error message could probably be more useful. Please submit a ticket at http://github.com/bundler/bundler/issues "
16
19
  msg << "with steps to reproduce as well as the following\n\nCALLER: #{caller.join("\n")}"
17
20
  super msg
@@ -20,13 +23,21 @@ module Bundler
20
23
 
21
24
  class GitCommandError < GitError
22
25
  def initialize(command, path = nil, extra_info = nil)
23
- msg = "Git error: command `git #{command}` in directory #{SharedHelpers.pwd} has failed."
26
+ msg = String.new
27
+ msg << "Git error: command `git #{command}` in directory #{SharedHelpers.pwd} has failed."
24
28
  msg << "\n#{extra_info}" if extra_info
25
29
  msg << "\nIf this error persists you could try removing the cache directory '#{path}'" if path && path.exist?
26
30
  super msg
27
31
  end
28
32
  end
29
33
 
34
+ class MissingGitRevisionError < GitError
35
+ def initialize(ref, repo)
36
+ msg = "Revision #{ref} does not exist in the repository #{repo}. Maybe you misspelled it?"
37
+ super msg
38
+ end
39
+ end
40
+
30
41
  # The GitProxy is responsible to interact with git repositories.
31
42
  # All actions required by the Git source is encapsulated in this
32
43
  # object.
@@ -44,15 +55,20 @@ module Bundler
44
55
  end
45
56
 
46
57
  def revision
47
- @revision ||= allowed_in_path do
48
- msg = "Ref '#{ref}' was not found. Perhaps you mispelled it?"
49
- git("rev-parse --verify #{ref}", true, msg).strip
58
+ return @revision if @revision
59
+
60
+ begin
61
+ @revision ||= find_local_revision
62
+ rescue GitCommandError
63
+ raise MissingGitRevisionError.new(ref, uri)
50
64
  end
65
+
66
+ @revision
51
67
  end
52
68
 
53
69
  def branch
54
70
  @branch ||= allowed_in_path do
55
- git("branch") =~ /^\* (.*)$/ && $1.strip
71
+ git("rev-parse --abbrev-ref HEAD").strip
56
72
  end
57
73
  end
58
74
 
@@ -143,6 +159,16 @@ module Bundler
143
159
  false
144
160
  end
145
161
 
162
+ def remove_cache
163
+ FileUtils.rm_rf(path)
164
+ end
165
+
166
+ def find_local_revision
167
+ allowed_in_path do
168
+ git("rev-parse --verify #{ref}", true).strip
169
+ end
170
+ end
171
+
146
172
  # Escape the URI for git commands
147
173
  def uri_escaped_with_configured_credentials
148
174
  remote = configured_uri_for(uri)
@@ -1,13 +1,14 @@
1
+ # frozen_string_literal: true
1
2
  module Bundler
2
3
  class Source
3
4
  class Path < Source
4
5
  autoload :Installer, "bundler/source/path/installer"
5
6
 
6
- attr_reader :path, :options
7
+ attr_reader :path, :options, :root_path
7
8
  attr_writer :name
8
9
  attr_accessor :version
9
10
 
10
- DEFAULT_GLOB = "{,*,*/*}.gemspec"
11
+ DEFAULT_GLOB = "{,*,*/*}.gemspec".freeze
11
12
 
12
13
  def initialize(options)
13
14
  @options = options
@@ -16,6 +17,8 @@ module Bundler
16
17
  @allow_cached = false
17
18
  @allow_remote = false
18
19
 
20
+ @root_path = options["root_path"] || Bundler.root
21
+
19
22
  if options["path"]
20
23
  @path = Pathname.new(options["path"])
21
24
  @path = expand(@path) unless @path.relative?
@@ -42,7 +45,7 @@ module Bundler
42
45
  end
43
46
 
44
47
  def to_lock
45
- out = "PATH\n"
48
+ out = String.new("PATH\n")
46
49
  out << " remote: #{relative_path}\n"
47
50
  out << " glob: #{@glob}\n" unless @glob == DEFAULT_GLOB
48
51
  out << " specs:\n"
@@ -77,7 +80,7 @@ module Bundler
77
80
  def cache(spec, custom_path = nil)
78
81
  app_cache_path = app_cache_path(custom_path)
79
82
  return unless Bundler.settings[:cache_all]
80
- return if expand(@original_path).to_s.index(Bundler.root.to_s + "/") == 0
83
+ return if expand(@original_path).to_s.index(root_path.to_s + "/") == 0
81
84
 
82
85
  unless @original_path.exist?
83
86
  raise GemNotFound, "Can't cache gem #{version_message(spec)} because #{self} is missing!"
@@ -111,7 +114,7 @@ module Bundler
111
114
  end
112
115
 
113
116
  def expand(somepath)
114
- somepath.expand_path(Bundler.root)
117
+ somepath.expand_path(root_path)
115
118
  rescue ArgumentError => e
116
119
  Bundler.ui.debug(e)
117
120
  raise PathError, "There was an error while trying to use the path " \
@@ -154,18 +157,22 @@ module Bundler
154
157
  end
155
158
  end
156
159
  end
157
- elsif File.exist?(expanded_path)
158
- raise PathError, "The path `#{expanded_path}` is not a directory."
159
160
  else
160
- raise PathError, "The path `#{expanded_path}` does not exist."
161
+ message = String.new("The path `#{expanded_path}` ")
162
+ message << if File.exist?(expanded_path)
163
+ "is not a directory."
164
+ else
165
+ "does not exist."
166
+ end
167
+ raise PathError, message
161
168
  end
162
169
 
163
170
  index
164
171
  end
165
172
 
166
173
  def relative_path
167
- if path.to_s.start_with?(Bundler.root.to_s)
168
- return path.relative_path_from(Bundler.root)
174
+ if path.to_s.start_with?(root_path.to_s)
175
+ return path.relative_path_from(root_path)
169
176
  end
170
177
  path
171
178
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Bundler
2
3
  class Source
3
4
  class Path
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "uri"
2
3
  require "rubygems/user_interaction"
3
4
  require "rubygems/spec_fetcher"
@@ -60,7 +61,7 @@ module Bundler
60
61
  end
61
62
 
62
63
  def to_lock
63
- out = "GEM\n"
64
+ out = String.new("GEM\n")
64
65
  remotes.reverse_each do |remote|
65
66
  out << " remote: #{suppress_configured_credentials remote}\n"
66
67
  end
@@ -118,7 +119,7 @@ module Bundler
118
119
 
119
120
  unless Bundler.settings[:no_install]
120
121
  message = "Installing #{version_message(spec)}"
121
- message << " with native extensions" if spec.extensions.any?
122
+ message += " with native extensions" if spec.extensions.any?
122
123
  Bundler.ui.confirm message
123
124
 
124
125
  path = cached_gem(spec)
@@ -327,7 +328,7 @@ module Bundler
327
328
  end
328
329
 
329
330
  def api_fetchers
330
- fetchers.select(&:use_api)
331
+ fetchers.select {|f| f.use_api && f.fetchers.first.api_fetcher? }
331
332
  end
332
333
 
333
334
  def remote_specs
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Bundler
2
3
  class Source
3
4
  class Rubygems
@@ -14,6 +15,21 @@ module Bundler
14
15
  @anonymized_uri = remove_auth(@uri).freeze
15
16
  end
16
17
 
18
+ # @return [String] A slug suitable for use as a cache key for this
19
+ # remote.
20
+ #
21
+ def cache_slug
22
+ @cache_slug ||= begin
23
+ cache_uri = original_uri || uri
24
+
25
+ uri_parts = [cache_uri.host, cache_uri.user, cache_uri.port, cache_uri.path]
26
+ uri_digest = Digest::MD5.hexdigest(uri_parts.compact.join("."))
27
+
28
+ uri_parts[-1] = uri_digest
29
+ uri_parts.compact.join(".")
30
+ end
31
+ end
32
+
17
33
  private
18
34
 
19
35
  def apply_auth(uri, auth)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Bundler
2
3
  class SourceList
3
4
  attr_reader :path_sources,
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "tsort"
2
3
  require "forwardable"
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "fileutils"
2
3
  require "net/https"
3
4
  require "openssl"
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "bundler/remote_specification"
2
3
 
3
4
  module Bundler
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env <%= Bundler.settings[:shebang] || RbConfig::CONFIG['ruby_install_name'] %>
2
+ # frozen_string_literal: true
2
3
  #
3
4
  # This file was generated by Bundler.
4
5
  #
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # A sample Gemfile
2
3
  source "https://rubygems.org"
3
4
 
@@ -1,3 +1,4 @@
1
+ sudo: false
1
2
  language: ruby
2
3
  rvm:
3
4
  - <%= RUBY_VERSION %>
@@ -16,8 +16,8 @@ Gem::Specification.new do |spec|
16
16
  spec.license = "MIT"
17
17
  <%- end -%>
18
18
 
19
- # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
20
- # delete this section to allow pushing this gem to any host.
19
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
20
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
21
21
  if spec.respond_to?(:metadata)
22
22
  spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
23
23
  else
data/lib/bundler/ui.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Bundler
2
3
  module UI
3
4
  autoload :RGProxy, "bundler/ui/rg_proxy"
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "bundler/ui"
2
3
  require "rubygems/user_interaction"
3
4
 
@@ -1,9 +1,10 @@
1
+ # frozen_string_literal: true
1
2
  require "bundler/vendored_thor"
2
3
 
3
4
  module Bundler
4
5
  module UI
5
6
  class Shell
6
- LEVELS = %w(silent error warn confirm info debug)
7
+ LEVELS = %w(silent error warn confirm info debug).freeze
7
8
 
8
9
  attr_writer :shell
9
10