rubygems-update 3.5.6 → 3.5.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +54 -0
  3. data/Manifest.txt +7 -4
  4. data/bundler/CHANGELOG.md +30 -0
  5. data/bundler/lib/bundler/build_metadata.rb +2 -2
  6. data/bundler/lib/bundler/cli/binstubs.rb +1 -1
  7. data/bundler/lib/bundler/cli/plugin.rb +3 -2
  8. data/bundler/lib/bundler/cli.rb +1 -1
  9. data/bundler/lib/bundler/dsl.rb +16 -1
  10. data/bundler/lib/bundler/gem_version_promoter.rb +42 -38
  11. data/bundler/lib/bundler/man/bundle-add.1 +1 -1
  12. data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
  13. data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
  14. data/bundler/lib/bundler/man/bundle-check.1 +1 -1
  15. data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
  16. data/bundler/lib/bundler/man/bundle-config.1 +1 -1
  17. data/bundler/lib/bundler/man/bundle-console.1 +1 -1
  18. data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
  19. data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
  20. data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
  21. data/bundler/lib/bundler/man/bundle-help.1 +1 -1
  22. data/bundler/lib/bundler/man/bundle-info.1 +1 -1
  23. data/bundler/lib/bundler/man/bundle-init.1 +1 -1
  24. data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
  25. data/bundler/lib/bundler/man/bundle-install.1 +3 -3
  26. data/bundler/lib/bundler/man/bundle-install.1.ronn +2 -2
  27. data/bundler/lib/bundler/man/bundle-list.1 +1 -1
  28. data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
  29. data/bundler/lib/bundler/man/bundle-open.1 +1 -1
  30. data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
  31. data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
  32. data/bundler/lib/bundler/man/bundle-plugin.1 +7 -4
  33. data/bundler/lib/bundler/man/bundle-plugin.1.ronn +7 -3
  34. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  35. data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
  36. data/bundler/lib/bundler/man/bundle-show.1 +1 -1
  37. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  38. data/bundler/lib/bundler/man/bundle-version.1 +1 -1
  39. data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
  40. data/bundler/lib/bundler/man/bundle.1 +1 -1
  41. data/bundler/lib/bundler/man/gemfile.5 +3 -3
  42. data/bundler/lib/bundler/man/gemfile.5.ronn +2 -2
  43. data/bundler/lib/bundler/plugin/installer/path.rb +18 -0
  44. data/bundler/lib/bundler/plugin/installer.rb +36 -16
  45. data/bundler/lib/bundler/plugin/source_list.rb +4 -4
  46. data/bundler/lib/bundler/resolver/candidate.rb +1 -1
  47. data/bundler/lib/bundler/resolver.rb +54 -24
  48. data/bundler/lib/bundler/self_manager.rb +1 -1
  49. data/bundler/lib/bundler/settings.rb +10 -7
  50. data/bundler/lib/bundler/source/rubygems.rb +2 -2
  51. data/bundler/lib/bundler/source_list.rb +2 -2
  52. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +4 -3
  53. data/bundler/lib/bundler/templates/newgem/rubocop.yml.tt +0 -5
  54. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +1 -0
  55. data/bundler/lib/bundler/vendored_net_http.rb +7 -3
  56. data/bundler/lib/bundler/vendored_timeout.rb +7 -3
  57. data/bundler/lib/bundler/version.rb +1 -1
  58. data/lib/rubygems/command.rb +1 -1
  59. data/lib/rubygems/command_manager.rb +2 -1
  60. data/lib/rubygems/commands/build_command.rb +2 -11
  61. data/lib/rubygems/commands/help_command.rb +2 -2
  62. data/lib/rubygems/commands/rdoc_command.rb +1 -8
  63. data/lib/rubygems/commands/rebuild_command.rb +264 -0
  64. data/lib/rubygems/config_file.rb +20 -8
  65. data/lib/rubygems/defaults.rb +4 -4
  66. data/lib/rubygems/dependency.rb +2 -2
  67. data/lib/rubygems/dependency_list.rb +1 -1
  68. data/lib/rubygems/ext/cargo_builder.rb +1 -1
  69. data/lib/rubygems/gemcutter_utilities.rb +1 -1
  70. data/lib/rubygems/gemspec_helpers.rb +19 -0
  71. data/lib/rubygems/package.rb +2 -2
  72. data/lib/rubygems/remote_fetcher.rb +1 -1
  73. data/lib/rubygems/request.rb +1 -1
  74. data/lib/rubygems/request_set.rb +1 -1
  75. data/lib/rubygems/resolver/spec_specification.rb +7 -0
  76. data/lib/rubygems/s3_uri_signer.rb +1 -1
  77. data/lib/rubygems/safe_yaml.rb +10 -1
  78. data/lib/rubygems/security.rb +1 -1
  79. data/lib/rubygems/specification.rb +1 -1
  80. data/lib/rubygems/specification_policy.rb +9 -1
  81. data/lib/rubygems/util/licenses.rb +43 -0
  82. data/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph.rb +1 -1
  83. data/lib/rubygems/vendored_net_http.rb +5 -0
  84. data/lib/rubygems/vendored_timeout.rb +5 -0
  85. data/lib/rubygems.rb +2 -2
  86. data/rubygems-update.gemspec +1 -1
  87. metadata +10 -7
  88. data/lib/rubygems/net/http.rb +0 -3
  89. data/lib/rubygems/timeout.rb +0 -3
  90. /data/lib/rubygems/{optparse.rb → vendored_optparse.rb} +0 -0
  91. /data/lib/rubygems/{tsort.rb → vendored_tsort.rb} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 441d0ff90372c26b0c6ecb291af1dffa910597060b81e655cd17fdd0f28f0fac
