bundler 2.2.3 → 2.2.4

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 (34) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/bundler.gemspec +1 -1
  4. data/lib/bundler/build_metadata.rb +2 -2
  5. data/lib/bundler/cli.rb +2 -5
  6. data/{man → lib/bundler/man}/bundle-add.1 +0 -0
  7. data/{man → lib/bundler/man}/bundle-binstubs.1 +0 -0
  8. data/{man → lib/bundler/man}/bundle-cache.1 +0 -0
  9. data/{man → lib/bundler/man}/bundle-check.1 +0 -0
  10. data/{man → lib/bundler/man}/bundle-clean.1 +0 -0
  11. data/{man → lib/bundler/man}/bundle-config.1 +0 -0
  12. data/{man → lib/bundler/man}/bundle-doctor.1 +0 -0
  13. data/{man → lib/bundler/man}/bundle-exec.1 +0 -0
  14. data/{man → lib/bundler/man}/bundle-gem.1 +0 -0
  15. data/{man → lib/bundler/man}/bundle-info.1 +0 -0
  16. data/{man → lib/bundler/man}/bundle-init.1 +0 -0
  17. data/{man → lib/bundler/man}/bundle-inject.1 +0 -0
  18. data/{man → lib/bundler/man}/bundle-install.1 +0 -0
  19. data/{man → lib/bundler/man}/bundle-list.1 +0 -0
  20. data/{man → lib/bundler/man}/bundle-lock.1 +0 -0
  21. data/{man → lib/bundler/man}/bundle-open.1 +0 -0
  22. data/{man → lib/bundler/man}/bundle-outdated.1 +0 -0
  23. data/{man → lib/bundler/man}/bundle-platform.1 +0 -0
  24. data/{man → lib/bundler/man}/bundle-pristine.1 +0 -0
  25. data/{man → lib/bundler/man}/bundle-remove.1 +0 -0
  26. data/{man → lib/bundler/man}/bundle-show.1 +0 -0
  27. data/{man → lib/bundler/man}/bundle-update.1 +0 -0
  28. data/{man → lib/bundler/man}/bundle-viz.1 +0 -0
  29. data/{man → lib/bundler/man}/bundle.1 +0 -0
  30. data/{man → lib/bundler/man}/gemfile.5 +0 -0
  31. data/{man → lib/bundler/man}/index.txt +0 -0
  32. data/lib/bundler/source/git/git_proxy.rb +27 -40
  33. data/lib/bundler/version.rb +1 -1
  34. metadata +29 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e6d1efe11ee2c513b90baf20e54b599a1cec72355056997c53b1d62a064c4237
4
- data.tar.gz: ac82de915bc8c58b391a19e61f3abcad69dc279a531e09cadcc59083653fc7f9
3
+ metadata.gz: cb5e62df5ac6ec81289223672d91b6b7a1229fc348a7d7d3dba5a200e87293af
4
+ data.tar.gz: 8ef6f15e230d10fd4fce8918ffd0bbeff4df1d65e9921d46e0d246cc316fe79d
5
5
  SHA512:
6
- metadata.gz: 835e64c01ad6e8c66e0c2e7199457f0b6ce5ecb2ff8c8e4af557e40c9186bd734cbff607a45ec9a751f6ad0e6790e81a78b206b1082a7b2a7a22526b6422b280
7
- data.tar.gz: 07ed7766695917265535b4a5803ff799d201aaa910d73ba4b185f5f18836e1d1ec3967535b7b68c4c55d3af05c038ec6bcde8f66e8068db5576e16929ead145d
6
+ metadata.gz: 4da8e14312ce09705a4c23999a27d0cf268809ce6dbb01da190a3f93218fb68c98c21f5ef13ead345e2a46be89dacdc3c87c91e2369bc4b69e0f2a36efa8c6b4
7
+ data.tar.gz: f48e22dabd54c2a4e3b87b2644ace759777a2f949fcd47322534804272314b655435dbda1aadfcbb4f7a96e2b52b0ee3666595d8a56384e51720feb17ba28a53
@@ -1,3 +1,10 @@
1
+ # 2.2.4 (December 31, 2020)
2
+
3
+ ## Bug fixes:
4
+
5
+ - Fix bundle man pages display on truffleruby [#4209](https://github.com/rubygems/rubygems/pull/4209)
6
+ - Fix Windows + JRuby no longer being able to install git sources [#4196](https://github.com/rubygems/rubygems/pull/4196)
7
+
1
8
  # 2.2.3 (December 22, 2020)
2
9
 
3
10
  ## Bug fixes:
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
34
34
  s.required_ruby_version = ">= 2.3.0"
35
35
  s.required_rubygems_version = ">= 2.5.2"
36
36
 
37
- s.files = Dir.glob("{lib,man,exe}/**/*", File::FNM_DOTMATCH).reject {|f| File.directory?(f) }
37
+ s.files = Dir.glob("{lib,exe}/**/*", File::FNM_DOTMATCH).reject {|f| File.directory?(f) }
38
38
 
39
39
  # Include the CHANGELOG.md, LICENSE.md, README.md manually
40
40
  s.files += %w[CHANGELOG.md LICENSE.md README.md]
@@ -4,8 +4,8 @@ module Bundler
4
4
  # Represents metadata from when the Bundler gem was built.
5
5
  module BuildMetadata
6
6
  # begin ivars
7
- @built_at = "2020-12-22".freeze
8
- @git_commit_sha = "29dc3c8398".freeze
7
+ @built_at = "2020-12-31".freeze
8
+ @git_commit_sha = "529e536f28".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -122,9 +122,7 @@ module Bundler
122
122
  else command = "bundle-#{cli}"
123
123
  end
124
124
 
125
- man_path = File.expand_path("../../../man", __FILE__)
126
- # man files are located under ruby's mandir with the default gems of bundler
127
- man_path = RbConfig::CONFIG["mandir"] unless File.directory?(man_path)
125
+ man_path = File.expand_path("man", __dir__)
128
126
  man_pages = Hash[Dir.glob(File.join(man_path, "**", "*")).grep(/.*\.\d*\Z/).collect do |f|
129
127
  [File.basename(f, ".*"), f]
130
128
  end]
@@ -134,8 +132,7 @@ module Bundler
134
132
  if Bundler.which("man") && man_path !~ %r{^file:/.+!/META-INF/jruby.home/.+}
135
133
  Kernel.exec "man #{man_page}"
136
134
  else
137
- fallback_man_path = File.expand_path("../man", __FILE__)
138
- puts File.read("#{fallback_man_path}/#{File.basename(man_page)}.ronn")
135
+ puts File.read("#{man_path}/#{File.basename(man_page)}.ronn")
139
136
  end
140
137
  elsif command_path = Bundler.which("bundler-#{cli}")
141
138
  Kernel.exec(command_path, "--help")
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -67,13 +67,13 @@ module Bundler
67
67
 
68
68
  def branch
69
69
  @branch ||= allowed_with_path do
70
- git("rev-parse --abbrev-ref HEAD", :dir => path).strip
70
+ git("rev-parse", "--abbrev-ref", "HEAD", :dir => path).strip
71
71
  end
72
72
  end
73
73
 
74
74
  def contains?(commit)
75
75
  allowed_with_path do
76
- result, status = git_null("branch --contains #{commit}", :dir => path)
76
+ result, status = git_null("branch", "--contains", commit, :dir => path)
77
77
  status.success? && result =~ /^\* (.*)$/
78
78
  end
79
79
  end
@@ -88,20 +88,22 @@ module Bundler
88
88
 
89
89
  def checkout
90
90
  return if path.exist? && has_revision_cached?
91
- extra_ref = "#{Shellwords.shellescape(ref)}:#{Shellwords.shellescape(ref)}" if ref && ref.start_with?("refs/")
91
+ extra_ref = "#{ref}:#{ref}" if ref && ref.start_with?("refs/")
92
92
 
93
93
  Bundler.ui.info "Fetching #{URICredentialsFilter.credential_filtered_uri(uri)}"
94
94
 
95
+ configured_uri = configured_uri_for(uri).to_s
96
+
95
97
  unless path.exist?
96
98
  SharedHelpers.filesystem_access(path.dirname) do |p|
97
99
  FileUtils.mkdir_p(p)
98
100
  end
99
- git_retry %(clone #{uri_escaped_with_configured_credentials} "#{path}" --bare --no-hardlinks --quiet)
101
+ git_retry "clone", configured_uri, path.to_s, "--bare", "--no-hardlinks", "--quiet"
100
102
  return unless extra_ref
101
103
  end
102
104
 
103
105
  with_path do
104
- git_retry %(fetch --force --quiet --tags #{uri_escaped_with_configured_credentials} "refs/heads/*:refs/heads/*" #{extra_ref}), :dir => path
106
+ git_retry(*["fetch", "--force", "--quiet", "--tags", configured_uri, "refs/heads/*:refs/heads/*", extra_ref].compact, :dir => path)
105
107
  end
106
108
  end
107
109
 
@@ -115,7 +117,7 @@ module Bundler
115
117
  SharedHelpers.filesystem_access(destination) do |p|
116
118
  FileUtils.rm_rf(p)
117
119
  end
118
- git_retry %(clone --no-checkout --quiet "#{path}" "#{destination}")
120
+ git_retry "clone", "--no-checkout", "--quiet", path.to_s, destination.to_s
119
121
  File.chmod(((File.stat(destination).mode | 0o777) & ~File.umask), destination)
120
122
  rescue Errno::EEXIST => e
121
123
  file_path = e.message[%r{.*?((?:[a-zA-Z]:)?/.*)}, 1]
@@ -125,46 +127,45 @@ module Bundler
125
127
  end
126
128
  end
127
129
  # method 2
128
- git_retry %(fetch --force --quiet --tags "#{path}"), :dir => destination
130
+ git_retry "fetch", "--force", "--quiet", "--tags", path.to_s, :dir => destination
129
131
 
130
132
  begin
131
- git "reset --hard #{@revision}", :dir => destination
133
+ git "reset", "--hard", @revision, :dir => destination
132
134
  rescue GitCommandError => e
133
135
  raise MissingGitRevisionError.new(e.command, path, destination, @revision, URICredentialsFilter.credential_filtered_uri(uri))
134
136
  end
135
137
 
136
138
  if submodules
137
- git_retry "submodule update --init --recursive", :dir => destination
139
+ git_retry "submodule", "update", "--init", "--recursive", :dir => destination
138
140
  elsif Gem::Version.create(version) >= Gem::Version.create("2.9.0")
139
141
  inner_command = "git -C $toplevel submodule deinit --force $sm_path"
140
- inner_command = inner_command.gsub("$") { '\$' } unless Bundler::WINDOWS
141
- git_retry "submodule foreach --quiet \"#{inner_command}\"", :dir => destination
142
+ git_retry "submodule", "foreach", "--quiet", inner_command, :dir => destination
142
143
  end
143
144
  end
144
145
 
145
146
  private
146
147
 
147
- def git_null(command, dir: SharedHelpers.pwd)
148
+ def git_null(*command, dir: SharedHelpers.pwd)
148
149
  check_allowed(command)
149
150
 
150
151
  out, status = SharedHelpers.with_clean_git_env do
151
- capture_and_ignore_stderr("git #{command}", :chdir => dir.to_s)
152
+ capture_and_ignore_stderr("git", "-C", dir.to_s, *command)
152
153
  end
153
154
 
154
155
  [URICredentialsFilter.credential_filtered_string(out, uri), status]
155
156
  end
156
157
 
157
- def git_retry(command, dir: SharedHelpers.pwd)
158
- Bundler::Retry.new("`git #{URICredentialsFilter.credential_filtered_string(command, uri)}`", GitNotAllowedError).attempts do
159
- git(command, :dir => dir)
158
+ def git_retry(*command, dir: SharedHelpers.pwd)
159
+ Bundler::Retry.new("`git -C #{dir} #{URICredentialsFilter.credential_filtered_string(command.shelljoin, uri)}`", GitNotAllowedError).attempts do
160
+ git(*command, :dir => dir)
160
161
  end
161
162
  end
162
163
 
163
- def git(command, dir: SharedHelpers.pwd)
164
+ def git(*command, dir: SharedHelpers.pwd)
164
165
  command_with_no_credentials = check_allowed(command)
165
166
 
166
167
  out, status = SharedHelpers.with_clean_git_env do
167
- capture_and_filter_stderr(uri, "git #{command}", :chdir => dir.to_s)
168
+ capture_and_filter_stderr("git", "-C", dir.to_s, *command)
168
169
  end
169
170
 
170
171
  raise GitCommandError.new(command_with_no_credentials, path, dir) unless status.success?
@@ -174,7 +175,7 @@ module Bundler
174
175
 
175
176
  def has_revision_cached?
176
177
  return unless @revision
177
- with_path { git("cat-file -e #{@revision}", :dir => path) }
178
+ with_path { git("cat-file", "-e", @revision, :dir => path) }
178
179
  true
179
180
  rescue GitError
180
181
  false
@@ -186,26 +187,12 @@ module Bundler
186
187
 
187
188
  def find_local_revision
188
189
  allowed_with_path do
189
- git("rev-parse --verify #{Shellwords.shellescape(ref)}", :dir => path).strip
190
+ git("rev-parse", "--verify", ref, :dir => path).strip
190
191
  end
191
192
  rescue GitCommandError => e
192
193
  raise MissingGitRevisionError.new(e.command, path, path, ref, URICredentialsFilter.credential_filtered_uri(uri))
193
194
  end
194
195
 
195
- # Escape the URI for git commands
196
- def uri_escaped_with_configured_credentials
197
- remote = configured_uri_for(uri)
198
- if Bundler::WINDOWS
199
- # Windows quoting requires double quotes only, with double quotes
200
- # inside the string escaped by being doubled.
201
- '"' + remote.gsub('"') { '""' } + '"'
202
- else
203
- # Bash requires single quoted strings, with the single quotes escaped
204
- # by ending the string, escaping the quote, and restarting the string.
205
- "'" + remote.gsub("'") { "'\\''" } + "'"
206
- end
207
- end
208
-
209
196
  # Adds credentials to the URI as Fetcher#configured_uri_for does
210
197
  def configured_uri_for(uri)
211
198
  if /https?:/ =~ uri
@@ -233,21 +220,21 @@ module Bundler
233
220
  end
234
221
 
235
222
  def check_allowed(command)
236
- command_with_no_credentials = URICredentialsFilter.credential_filtered_string(command, uri)
223
+ command_with_no_credentials = URICredentialsFilter.credential_filtered_string(command.shelljoin, uri)
237
224
  raise GitNotAllowedError.new(command_with_no_credentials) unless allow?
238
225
  command_with_no_credentials
239
226
  end
240
227
 
241
- def capture_and_filter_stderr(uri, cmd, chdir: SharedHelpers.pwd)
228
+ def capture_and_filter_stderr(*cmd)
242
229
  require "open3"
243
- return_value, captured_err, status = Open3.capture3(cmd, :chdir => chdir)
244
- Bundler.ui.warn URICredentialsFilter.credential_filtered_string(captured_err, uri) if uri && !captured_err.empty?
230
+ return_value, captured_err, status = Open3.capture3(*cmd)
231
+ Bundler.ui.warn URICredentialsFilter.credential_filtered_string(captured_err, uri) unless captured_err.empty?
245
232
  [return_value, status]
246
233
  end
247
234
 
248
- def capture_and_ignore_stderr(cmd, chdir: SharedHelpers.pwd)
235
+ def capture_and_ignore_stderr(*cmd)
249
236
  require "open3"
250
- return_value, _, status = Open3.capture3(cmd, :chdir => chdir)
237
+ return_value, _, status = Open3.capture3(*cmd)
251
238
  [return_value, status]
252
239
  end
253
240
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.2.3".freeze
4
+ VERSION = "2.2.4".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= VERSION.split(".").first.to_i
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Arko
@@ -22,7 +22,7 @@ authors:
22
22
  autorequire:
23
23
  bindir: exe
24
24
  cert_chain: []
25
- date: 2020-12-22 00:00:00.000000000 Z
25
+ date: 2020-12-31 00:00:00.000000000 Z
26
26
  dependencies: []
27
27
  description: Bundler manages an application's dependencies through its entire life,
28
28
  across many machines, systematically and repeatably
@@ -113,31 +113,57 @@ files:
113
113
  - lib/bundler/lockfile_generator.rb
114
114
  - lib/bundler/lockfile_parser.rb
115
115
  - lib/bundler/man/.document
116
+ - lib/bundler/man/bundle-add.1
116
117
  - lib/bundler/man/bundle-add.1.ronn
118
+ - lib/bundler/man/bundle-binstubs.1
117
119
  - lib/bundler/man/bundle-binstubs.1.ronn
120
+ - lib/bundler/man/bundle-cache.1
118
121
  - lib/bundler/man/bundle-cache.1.ronn
122
+ - lib/bundler/man/bundle-check.1
119
123
  - lib/bundler/man/bundle-check.1.ronn
124
+ - lib/bundler/man/bundle-clean.1
120
125
  - lib/bundler/man/bundle-clean.1.ronn
126
+ - lib/bundler/man/bundle-config.1
121
127
  - lib/bundler/man/bundle-config.1.ronn
128
+ - lib/bundler/man/bundle-doctor.1
122
129
  - lib/bundler/man/bundle-doctor.1.ronn
130
+ - lib/bundler/man/bundle-exec.1
123
131
  - lib/bundler/man/bundle-exec.1.ronn
132
+ - lib/bundler/man/bundle-gem.1
124
133
  - lib/bundler/man/bundle-gem.1.ronn
134
+ - lib/bundler/man/bundle-info.1
125
135
  - lib/bundler/man/bundle-info.1.ronn
136
+ - lib/bundler/man/bundle-init.1
126
137
  - lib/bundler/man/bundle-init.1.ronn
138
+ - lib/bundler/man/bundle-inject.1
127
139
  - lib/bundler/man/bundle-inject.1.ronn
140
+ - lib/bundler/man/bundle-install.1
128
141
  - lib/bundler/man/bundle-install.1.ronn
142
+ - lib/bundler/man/bundle-list.1
129
143
  - lib/bundler/man/bundle-list.1.ronn
144
+ - lib/bundler/man/bundle-lock.1
130
145
  - lib/bundler/man/bundle-lock.1.ronn
146
+ - lib/bundler/man/bundle-open.1
131
147
  - lib/bundler/man/bundle-open.1.ronn
148
+ - lib/bundler/man/bundle-outdated.1
132
149
  - lib/bundler/man/bundle-outdated.1.ronn
150
+ - lib/bundler/man/bundle-platform.1
133
151
  - lib/bundler/man/bundle-platform.1.ronn
152
+ - lib/bundler/man/bundle-pristine.1
134
153
  - lib/bundler/man/bundle-pristine.1.ronn
154
+ - lib/bundler/man/bundle-remove.1
135
155
  - lib/bundler/man/bundle-remove.1.ronn
156
+ - lib/bundler/man/bundle-show.1
136
157
  - lib/bundler/man/bundle-show.1.ronn
158
+ - lib/bundler/man/bundle-update.1
137
159
  - lib/bundler/man/bundle-update.1.ronn
160
+ - lib/bundler/man/bundle-viz.1
138
161
  - lib/bundler/man/bundle-viz.1.ronn
162
+ - lib/bundler/man/bundle.1
139
163
  - lib/bundler/man/bundle.1.ronn
164
+ - lib/bundler/man/gemfile.5
140
165
  - lib/bundler/man/gemfile.5.ronn
166
+ - lib/bundler/man/index.txt
141
167
  - lib/bundler/match_platform.rb
142
168
  - lib/bundler/mirror.rb
143
169
  - lib/bundler/plugin.rb
@@ -302,32 +328,6 @@ files:
302
328
  - lib/bundler/vlad.rb
303
329
  - lib/bundler/worker.rb
304
330
  - lib/bundler/yaml_serializer.rb
305
- - man/bundle-add.1
306
- - man/bundle-binstubs.1
307
- - man/bundle-cache.1
308
- - man/bundle-check.1
309
- - man/bundle-clean.1
310
- - man/bundle-config.1
311
- - man/bundle-doctor.1
312
- - man/bundle-exec.1
313
- - man/bundle-gem.1
314
- - man/bundle-info.1
315
- - man/bundle-init.1
316
- - man/bundle-inject.1
317
- - man/bundle-install.1
318
- - man/bundle-list.1
319
- - man/bundle-lock.1
320
- - man/bundle-open.1
321
- - man/bundle-outdated.1
322
- - man/bundle-platform.1
323
- - man/bundle-pristine.1
324
- - man/bundle-remove.1
325
- - man/bundle-show.1
326
- - man/bundle-update.1
327
- - man/bundle-viz.1
328
- - man/bundle.1
329
- - man/gemfile.5
330
- - man/index.txt
331
331
  homepage: https://bundler.io
332
332
  licenses:
333
333
  - MIT
@@ -351,7 +351,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
351
351
  - !ruby/object:Gem::Version
352
352
  version: 2.5.2
353
353
  requirements: []
354
- rubygems_version: 3.2.3
354
+ rubygems_version: 3.3.0.dev
355
355
  signing_key:
356
356
  specification_version: 4
357
357
  summary: The best way to manage your application's dependencies