bundler 2.3.10 → 2.3.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d04e4256fa8e51a0169e749dac69ace323715bd6baf4f8d0b41030eecd096a45
4
- data.tar.gz: 58d03cf0bae41f3934eb6d2ced1b90d60b996ba0cb5a3400a8090218b9f2a978
3
+ metadata.gz: 0c24b409a733f2efbfde08b4f1ca210538a377ad365148d41b37d5802fa4040c
4
+ data.tar.gz: 18a27b9facc0f42594d97fe40dfe8fcf34d4128048d4e208b5af5a9670c676b9
5
5
  SHA512:
6
- metadata.gz: 251af0c8ded951fa452b748f7bc179b575f970e07d6e6bb6668afa17ba2e60190652fb7b5e7f4da4530421467f809fbde015ff8c372922c119a0caf24aa9ac7c
7
- data.tar.gz: 77abe76f6b7a9acc862705adc601d09b3fc9f34a5b7f862952796ea45b89024a5b8fdda7cf4faf4dbf7934c77fc7d465906645be1dfc76eb89034ec89b8e0b44
6
+ metadata.gz: 4938ee9af4788a04ec40959302c746da584b9694004d7b7d76896f7a6e588abf11f05d819678d7ea0199e78c1526cafac4a9aea1edc9ffb72db6f19a6a102900
7
+ data.tar.gz: bf517233851defccbbc3cbc0d2fbc7d0ab0828dc3c558c5d503fc7a08b3a04c907b19be4a446415427fb6f56a062e5ed9a3ffcedf67b5acc308489124f4aadd3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ # 2.3.11 (April 7, 2022)
2
+
3
+ ## Enhancements:
4
+
5
+ - Bump actions/checkout to 3 in bundler gem template [#5445](https://github.com/rubygems/rubygems/pull/5445)
6
+ - Prefer `__dir__` to `__FILE__` [#5444](https://github.com/rubygems/rubygems/pull/5444)
7
+
8
+ ## Documentation:
9
+
10
+ - Update bundler documentation to reflect bundle config scope changes [#5441](https://github.com/rubygems/rubygems/pull/5441)
11
+
1
12
  # 2.3.10 (March 23, 2022)
2
13
 
3
14
  ## Enhancements:
data/exe/bundler CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- load File.expand_path("../bundle", __FILE__)
4
+ load File.expand_path("bundle", __dir__)
@@ -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 = "2022-03-23".freeze
8
- @git_commit_sha = "4bbb70e7de".freeze
7
+ @built_at = "2022-04-07".freeze
8
+ @git_commit_sha = "9b6c5a801a".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -29,7 +29,7 @@ module Bundler
29
29
 
30
30
  # If Bundler has been installed without its .git directory and without a
31
31
  # commit instance variable then we can't determine its commits SHA.
32
- git_dir = File.join(File.expand_path("../../../..", __FILE__), ".git")
32
+ git_dir = File.expand_path("../../../.git", __dir__)
33
33
  if File.directory?(git_dir)
34
34
  return @git_commit_sha = Dir.chdir(git_dir) { `git rev-parse --short HEAD`.strip.freeze }
35
35
  end
@@ -47,7 +47,7 @@ module Bundler
47
47
  def print_gem_path(spec)
48
48
  name = spec.name
49
49
  if name == "bundler"
50
- path = File.expand_path("../../../..", __FILE__)
50
+ path = File.expand_path("../../..", __dir__)
51
51
  else
52
52
  path = spec.full_gem_path
53
53
  if spec.deleted_gem?
@@ -32,7 +32,7 @@ module Bundler
32
32
  file << spec.to_gemfile
33
33
  end
34
34
  else
35
- FileUtils.cp(File.expand_path("../../templates/#{gemfile}", __FILE__), gemfile)
35
+ FileUtils.cp(File.expand_path("../templates/#{gemfile}", __dir__), gemfile)
36
36
  end
37
37
 
38
38
  puts "Writing new #{gemfile} to #{SharedHelpers.pwd}/#{gemfile}"
@@ -18,7 +18,7 @@ module Bundler
18
18
 
19
19
  if gem_name
20
20
  if gem_name == "bundler"
21
- path = File.expand_path("../../../..", __FILE__)
21
+ path = File.expand_path("../../..", __dir__)
22
22
  else
23
23
  spec = Bundler::CLI::Common.select_spec(gem_name, :regex_match)
24
24
  return unless spec
data/lib/bundler/cli.rb CHANGED
@@ -610,7 +610,7 @@ module Bundler
610
610
  private :gem
611
611
 
612
612
  def self.source_root
613
- File.expand_path(File.join(File.dirname(__FILE__), "templates"))
613
+ File.expand_path("templates", __dir__)
614
614
  end
615
615
 
616
616
  desc "clean [OPTIONS]", "Cleans up unused gems in your bundler directory", :hide => true
@@ -119,7 +119,7 @@ module Bundler
119
119
  relative_gemfile_path = relative_gemfile_path
120
120
  ruby_command = Thor::Util.ruby_command
121
121
  ruby_command = ruby_command
122
- template_path = File.expand_path("../templates/Executable", __FILE__)
122
+ template_path = File.expand_path("templates/Executable", __dir__)
123
123
  if spec.name == "bundler"
124
124
  template_path += ".bundler"
125
125
  spec.executables = %(bundle)
@@ -172,7 +172,7 @@ module Bundler
172
172
  end
173
173
  standalone_path = Bundler.root.join(path).relative_path_from(bin_path)
174
174
  standalone_path = standalone_path
175
- template = File.read(File.expand_path("../templates/Executable.standalone", __FILE__))
175
+ template = File.read(File.expand_path("templates/Executable.standalone", __dir__))
176
176
  ruby_command = Thor::Util.ruby_command
177
177
  ruby_command = ruby_command
178
178
 
@@ -36,13 +36,13 @@ Executing \fBbundle config list\fR with will print a list of all bundler configu
36
36
  Executing \fBbundle config get <name>\fR will print the value of that configuration setting, and where it was set\.
37
37
  .
38
38
  .P
39
- Executing \fBbundle config set <name> <value>\fR will set that configuration to the value specified for all bundles executed as the current user\. The configuration will be stored in \fB~/\.bundle/config\fR\. If \fIname\fR already is set, \fIname\fR will be overridden and user will be warned\.
39
+ Executing \fBbundle config set <name> <value>\fR defaults to setting \fBlocal\fR configuration if executing from within a local application, otherwise it will set \fBglobal\fR configuration\. See \fB\-\-local\fR and \fB\-\-global\fR options below\.
40
40
  .
41
41
  .P
42
- Executing \fBbundle config set \-\-global <name> <value>\fR works the same as above\.
42
+ Executing \fBbundle config set \-\-local <name> <value>\fR will set that configuration in the directory for the local application\. The configuration will be stored in \fB<project_root>/\.bundle/config\fR\. If \fBBUNDLE_APP_CONFIG\fR is set, the configuration will be stored in \fB$BUNDLE_APP_CONFIG/config\fR\.
43
43
  .
44
44
  .P
45
- Executing \fBbundle config set \-\-local <name> <value>\fR will set that configuration in the directory for the local application\. The configuration will be stored in \fB<project_root>/\.bundle/config\fR\. If \fBBUNDLE_APP_CONFIG\fR is set, the configuration will be stored in \fB$BUNDLE_APP_CONFIG/config\fR\.
45
+ Executing \fBbundle config set \-\-global <name> <value>\fR will set that configuration to the value specified for all bundles executed as the current user\. The configuration will be stored in \fB~/\.bundle/config\fR\. If \fIname\fR already is set, \fIname\fR will be overridden and user will be warned\.
46
46
  .
47
47
  .P
48
48
  Executing \fBbundle config unset <name>\fR will delete the configuration in both local and global sources\.
@@ -23,18 +23,20 @@ was set.
23
23
  Executing `bundle config get <name>` will print the value of that configuration
24
24
  setting, and where it was set.
25
25
 
26
- Executing `bundle config set <name> <value>` will set that configuration to the
27
- value specified for all bundles executed as the current user. The configuration
28
- will be stored in `~/.bundle/config`. If <name> already is set, <name> will be
29
- overridden and user will be warned.
30
-
31
- Executing `bundle config set --global <name> <value>` works the same as above.
26
+ Executing `bundle config set <name> <value>` defaults to setting `local`
27
+ configuration if executing from within a local application, otherwise it will
28
+ set `global` configuration. See `--local` and `--global` options below.
32
29
 
33
30
  Executing `bundle config set --local <name> <value>` will set that configuration
34
31
  in the directory for the local application. The configuration will be stored in
35
32
  `<project_root>/.bundle/config`. If `BUNDLE_APP_CONFIG` is set, the configuration
36
33
  will be stored in `$BUNDLE_APP_CONFIG/config`.
37
34
 
35
+ Executing `bundle config set --global <name> <value>` will set that
36
+ configuration to the value specified for all bundles executed as the current
37
+ user. The configuration will be stored in `~/.bundle/config`. If <name> already
38
+ is set, <name> will be overridden and user will be warned.
39
+
38
40
  Executing `bundle config unset <name>` will delete the configuration in both
39
41
  local and global sources.
40
42
 
@@ -274,10 +274,10 @@ module Bundler
274
274
 
275
275
  def set_bundle_variables
276
276
  # bundler exe & lib folders have same root folder, typical gem installation
277
- exe_file = File.expand_path("../../../exe/bundle", __FILE__)
277
+ exe_file = File.expand_path("../../exe/bundle", __dir__)
278
278
 
279
279
  # for Ruby core repository testing
280
- exe_file = File.expand_path("../../../libexec/bundle", __FILE__) unless File.exist?(exe_file)
280
+ exe_file = File.expand_path("../../libexec/bundle", __dir__) unless File.exist?(exe_file)
281
281
 
282
282
  # bundler is a default gem, exe path is separate
283
283
  exe_file = Bundler.rubygems.bin_path("bundler", "bundle", VERSION) unless File.exist?(exe_file)
@@ -309,7 +309,7 @@ module Bundler
309
309
  end
310
310
 
311
311
  def bundler_ruby_lib
312
- resolve_path File.expand_path("../..", __FILE__)
312
+ File.expand_path("..", __dir__)
313
313
  end
314
314
 
315
315
  def clean_load_path
@@ -325,7 +325,7 @@ module Bundler
325
325
 
326
326
  def resolve_path(path)
327
327
  expanded = File.expand_path(path)
328
- return expanded unless File.respond_to?(:realpath) && File.exist?(expanded)
328
+ return expanded unless File.exist?(expanded)
329
329
 
330
330
  File.realpath(expanded)
331
331
  end
@@ -22,7 +22,7 @@ module Bundler
22
22
  s.summary = "The best way to manage your application's dependencies"
23
23
  s.executables = %w[bundle]
24
24
  # can't point to the actual gemspec or else the require paths will be wrong
25
- s.loaded_from = File.expand_path("..", __FILE__)
25
+ s.loaded_from = __dir__
26
26
  end
27
27
 
28
28
  if local_spec = Bundler.rubygems.find_bundler(VERSION)
@@ -8,11 +8,9 @@
8
8
  # this file is here to facilitate running it.
9
9
  #
10
10
 
11
- require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../<%= relative_gemfile_path %>",
13
- Pathname.new(__FILE__).realpath)
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("<%= relative_gemfile_path %>", __dir__)
14
12
 
15
- bundle_binstub = File.expand_path("../bundle", __FILE__)
13
+ bundle_binstub = File.expand_path("bundle", __dir__)
16
14
 
17
15
  if File.file?(bundle_binstub)
18
16
  if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
@@ -41,7 +41,7 @@ m = Module.new do
41
41
  gemfile = ENV["BUNDLE_GEMFILE"]
42
42
  return gemfile if gemfile && !gemfile.empty?
43
43
 
44
- File.expand_path("../<%= relative_gemfile_path %>", __FILE__)
44
+ File.expand_path("<%= relative_gemfile_path %>", __dir__)
45
45
  end
46
46
 
47
47
  def lockfile
@@ -6,9 +6,7 @@
6
6
  # this file is here to facilitate running it.
7
7
  #
8
8
 
9
- require "pathname"
10
- path = Pathname.new(__FILE__)
11
- $:.unshift File.expand_path "../<%= standalone_path %>", path.realpath
9
+ $:.unshift File.expand_path "<%= standalone_path %>", __dir__
12
10
 
13
11
  require "bundler/setup"
14
- load File.expand_path "../<%= executable_path %>", path.realpath
12
+ load File.expand_path "<%= executable_path %>", __dir__
@@ -17,7 +17,7 @@ jobs:
17
17
  - '<%= RUBY_VERSION %>'
18
18
 
19
19
  steps:
20
- - uses: actions/checkout@v2
20
+ - uses: actions/checkout@v3
21
21
  - name: Set up Ruby
22
22
  uses: ruby/setup-ruby@v1
23
23
  with:
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  # Specify which files should be added to the gem when it is released.
26
26
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
27
- spec.files = Dir.chdir(File.expand_path(__dir__)) do
27
+ spec.files = Dir.chdir(__dir__) do
28
28
  `git ls-files -z`.split("\x0").reject do |f|
29
29
  (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
30
30
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.3.10".freeze
4
+ VERSION = "2.3.11".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= VERSION.split(".").first.to_i
data/lib/bundler.rb CHANGED
@@ -370,7 +370,7 @@ EOF
370
370
 
371
371
  if env.key?("RUBYLIB")
372
372
  rubylib = env["RUBYLIB"].split(File::PATH_SEPARATOR)
373
- rubylib.delete(File.expand_path("..", __FILE__))
373
+ rubylib.delete(__dir__)
374
374
  env["RUBYLIB"] = rubylib.join(File::PATH_SEPARATOR)
375
375
  end
376
376
 
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.3.10
4
+ version: 2.3.11
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: 2022-03-23 00:00:00.000000000 Z
25
+ date: 2022-04-07 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
@@ -369,7 +369,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
369
369
  - !ruby/object:Gem::Version
370
370
  version: 2.5.2
371
371
  requirements: []
372
- rubygems_version: 3.3.10
372
+ rubygems_version: 3.3.11
373
373
  signing_key:
374
374
  specification_version: 4
375
375
  summary: The best way to manage your application's dependencies