4
- data.tar.gz: bd7079f9e2f60401c275254d5418986baadc1578788cfb4ed20dd9c163d00df7
3
+ metadata.gz: 9a2678739bb9aec6c55fccde57b8156dea5c1fe48a21f2ad189e57dc0dd469d6
4
+ data.tar.gz: cb8a2bb827a187b5f20e9a3ba0810cfcfafe64124e0b8b74bd3dd17b023e82dc
5
5
  SHA512:
6
- metadata.gz: 58c8b6329079a1a2b8849fd17167e31fd7bb9dc255b226489db1be189ec245b004bc49bd58e6e336608260c24e88a40003e903b35445d3b8f5bf546be2e06a92
7
- data.tar.gz: a4154c7e57d48f9c88e25ef975340b49b51195455ae1548285439bc0fd776019f3c4d250f170b743cfe83ac4132b2165f39d528bbd73470c65008792ac092fea
6
+ metadata.gz: 15d77cdf7c54546c855e2d339fc0724a306d0d9235989504e0eac89b0d931401b2fb4e39bf026b6ac45dfd460d80082eeaaafa1249c68f4e552c6d664e5ce993
7
+ data.tar.gz: 28dadfbea1be447d43ec7b820df10aa871316e31be79232b1eb25780bc994cefbf647700932e83fb55a401437350e6b760a9f1a1920bde5f0a346480bea23a3e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,57 @@
1
+ # 3.5.8 / 2024-04-11
2
+
3
+ ## Security:
4
+
5
+ * Respect global umask when writing regular files. Pull request
6
+ [#7518](https://github.com/rubygems/rubygems/pull/7518) by
7
+ deivid-rodriguez
8
+
9
+ ## Enhancements:
10
+
11
+ * Allow string keys with gemrc. Pull request
12
+ [#7543](https://github.com/rubygems/rubygems/pull/7543) by hsbt
13
+ * [Experimental] Add "gem rebuild" command. Pull request
14
+ [#4913](https://github.com/rubygems/rubygems/pull/4913) by duckinator
15
+ * Installs bundler 2.5.8 as a default gem.
16
+
17
+ ## Bug fixes:
18
+
19
+ * Fix NoMethodError crash when building errors about corrupt package
20
+ files. Pull request
21
+ [#7539](https://github.com/rubygems/rubygems/pull/7539) by jez
22
+ * Fix resolver to properly intersect Arrays of `Gem::Resolver::Activation`
23
+ objects. Pull request
24
+ [#7537](https://github.com/rubygems/rubygems/pull/7537) by
25
+ deivid-rodriguez
26
+
27
+ # 3.5.7 / 2024-03-22
28
+
29
+ ## Enhancements:
30
+
31
+ * Warn on empty or open required_ruby_version specification attribute.
32
+ Pull request [#5010](https://github.com/rubygems/rubygems/pull/5010) by
33
+ simi
34
+ * Control whether YAML aliases are enabled in Gem::SafeYAML.safe_load via
35
+ attribute. Pull request
36
+ [#7464](https://github.com/rubygems/rubygems/pull/7464) by segiddins
37
+ * Update SPDX license list as of 2024-02-08. Pull request
38
+ [#7468](https://github.com/rubygems/rubygems/pull/7468) by
39
+ github-actions[bot]
40
+ * Installs bundler 2.5.7 as a default gem.
41
+
42
+ ## Bug fixes:
43
+
44
+ * Allow prerelease activation (even if requirement is not explicit about
45
+ it) when it's the only possibility. Pull request
46
+ [#7428](https://github.com/rubygems/rubygems/pull/7428) by kimesf
47
+
48
+ ## Documentation:
49
+
50
+ * Fix a typo. Pull request
51
+ [#7505](https://github.com/rubygems/rubygems/pull/7505) by hsbt
52
+ * Use https instead of http in documentation links. Pull request
53
+ [#7481](https://github.com/rubygems/rubygems/pull/7481) by hsbt
54
+
1
55
  # 3.5.6 / 2024-02-06
2
56
 
3
57
  ## Enhancements:
data/Manifest.txt CHANGED
@@ -164,6 +164,7 @@ bundler/lib/bundler/plugin/events.rb
164
164
  bundler/lib/bundler/plugin/index.rb
165
165
  bundler/lib/bundler/plugin/installer.rb
166
166
  bundler/lib/bundler/plugin/installer/git.rb
167
+ bundler/lib/bundler/plugin/installer/path.rb
167
168
  bundler/lib/bundler/plugin/installer/rubygems.rb
168
169
  bundler/lib/bundler/plugin/source_list.rb
169
170
  bundler/lib/bundler/process_lock.rb
@@ -383,6 +384,7 @@ lib/rubygems/commands/pristine_command.rb
383
384
  lib/rubygems/commands/push_command.rb
384
385
  lib/rubygems/commands/query_command.rb
385
386
  lib/rubygems/commands/rdoc_command.rb
387
+ lib/rubygems/commands/rebuild_command.rb
386
388
  lib/rubygems/commands/search_command.rb
387
389
  lib/rubygems/commands/server_command.rb
388
390
  lib/rubygems/commands/setup_command.rb
@@ -424,6 +426,7 @@ lib/rubygems/gemcutter_utilities.rb
424
426
  lib/rubygems/gemcutter_utilities/webauthn_listener.rb
425
427
  lib/rubygems/gemcutter_utilities/webauthn_listener/response.rb
426
428
  lib/rubygems/gemcutter_utilities/webauthn_poller.rb
429
+ lib/rubygems/gemspec_helpers.rb
427
430
  lib/rubygems/install_default_message.rb
428
431
  lib/rubygems/install_message.rb
429
432
  lib/rubygems/install_update_options.rb
@@ -431,9 +434,7 @@ lib/rubygems/installer.rb
431
434
  lib/rubygems/installer_uninstaller_utils.rb
432
435
  lib/rubygems/local_remote_options.rb
433
436
  lib/rubygems/name_tuple.rb
434
- lib/rubygems/net/http.rb
435
437
  lib/rubygems/openssl.rb
436
- lib/rubygems/optparse.rb
437
438
  lib/rubygems/package.rb
438
439
  lib/rubygems/package/digest_io.rb
439
440
  lib/rubygems/package/file_source.rb
@@ -519,8 +520,6 @@ lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA.pem
519
520
  lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem
520
521
  lib/rubygems/stub_specification.rb
521
522
  lib/rubygems/text.rb
522
- lib/rubygems/timeout.rb
523
- lib/rubygems/tsort.rb
524
523
  lib/rubygems/uninstaller.rb
525
524
  lib/rubygems/unknown_command_spell_checker.rb
526
525
  lib/rubygems/update_suggestion.rb
@@ -608,6 +607,10 @@ lib/rubygems/vendor/uri/lib/uri/version.rb
608
607
  lib/rubygems/vendor/uri/lib/uri/ws.rb
609
608
  lib/rubygems/vendor/uri/lib/uri/wss.rb
610
609
  lib/rubygems/vendored_molinillo.rb
610
+ lib/rubygems/vendored_net_http.rb
611
+ lib/rubygems/vendored_optparse.rb
612
+ lib/rubygems/vendored_timeout.rb
613
+ lib/rubygems/vendored_tsort.rb
611
614
  lib/rubygems/version.rb
612
615
  lib/rubygems/version_option.rb
613
616
  lib/rubygems/yaml_serializer.rb
data/bundler/CHANGELOG.md CHANGED
@@ -1,3 +1,33 @@
1
+ # 2.5.8 (April 11, 2024)
2
+
3
+ ## Enhancements:
4
+
5
+ - Allow installing plugins from path via CLI [#6960](https://github.com/rubygems/rubygems/pull/6960)
6
+ - Improve validation of `bundle plugin install` options [#7529](https://github.com/rubygems/rubygems/pull/7529)
7
+
8
+ ## Bug fixes:
9
+
10
+ - Fix resolver error message when it runs out of versions due to `--strict --patch` filtering out everything [#7527](https://github.com/rubygems/rubygems/pull/7527)
11
+ - Fix incorrect `bundle update --bundler` message [#7516](https://github.com/rubygems/rubygems/pull/7516)
12
+
13
+ # 2.5.7 (March 22, 2024)
14
+
15
+ ## Deprecations:
16
+
17
+ - Deprecate `bundle plugin install --local-git=` [#7048](https://github.com/rubygems/rubygems/pull/7048)
18
+
19
+ ## Enhancements:
20
+
21
+ - Ignore commented out keys in config file [#7514](https://github.com/rubygems/rubygems/pull/7514)
22
+ - Fix exclusion of `.gemspec` file itself in `bundle gem` generated gemspec file [#7488](https://github.com/rubygems/rubygems/pull/7488)
23
+ - Remove redundant configs from `bundle gem` generated rubocop configuration [#7478](https://github.com/rubygems/rubygems/pull/7478)
24
+ - Add `gitlab:` git source shorthand [#7449](https://github.com/rubygems/rubygems/pull/7449)
25
+ - Use full path for `instance_eval` in `Bundler::DSL#eval_gemfile` [#7471](https://github.com/rubygems/rubygems/pull/7471)
26
+
27
+ ## Documentation:
28
+
29
+ - Use https instead of http in documentation links [#7481](https://github.com/rubygems/rubygems/pull/7481)
30
+
1
31
  # 2.5.6 (February 6, 2024)
2
32
 
3
33
  ## Deprecations:
@@ -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 = "2024-02-06".freeze
8
- @git_commit_sha = "7ac045dcaa".freeze
7
+ @built_at = "2024-04-11".freeze
8
+ @git_commit_sha = "cf66a7369b".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -45,7 +45,7 @@ module Bundler
45
45
  next
46
46
  end
47
47
 
48
- Bundler.settings.temporary(path: (Bundler.settings[:path] || Bundler.root)) do
48
+ Bundler.settings.temporary(path: Bundler.settings[:path] || Bundler.root) do
49
49
  installer.generate_standalone_bundler_executable_stubs(spec, installer_opts)
50
50
  end
51
51
  else
@@ -5,14 +5,15 @@ module Bundler
5
5
  class CLI::Plugin < Thor
6
6
  desc "install PLUGINS", "Install the plugin from the source"
7
7
  long_desc <<-D
8
- Install plugins either from the rubygems source provided (with --source option) or from a git source provided with --git (for remote repos) or --local_git (for local repos). If no sources are provided, it uses Gem.sources
8
+ Install plugins either from the rubygems source provided (with --source option), from a git source provided with --git, or a local path provided with --path. If no sources are provided, it uses Gem.sources
9
9
  D
10
10
  method_option "source", type: :string, default: nil, banner: "URL of the RubyGems source to fetch the plugin from"
11
11
  method_option "version", type: :string, default: nil, banner: "The version of the plugin to fetch"
12
12
  method_option "git", type: :string, default: nil, banner: "URL of the git repo to fetch from"
13
- method_option "local_git", type: :string, default: nil, banner: "Path of the local git repo to fetch from"
13
+ method_option "local_git", type: :string, default: nil, banner: "Path of the local git repo to fetch from (deprecated)"
14
14
  method_option "branch", type: :string, default: nil, banner: "The git branch to checkout"
15
15
  method_option "ref", type: :string, default: nil, banner: "The git revision to check out"
16
+ method_option "path", type: :string, default: nil, banner: "Path of a local gem to directly use"
16
17
  def install(*plugins)
17
18
  Bundler::Plugin.install(plugins, options)
18
19
  end
@@ -620,7 +620,7 @@ module Bundler
620
620
  method_option "major", type: :boolean, banner: "If updating, prefer updating to next major version (default)"
621
621
  method_option "pre", type: :boolean, banner: "If updating, always choose the highest allowed version, regardless of prerelease status"
622
622
  method_option "strict", type: :boolean, banner: "If updating, do not allow any gem to be updated past latest --patch | --minor | --major"
623
- method_option "conservative", type: :boolean, banner: "If updating, use bundle install conservative update behavior and do not allow shared dependencies to be updated"
623
+ method_option "conservative", type: :boolean, banner: "If updating, use bundle install conservative update behavior and do not allow shared dependencies to be updated"
624
624
  method_option "bundler", type: :string, lazy_default: "> 0.a", banner: "Update the locked version of bundler"
625
625
  def lock
626
626
  require_relative "cli/lock"
@@ -19,6 +19,7 @@ module Bundler
19
19
  platform platforms type source install_if gemfile force_ruby_platform].freeze
20
20
 
21
21
  GITHUB_PULL_REQUEST_URL = %r{\Ahttps://github\.com/([A-Za-z0-9_\-\.]+/[A-Za-z0-9_\-\.]+)/pull/(\d+)\z}
22
+ GITLAB_MERGE_REQUEST_URL = %r{\Ahttps://gitlab\.com/([A-Za-z0-9_\-\./]+)/-/merge_requests/(\d+)\z}
22
23
 
23
24
  attr_reader :gemspecs, :gemfile
24
25
  attr_accessor :dependencies
@@ -46,7 +47,7 @@ module Bundler
46
47
  @gemfile = expanded_gemfile_path
47
48
  @gemfiles << expanded_gemfile_path
48
49
  contents ||= Bundler.read_file(@gemfile.to_s)
49
- instance_eval(contents, gemfile.to_s, 1)
50
+ instance_eval(contents, @gemfile.to_s, 1)
50
51
  rescue Exception => e # rubocop:disable Lint/RescueException
51
52
  message = "There was an error " \
52
53
  "#{e.is_a?(GemfileEvalError) ? "evaluating" : "parsing"} " \
@@ -308,6 +309,20 @@ module Bundler
308
309
  repo_name ||= user_name
309
310
  "https://#{user_name}@bitbucket.org/#{user_name}/#{repo_name}.git"
310
311
  end
312
+
313
+ git_source(:gitlab) do |repo_name|
314
+ if repo_name =~ GITLAB_MERGE_REQUEST_URL
315
+ {
316
+ "git" => "https://gitlab.com/#{$1}.git",
317
+ "branch" => nil,
318
+ "ref" => "refs/merge-requests/#{$2}/head",
319
+ "tag" => nil,
320
+ }
321
+ else
322
+ repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
323
+ "https://gitlab.com/#{repo_name}.git"
324
+ end
325
+ end
311
326
  end
312
327
 
313
328
  def with_source(source)
@@ -45,17 +45,37 @@ module Bundler
45
45
 
46
46
  # Given a Resolver::Package and an Array of Specifications of available
47
47
  # versions for a gem, this method will return the Array of Specifications
48
- # sorted (and possibly truncated if strict is true) in an order to give
49
- # preference to the current level (:major, :minor or :patch) when resolution
50
- # is deciding what versions best resolve all dependencies in the bundle.
48
+ # sorted in an order to give preference to the current level (:major, :minor
49
+ # or :patch) when resolution is deciding what versions best resolve all
50
+ # dependencies in the bundle.
51
51
  # @param package [Resolver::Package] The package being resolved.
52
52
  # @param specs [Specification] An array of Specifications for the package.
53
- # @return [Specification] A new instance of the Specification Array sorted and
54
- # possibly filtered.
53
+ # @return [Specification] A new instance of the Specification Array sorted.
55
54
  def sort_versions(package, specs)
56
- specs = filter_dep_specs(specs, package) if strict
55
+ locked_version = package.locked_version
57
56
 
58
- sort_dep_specs(specs, package)
57
+ result = specs.sort do |a, b|
58
+ unless package.prerelease_specified? || pre?
59
+ a_pre = a.prerelease?
60
+ b_pre = b.prerelease?
61
+
62
+ next 1 if a_pre && !b_pre
63
+ next -1 if b_pre && !a_pre
64
+ end
65
+
66
+ if major? || locked_version.nil?
67
+ b <=> a
68
+ elsif either_version_older_than_locked?(a, b, locked_version)
69
+ b <=> a
70
+ elsif segments_do_not_match?(a, b, :major)
71
+ a <=> b
72
+ elsif !minor? && segments_do_not_match?(a, b, :minor)
73
+ a <=> b
74
+ else
75
+ b <=> a
76
+ end
77
+ end
78
+ post_sort(result, package.unlock?, locked_version)
59
79
  end
60
80
 
61
81
  # @return [bool] Convenience method for testing value of level variable.
@@ -73,9 +93,18 @@ module Bundler
73
93
  pre == true
74
94
  end
75
95
 
76
- private
96
+ # Given a Resolver::Package and an Array of Specifications of available
97
+ # versions for a gem, this method will truncate the Array if strict
98
+ # is true. That means filtering out downgrades from the version currently
99
+ # locked, and filtering out upgrades that go past the selected level (major,
100
+ # minor, or patch).
101
+ # @param package [Resolver::Package] The package being resolved.
102
+ # @param specs [Specification] An array of Specifications for the package.
103
+ # @return [Specification] A new instance of the Specification Array
104
+ # truncated.
105
+ def filter_versions(package, specs)
106
+ return specs unless strict
77
107
 
78
- def filter_dep_specs(specs, package)
79
108
  locked_version = package.locked_version
80
109
  return specs if locked_version.nil? || major?
81
110
 
@@ -89,32 +118,7 @@ module Bundler
89
118
  end
90
119
  end
91
120
 
92
- def sort_dep_specs(specs, package)
93
- locked_version = package.locked_version
94
-
95
- result = specs.sort do |a, b|
96
- unless package.prerelease_specified? || pre?
97
- a_pre = a.prerelease?
98
- b_pre = b.prerelease?
99
-
100
- next -1 if a_pre && !b_pre
101
- next 1 if b_pre && !a_pre
102
- end
103
-
104
- if major? || locked_version.nil?
105
- a <=> b
106
- elsif either_version_older_than_locked?(a, b, locked_version)
107
- a <=> b
108
- elsif segments_do_not_match?(a, b, :major)
109
- b <=> a
110
- elsif !minor? && segments_do_not_match?(a, b, :minor)
111
- b <=> a
112
- else
113
- a <=> b
114
- end
115
- end
116
- post_sort(result, package.unlock?, locked_version)
117
- end
121
+ private
118
122
 
119
123
  def either_version_older_than_locked?(a, b, locked_version)
120
124
  a.version < locked_version || b.version < locked_version
@@ -133,13 +137,13 @@ module Bundler
133
137
  if unlock || locked_version.nil?
134
138
  result
135
139
  else
136
- move_version_to_end(result, locked_version)
140
+ move_version_to_beginning(result, locked_version)
137
141
  end
138
142
  end
139
143
 
140
- def move_version_to_end(result, version)
144
+ def move_version_to_beginning(result, version)
141
145
  move, keep = result.partition {|s| s.version.to_s == version.to_s }
142
- keep.concat(move)
146
+ move.concat(keep)
143
147
  end
144
148
  end
145
149
  end
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-ADD" "1" "December 2023" ""
3
+ .TH "BUNDLE\-ADD" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-BINSTUBS" "1" "December 2023" ""
3
+ .TH "BUNDLE\-BINSTUBS" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CACHE" "1" "December 2023" ""
3
+ .TH "BUNDLE\-CACHE" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CHECK" "1" "December 2023" ""
3
+ .TH "BUNDLE\-CHECK" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CLEAN" "1" "December 2023" ""
3
+ .TH "BUNDLE\-CLEAN" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CONFIG" "1" "December 2023" ""
3
+ .TH "BUNDLE\-CONFIG" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-config\fR \- Set bundler configuration options
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CONSOLE" "1" "December 2023" ""
3
+ .TH "BUNDLE\-CONSOLE" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-console\fR \- Deprecated way to open an IRB session with the bundle pre\-loaded
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-DOCTOR" "1" "December 2023" ""
3
+ .TH "BUNDLE\-DOCTOR" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-doctor\fR \- Checks the bundle for common problems
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-EXEC" "1" "December 2023" ""
3
+ .TH "BUNDLE\-EXEC" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-exec\fR \- Execute a command in the context of the bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-GEM" "1" "December 2023" ""
3
+ .TH "BUNDLE\-GEM" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-HELP" "1" "December 2023" ""
3
+ .TH "BUNDLE\-HELP" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-help\fR \- Displays detailed help for each subcommand
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-INFO" "1" "December 2023" ""
3
+ .TH "BUNDLE\-INFO" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-info\fR \- Show information for the given gem in your bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-INIT" "1" "December 2023" ""
3
+ .TH "BUNDLE\-INIT" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-init\fR \- Generates a Gemfile into the current working directory
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-INJECT" "1" "December 2023" ""
3
+ .TH "BUNDLE\-INJECT" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-INSTALL" "1" "December 2023" ""
3
+ .TH "BUNDLE\-INSTALL" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
6
6
  .SH "SYNOPSIS"
@@ -208,8 +208,8 @@ To explicitly update \fBactionpack\fR, including its dependencies which other ge
208
208
  \fBSummary\fR: In general, after making a change to the Gemfile(5) , you should first try to run \fBbundle install\fR, which will guarantee that no other gem in the Gemfile(5) is impacted by the change\. If that does not work, run bundle update(1) \fIbundle\-update\.1\.html\fR\.
209
209
  .SH "SEE ALSO"
210
210
  .IP "\(bu" 4
211
- Gem install docs \fIhttp://guides\.rubygems\.org/rubygems\-basics/#installing\-gems\fR
211
+ Gem install docs \fIhttps://guides\.rubygems\.org/rubygems\-basics/#installing\-gems\fR
212
212
  .IP "\(bu" 4
213
- Rubygems signing docs \fIhttp://guides\.rubygems\.org/security/\fR
213
+ Rubygems signing docs \fIhttps://guides\.rubygems\.org/security/\fR
214
214
  .IP "" 0
215
215
 
@@ -379,5 +379,5 @@ does not work, run [bundle update(1)](bundle-update.1.html).
379
379
 
380
380
  ## SEE ALSO
381
381
 
382
- * [Gem install docs](http://guides.rubygems.org/rubygems-basics/#installing-gems)
383
- * [Rubygems signing docs](http://guides.rubygems.org/security/)
382
+ * [Gem install docs](https://guides.rubygems.org/rubygems-basics/#installing-gems)
383
+ * [Rubygems signing docs](https://guides.rubygems.org/security/)
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-LIST" "1" "December 2023" ""
3
+ .TH "BUNDLE\-LIST" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-list\fR \- List all the gems in the bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-LOCK" "1" "December 2023" ""
3
+ .TH "BUNDLE\-LOCK" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-OPEN" "1" "December 2023" ""
3
+ .TH "BUNDLE\-OPEN" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-OUTDATED" "1" "December 2023" ""
3
+ .TH "BUNDLE\-OUTDATED" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-outdated\fR \- List installed gems with newer versions available
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-PLATFORM" "1" "December 2023" ""
3
+ .TH "BUNDLE\-PLATFORM" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-platform\fR \- Displays platform compatibility information
6
6
  .SH "SYNOPSIS"
@@ -1,10 +1,10 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-PLUGIN" "1" "December 2023" ""
3
+ .TH "BUNDLE\-PLUGIN" "1" "March 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-plugin\fR \- Manage Bundler plugins
6
6
  .SH "SYNOPSIS"
7
- \fBbundle plugin\fR install PLUGINS [\-\-source=\fISOURCE\fR] [\-\-version=\fIversion\fR] [\-\-git|\-\-local_git=\fIgit\-url\fR] [\-\-branch=\fIbranch\fR|\-\-ref=\fIrev\fR]
7
+ \fBbundle plugin\fR install PLUGINS [\-\-source=\fISOURCE\fR] [\-\-version=\fIversion\fR] [\-\-git=\fIgit\-url\fR] [\-\-branch=\fIbranch\fR|\-\-ref=\fIrev\fR] [\-\-path=\fIpath\fR]
8
8
  .br
9
9
  \fBbundle plugin\fR uninstall PLUGINS
10
10
  .br
@@ -27,7 +27,7 @@ Install bundler\-graph gem from example\.com\. The global source, specified in s
27
27
  You can specify the version of the gem via \fB\-\-version\fR\.
28
28
  .TP
29
29
  \fBbundle plugin install bundler\-graph \-\-git https://github\.com/rubygems/bundler\-graph\fR
30
- Install bundler\-graph gem from Git repository\. \fB\-\-git\fR can be replaced with \fB\-\-local\-git\fR\. You cannot use both \fB\-\-git\fR and \fB\-\-local\-git\fR\. You can use standard Git URLs like:
30
+ Install bundler\-graph gem from Git repository\. You can use standard Git URLs like:
31
31
  .IP
32
32
  \fBssh://[user@]host\.xz[:port]/path/to/repo\.git\fR
33
33
  .br
@@ -37,7 +37,10 @@ Install bundler\-graph gem from Git repository\. \fB\-\-git\fR can be replaced w
37
37
  .br
38
38
  \fBfile:///path/to/repo\fR
39
39
  .IP
40
- When you specify \fB\-\-git\fR/\fB\-\-local\-git\fR, you can use \fB\-\-branch\fR or \fB\-\-ref\fR to specify any branch, tag, or commit hash (revision) to use\. When you specify both, only the latter is used\.
40
+ When you specify \fB\-\-git\fR, you can use \fB\-\-branch\fR or \fB\-\-ref\fR to specify any branch, tag, or commit hash (revision) to use\.
41
+ .TP
42
+ \fBbundle plugin install bundler\-graph \-\-path \.\./bundler\-graph\fR
43
+ Install bundler\-graph gem from a local path\.
41
44
  .SS "uninstall"
42
45
  Uninstall the plugin(s) specified in PLUGINS\.
43
46
  .SS "list"
@@ -4,7 +4,8 @@ bundle-plugin(1) -- Manage Bundler plugins
4
4
  ## SYNOPSIS
5
5
 
6
6
  `bundle plugin` install PLUGINS [--source=<SOURCE>] [--version=<version>]
7
- [--git|--local_git=<git-url>] [--branch=<branch>|--ref=<rev>]<br>
7
+ [--git=<git-url>] [--branch=<branch>|--ref=<rev>]
8
+ [--path=<path>]<br>
8
9
  `bundle plugin` uninstall PLUGINS<br>
9
10
  `bundle plugin` list<br>
10
11
  `bundle plugin` help [COMMAND]
@@ -29,14 +30,17 @@ Install the given plugin(s).
29
30
  You can specify the version of the gem via `--version`.
30
31
 
31
32
  * `bundle plugin install bundler-graph --git https://github.com/rubygems/bundler-graph`:
32
- Install bundler-graph gem from Git repository. `--git` can be replaced with `--local-git`. You cannot use both `--git` and `--local-git`. You can use standard Git URLs like:
33
+ Install bundler-graph gem from Git repository. You can use standard Git URLs like:
33
34
 
34
35
  `ssh://[user@]host.xz[:port]/path/to/repo.git`<br>
35
36
  `http[s]://host.xz[:port]/path/to/repo.git`<br>
36
37
  `/path/to/repo`<br>
37
38
  `file:///path/to/repo`
38
39
 
39
- When you specify `--git`/`--local-git`, you can use `--branch` or `--ref` to specify any branch, tag, or commit hash (revision) to use. When you specify both, only the latter is used.
40
+ When you specify `--git`, you can use `--branch` or `--ref` to specify any branch, tag, or commit hash (revision) to use.
41
+
42
+ * `bundle plugin install bundler-graph --path ../bundler-graph`:
43
+ Install bundler-graph gem from a local path.
40
44
 
41
45
  ### uninstall
42
46