rubygems-update 3.2.7 → 3.2.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +43 -0
  3. data/Manifest.txt +3 -0
  4. data/Rakefile +15 -13
  5. data/bundler/CHANGELOG.md +53 -0
  6. data/bundler/lib/bundler.rb +1 -1
  7. data/bundler/lib/bundler/build_metadata.rb +2 -2
  8. data/bundler/lib/bundler/cli.rb +1 -0
  9. data/bundler/lib/bundler/cli/gem.rb +12 -0
  10. data/bundler/lib/bundler/definition.rb +15 -25
  11. data/bundler/lib/bundler/index.rb +6 -5
  12. data/bundler/lib/bundler/installer.rb +2 -0
  13. data/bundler/lib/bundler/installer/standalone.rb +2 -1
  14. data/bundler/lib/bundler/lazy_specification.rb +8 -17
  15. data/bundler/lib/bundler/man/bundle-config.1 +4 -4
  16. data/bundler/lib/bundler/man/bundle-config.1.ronn +8 -7
  17. data/bundler/lib/bundler/resolver.rb +48 -29
  18. data/bundler/lib/bundler/resolver/spec_group.rb +53 -38
  19. data/bundler/lib/bundler/rubygems_gem_installer.rb +47 -0
  20. data/bundler/lib/bundler/shared_helpers.rb +2 -2
  21. data/bundler/lib/bundler/source_list.rb +2 -4
  22. data/bundler/lib/bundler/spec_set.rb +4 -3
  23. data/bundler/lib/bundler/stub_specification.rb +8 -0
  24. data/bundler/lib/bundler/templates/newgem/CHANGELOG.md.tt +5 -0
  25. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -1
  26. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +11 -5
  27. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +1 -1
  28. data/bundler/lib/bundler/vendor/thor/lib/thor.rb +5 -6
  29. data/bundler/lib/bundler/vendor/thor/lib/thor/actions.rb +1 -1
  30. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +4 -2
  31. data/bundler/lib/bundler/vendor/thor/lib/thor/error.rb +1 -1
  32. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +5 -1
  33. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +9 -8
  34. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +5 -2
  35. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb +5 -1
  36. data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  37. data/bundler/lib/bundler/version.rb +1 -1
  38. data/lib/rubygems.rb +2 -2
  39. data/lib/rubygems/command.rb +1 -0
  40. data/lib/rubygems/config_file.rb +9 -0
  41. data/lib/rubygems/core_ext/tcpsocket_init.rb +49 -0
  42. data/lib/rubygems/dependency.rb +5 -1
  43. data/lib/rubygems/remote_fetcher.rb +1 -0
  44. data/lib/rubygems/resolver/index_specification.rb +4 -1
  45. data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb +7 -0
  46. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb +0 -1
  47. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb +10 -4
  48. data/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb +1 -1
  49. data/lib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb +11 -0
  50. data/lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb +11 -7
  51. data/lib/rubygems/specification.rb +13 -11
  52. data/lib/rubygems/test_case.rb +5 -6
  53. data/rubygems-update.gemspec +1 -1
  54. data/test/rubygems/data/null-required-ruby-version.gemspec.rz +0 -0
  55. data/test/rubygems/test_gem.rb +78 -0
  56. data/test/rubygems/test_gem_commands_outdated_command.rb +18 -0
  57. data/test/rubygems/test_gem_config_file.rb +10 -0
  58. data/test/rubygems/test_gem_dependency_installer.rb +27 -18
  59. data/test/rubygems/test_gem_remote_fetcher.rb +6 -0
  60. data/test/rubygems/test_gem_requirement.rb +1 -1
  61. data/test/rubygems/test_gem_specification.rb +10 -15
  62. data/test/rubygems/test_gem_util.rb +4 -4
  63. metadata +6 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c18e3412218b88b1351a2dcd3096240a1b5fa833aa26c58efee7a70e72601d4
4
- data.tar.gz: 9f8fff96b275641a2fd60220cbfa98343af11c177c8797261f1d99089f4345c0
3
+ metadata.gz: d1f42e41887b87a2787222de88454c6fe46c91e52133145d44d6d1af5506252d
4
+ data.tar.gz: 6f30bb45a6ae5452b4899df880bafb667ffa19e1190035edb0311e84037944f0
5
5
  SHA512:
6
- metadata.gz: cb78b68b419a3ffa8e70a9688c563510c93982c0d3c26969594639bcf41ba6345b3a48cf1c4f756689a202d1b8d9be416d19715d18acea2640dd6dcb53cee2d1
7
- data.tar.gz: 98fb817e049053336bd47a5525a4247096558eef13efd10e5a7c38ea407569ef62fe29d135142854759874424c624bf51ed292606257a9539e60d991f891abd2
6
+ metadata.gz: 6131db8f14cd1ae89b011d14c4074fc1ee6b5ba9173aa023a1fb20baf5860a1dccec7916cc5650e02109d4c449b5300e01b4e15cd0cfa7572432025dc360cfc1
7
+ data.tar.gz: dd677ed5e9bc15e982ce9ce77793a25a638350568bcc4061f581a7d72a9ea95c982f1a89543c482bfaf6e701f6616541b60319eb4ba9ae6c5f551396ab760db6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,46 @@
1
+ # 3.2.12 / 2021-03-01
2
+
3
+ ## Bug fixes:
4
+
5
+ * Restore the ability to manually install extension gems. Pull request
6
+ #4384 by cfis
7
+
8
+ # 3.2.11 / 2021-02-17
9
+
10
+ ## Enhancements:
11
+
12
+ * Optionally fallback to IPv4 when IPv6 is unreachable. Pull request #2662
13
+ by sonalkr132
14
+
15
+ # 3.2.10 / 2021-02-15
16
+
17
+ ## Documentation:
18
+
19
+ * Add a `gem push` example to `gem help`. Pull request #4373 by
20
+ deivid-rodriguez
21
+ * Improve documentation for `required_ruby_version`. Pull request #4343 by
22
+ AlexWayfer
23
+
24
+ # 3.2.9 / 2021-02-08
25
+
26
+ ## Bug fixes:
27
+
28
+ * Fix error message when underscore selection can't find bundler. Pull
29
+ request #4363 by deivid-rodriguez
30
+ * Fix `Gem::Specification.stubs_for` returning wrong named specs. Pull
31
+ request #4356 by tompng
32
+ * Don't error out when activating a binstub unless necessary. Pull request
33
+ #4351 by deivid-rodriguez
34
+ * Fix `gem outdated` incorrectly handling platform specific gems. Pull
35
+ request #4248 by deivid-rodriguez
36
+
37
+ # 3.2.8 / 2021-02-02
38
+
39
+ ## Bug fixes:
40
+
41
+ * Fix `gem install` crashing on gemspec with nil required_ruby_version.
42
+ Pull request #4334 by pbernays
43
+
1
44
  # 3.2.7 / 2021-01-26
2
45
 
3
46
  ## Bug fixes:
data/Manifest.txt CHANGED
@@ -189,6 +189,7 @@ bundler/lib/bundler/templates/Executable.bundler
189
189
  bundler/lib/bundler/templates/Executable.standalone
190
190
  bundler/lib/bundler/templates/Gemfile
191
191
  bundler/lib/bundler/templates/gems.rb
192
+ bundler/lib/bundler/templates/newgem/CHANGELOG.md.tt
192
193
  bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt
193
194
  bundler/lib/bundler/templates/newgem/Gemfile.tt
194
195
  bundler/lib/bundler/templates/newgem/LICENSE.txt.tt
@@ -353,6 +354,7 @@ lib/rubygems/config_file.rb
353
354
  lib/rubygems/core_ext/kernel_gem.rb
354
355
  lib/rubygems/core_ext/kernel_require.rb
355
356
  lib/rubygems/core_ext/kernel_warn.rb
357
+ lib/rubygems/core_ext/tcpsocket_init.rb
356
358
  lib/rubygems/defaults.rb
357
359
  lib/rubygems/dependency.rb
358
360
  lib/rubygems/dependency_installer.rb
@@ -511,6 +513,7 @@ test/rubygems/child_key.pem
511
513
  test/rubygems/client.pem
512
514
  test/rubygems/data/gem-private_key.pem
513
515
  test/rubygems/data/gem-public_cert.pem
516
+ test/rubygems/data/null-required-ruby-version.gemspec.rz
514
517
  test/rubygems/data/null-required-rubygems-version.gemspec.rz
515
518
  test/rubygems/data/null-type.gemspec.rz
516
519
  test/rubygems/encrypted_private_key.pem
data/Rakefile CHANGED
@@ -15,6 +15,12 @@ task :update do |_, args|
15
15
  sh "ruby", "bundler/bin/bundle", "update", *args, "--gemfile=dev_gems.rb"
16
16
  end
17
17
 
18
+ desc "Update the locked bundler version in dev environment"
19
+ task :update_locked_bundler do |_, args|
20
+ sh "ruby", "bundler/bin/bundle", "update", "--bundler", "--gemfile=dev_gems.rb"
21
+ sh "ruby", "bundler/bin/bundle", "update", "--bundler", "--gemfile=bundler/test_gems.rb"
22
+ end
23
+
18
24
  desc "Setup git hooks"
19
25
  task :git_hooks do
20
26
  sh "git config core.hooksPath .githooks"
@@ -52,20 +58,16 @@ RDoc::Task.new :rdoc => 'docs', :clobber_rdoc => 'clobber_docs' do |doc|
52
58
  doc.rdoc_dir = 'doc'
53
59
  end
54
60
 
55
- begin
56
- require "automatiek"
61
+ load "util/automatiek.rake"
57
62
 
58
- Automatiek::RakeTask.new("molinillo") do |lib|
59
- lib.version = "0.7.0"
60
- lib.download = { :github => "https://github.com/CocoaPods/Molinillo" }
61
- lib.namespace = "Molinillo"
62
- lib.prefix = "Gem::Resolver"
63
- lib.vendor_lib = "lib/rubygems/resolver/molinillo"
64
- end
65
- rescue LoadError
66
- namespace :vendor do
67
- task(:molinillo) { abort "Install the automatiek gem to be able to vendor gems." }
68
- end
63
+ # We currently ship Molinillo master branch as of
64
+ # https://github.com/CocoaPods/Molinillo/commit/7cc27a355e861bdf593e2cde7bf1bca3daae4303
65
+ Automatiek::RakeTask.new("molinillo") do |lib|
66
+ lib.version = "master"
67
+ lib.download = { :github => "https://github.com/CocoaPods/Molinillo" }
68
+ lib.namespace = "Molinillo"
69
+ lib.prefix = "Gem::Resolver"
70
+ lib.vendor_lib = "lib/rubygems/resolver/molinillo"
69
71
  end
70
72
 
71
73
  namespace :rubocop do
data/bundler/CHANGELOG.md CHANGED
@@ -1,3 +1,56 @@
1
+ # 2.2.12 (March 1, 2021)
2
+
3
+ ## Bug fixes:
4
+
5
+ - Fix sporadic warnings about `nil` gemspec on install/update and make those faster [#4409](https://github.com/rubygems/rubygems/pull/4409)
6
+ - Fix deployment install with duplicate path gems added to Gemfile [#4410](https://github.com/rubygems/rubygems/pull/4410)
7
+
8
+ # 2.2.11 (February 17, 2021)
9
+
10
+ ## Bug fixes:
11
+
12
+ - Revert disable_multisource changes [#4385](https://github.com/rubygems/rubygems/pull/4385)
13
+
14
+ # 2.2.10 (February 15, 2021)
15
+
16
+ ## Security fixes:
17
+
18
+ - Fix source priority for transitive dependencies and split lockfile rubygems source sections [#3655](https://github.com/rubygems/rubygems/pull/3655)
19
+
20
+ ## Bug fixes:
21
+
22
+ - Fix adding platforms to lockfile sometimes conflicting on ruby requirements [#4371](https://github.com/rubygems/rubygems/pull/4371)
23
+ - Fix bundler sometimes choosing ruby variants over java ones [#4367](https://github.com/rubygems/rubygems/pull/4367)
24
+
25
+ ## Documentation:
26
+
27
+ - Update man pages to reflect to new default for bundle install jobs [#4188](https://github.com/rubygems/rubygems/pull/4188)
28
+
29
+ # 2.2.9 (February 8, 2021)
30
+
31
+ ## Enhancements:
32
+
33
+ - Stop removing existing platforms when force_ruby_platform is true [#4336](https://github.com/rubygems/rubygems/pull/4336)
34
+
35
+ ## Bug fixes:
36
+
37
+ - Don't install platform specific gems on truffleruby [#4333](https://github.com/rubygems/rubygems/pull/4333)
38
+
39
+ # 2.2.8 (February 2, 2021)
40
+
41
+ ## Enhancements:
42
+
43
+ - Add a CHANGELOG.md file to gems generated by `bundle gem` [#4093](https://github.com/rubygems/rubygems/pull/4093)
44
+ - Support gemified `set` [#4297](https://github.com/rubygems/rubygems/pull/4297)
45
+
46
+ ## Bug fixes:
47
+
48
+ - Fix standalone Kernel.require visibility [#4337](https://github.com/rubygems/rubygems/pull/4337)
49
+
50
+ ## Performance:
51
+
52
+ - Fix resolver edge cases and speed up bundler [#4277](https://github.com/rubygems/rubygems/pull/4277)
53
+
1
54
  # 2.2.7 (January 26, 2021)
2
55
 
3
56
  ## Enhancements:
@@ -440,7 +440,7 @@ EOF
440
440
  end
441
441
 
442
442
  def local_platform
443
- return Gem::Platform::RUBY if settings[:force_ruby_platform]
443
+ return Gem::Platform::RUBY if settings[:force_ruby_platform] || Gem.platforms == [Gem::Platform::RUBY]
444
444
  Gem::Platform.local
445
445
  end
446
446
 
@@ -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 = "2021-01-27".freeze
8
- @git_commit_sha = "7bc7ecb660".freeze
7
+ @built_at = "2021-03-01".freeze
8
+ @git_commit_sha = "1de3f8de73".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -586,6 +586,7 @@ module Bundler
586
586
  method_option :git, :type => :boolean, :default => true, :desc => "Initialize a git repo inside your library."
587
587
  method_option :mit, :type => :boolean, :desc => "Generate an MIT license file. Set a default with `bundle config set --global gem.mit true`."
588
588
  method_option :rubocop, :type => :boolean, :desc => "Add rubocop to the generated Rakefile and gemspec. Set a default with `bundle config set --global gem.rubocop true`."
589
+ method_option :changelog, :type => :boolean, :desc => "Generate changelog file. Set a default with `bundle config set --global gem.changelog true`."
589
590
  method_option :test, :type => :string, :lazy_default => Bundler.settings["gem.test"] || "", :aliases => "-t", :banner => "Use the specified test framework for your library",
590
591
  :desc => "Generate a test directory for your library, either rspec, minitest or test-unit. Set a default with `bundle config set --global gem.test (rspec|minitest|test-unit)`."
591
592
  method_option :ci, :type => :string, :lazy_default => Bundler.settings["gem.ci"] || "",
@@ -142,6 +142,18 @@ module Bundler
142
142
  templates.merge!("CODE_OF_CONDUCT.md.tt" => "CODE_OF_CONDUCT.md")
143
143
  end
144
144
 
145
+ if ask_and_set(:changelog, "Do you want to include a changelog?",
146
+ "A changelog is a file which contains a curated, chronologically ordered list of notable " \
147
+ "changes for each version of a project. To make it easier for users and contributors to" \
148
+ " see precisely what notable changes have been made between each release (or version) of" \
149
+ " the project. Whether consumers or developers, the end users of software are" \
150
+ " human beings who care about what's in the software. When the software changes, people " \
151
+ "want to know why and how. see https://keepachangelog.com")
152
+ config[:changelog] = true
153
+ Bundler.ui.info "Changelog enabled in config"
154
+ templates.merge!("CHANGELOG.md.tt" => "CHANGELOG.md")
155
+ end
156
+
145
157
  if ask_and_set(:rubocop, "Do you want to add rubocop as a dependency for gems you generate?",
146
158
  "RuboCop is a static code analyzer that has out-of-the-box rules for many " \
147
159
  "of the guidelines in the community style guide. " \
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "lockfile_parser"
4
- require "set"
5
4
 
6
5
  module Bundler
7
6
  class Definition
@@ -83,11 +82,7 @@ module Bundler
83
82
  @lockfile_contents = Bundler.read_file(lockfile)
84
83
  @locked_gems = LockfileParser.new(@lockfile_contents)
85
84
  @locked_platforms = @locked_gems.platforms
86
- if Bundler.settings[:force_ruby_platform]
87
- @platforms = [Gem::Platform::RUBY]
88
- else
89
- @platforms = @locked_platforms.dup
90
- end
85
+ @platforms = @locked_platforms.dup
91
86
  @locked_bundler_version = @locked_gems.bundler_version
92
87
  @locked_ruby_version = @locked_gems.ruby_version
93
88
 
@@ -259,23 +254,18 @@ module Bundler
259
254
  def resolve
260
255
  @resolve ||= begin
261
256
  last_resolve = converge_locked_specs
262
- resolve =
263
- if Bundler.frozen_bundle?
264
- Bundler.ui.debug "Frozen, using resolution from the lockfile"
265
- last_resolve
266
- elsif !unlocking? && nothing_changed?
267
- Bundler.ui.debug("Found no changes, using resolution from the lockfile")
268
- last_resolve
269
- else
270
- # Run a resolve against the locally available gems
271
- Bundler.ui.debug("Found changes from the lockfile, re-resolving dependencies because #{change_reason}")
272
- expanded_dependencies = expand_dependencies(dependencies + metadata_dependencies, @remote)
273
- last_resolve.merge Resolver.resolve(expanded_dependencies, index, source_requirements, last_resolve, gem_version_promoter, additional_base_requirements_for_resolve, platforms)
274
- end
275
-
276
- # filter out gems that _can_ be installed on multiple platforms, but don't need
277
- # to be
278
- resolve.for(expand_dependencies(dependencies, true), [], false, false, false)
257
+ if Bundler.frozen_bundle?
258
+ Bundler.ui.debug "Frozen, using resolution from the lockfile"
259
+ last_resolve
260
+ elsif !unlocking? && nothing_changed?
261
+ Bundler.ui.debug("Found no changes, using resolution from the lockfile")
262
+ last_resolve
263
+ else
264
+ # Run a resolve against the locally available gems
265
+ Bundler.ui.debug("Found changes from the lockfile, re-resolving dependencies because #{change_reason}")
266
+ expanded_dependencies = expand_dependencies(dependencies + metadata_dependencies, @remote)
267
+ Resolver.resolve(expanded_dependencies, index, source_requirements, last_resolve, gem_version_promoter, additional_base_requirements_for_resolve, platforms)
268
+ end
279
269
  end
280
270
  end
281
271
 
@@ -604,7 +594,7 @@ module Bundler
604
594
  deps_for_source = @dependencies.select {|s| s.source == source }
605
595
  locked_deps_for_source = @locked_deps.values.select {|dep| dep.source == locked_source }
606
596
 
607
- Set.new(deps_for_source) != Set.new(locked_deps_for_source)
597
+ deps_for_source.uniq.sort != locked_deps_for_source.sort
608
598
  end
609
599
 
610
600
  def specs_for_source_changed?(source)
@@ -884,7 +874,7 @@ module Bundler
884
874
  dependencies.each do |dep|
885
875
  dep = Dependency.new(dep, ">= 0") unless dep.respond_to?(:name)
886
876
  next unless remote || dep.current_platform?
887
- target_platforms = dep.gem_platforms(remote ? Resolver.sort_platforms(@platforms) : [generic_local_platform])
877
+ target_platforms = dep.gem_platforms(remote ? @platforms : [generic_local_platform])
888
878
  deps += expand_dependency_with_platforms(dep, target_platforms)
889
879
  end
890
880
  deps
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "set"
4
-
5
3
  module Bundler
6
4
  class Index
7
5
  include Enumerable
@@ -65,11 +63,14 @@ module Bundler
65
63
  def unsorted_search(query, base)
66
64
  results = local_search(query, base)
67
65
 
68
- seen = results.map(&:full_name).to_set unless @sources.empty?
66
+ seen = results.map(&:full_name).uniq unless @sources.empty?
69
67
 
70
68
  @sources.each do |source|
71
69
  source.unsorted_search(query, base).each do |spec|
72
- results << spec if seen.add?(spec.full_name)
70
+ next if seen.include?(spec.full_name)
71
+
72
+ seen << spec.full_name
73
+ results << spec
73
74
  end
74
75
  end
75
76
 
@@ -170,7 +171,7 @@ module Bundler
170
171
  def dependencies_eql?(spec, other_spec)
171
172
  deps = spec.dependencies.select {|d| d.type != :development }
172
173
  other_deps = other_spec.dependencies.select {|d| d.type != :development }
173
- Set.new(deps) == Set.new(other_deps)
174
+ deps.sort == other_deps.sort
174
175
  end
175
176
 
176
177
  def add_source(index)
@@ -89,6 +89,8 @@ module Bundler
89
89
  end
90
90
  install(options)
91
91
 
92
+ Gem::Specification.reset # invalidate gem specification cache so that installed gems are immediately available
93
+
92
94
  lock unless Bundler.frozen_bundle?
93
95
  Standalone.new(options[:standalone], @definition).generate if options[:standalone]
94
96
  end
@@ -55,9 +55,10 @@ module Bundler
55
55
  kernel = (class << ::Kernel; self; end)
56
56
  [kernel, ::Kernel].each do |k|
57
57
  if k.private_method_defined?(:gem_original_require)
58
+ private_require = k.private_method_defined?(:require)
58
59
  k.send(:remove_method, :require)
59
60
  k.send(:define_method, :require, k.instance_method(:gem_original_require))
60
- k.send(:private, :require)
61
+ k.send(:private, :require) if private_require
61
62
  end
62
63
  end
63
64
  END
@@ -4,22 +4,6 @@ require_relative "match_platform"
4
4
 
5
5
  module Bundler
6
6
  class LazySpecification
7
- Identifier = Struct.new(:name, :version, :platform)
8
- class Identifier
9
- include Comparable
10
- def <=>(other)
11
- return unless other.is_a?(Identifier)
12
- [name, version, platform_string] <=> [other.name, other.version, other.platform_string]
13
- end
14
-
15
- protected
16
-
17
- def platform_string
18
- platform_string = platform.to_s
19
- platform_string == Index::RUBY ? Index::NULL : platform_string
20
- end
21
- end
22
-
23
7
  include MatchPlatform
24
8
 
25
9
  attr_reader :name, :version, :dependencies, :platform
@@ -108,7 +92,7 @@ module Bundler
108
92
  end
109
93
 
110
94
  def identifier
111
- @__identifier ||= Identifier.new(name, version, platform)
95
+ @__identifier ||= [name, version, platform_string]
112
96
  end
113
97
 
114
98
  def git_version
@@ -116,6 +100,13 @@ module Bundler
116
100
  " #{source.revision[0..6]}"
117
101
  end
118
102
 
103
+ protected
104
+
105
+ def platform_string
106
+ platform_string = platform.to_s
107
+ platform_string == Index::RUBY ? Index::NULL : platform_string
108
+ end
109
+
119
110
  private
120
111
 
121
112
  def to_ary
@@ -211,10 +211,10 @@ The following is a list of all configuration keys and their purpose\. You can le
211
211
  \fBignore_messages\fR (\fBBUNDLE_IGNORE_MESSAGES\fR): When set, no post install messages will be printed\. To silence a single gem, use dot notation like \fBignore_messages\.httparty true\fR\.
212
212
  .
213
213
  .IP "\(bu" 4
214
- \fBinit_gems_rb\fR (\fBBUNDLE_INIT_GEMS_RB\fR) Generate a \fBgems\.rb\fR instead of a \fBGemfile\fR when running \fBbundle init\fR\.
214
+ \fBinit_gems_rb\fR (\fBBUNDLE_INIT_GEMS_RB\fR): Generate a \fBgems\.rb\fR instead of a \fBGemfile\fR when running \fBbundle init\fR\.
215
215
  .
216
216
  .IP "\(bu" 4
217
- \fBjobs\fR (\fBBUNDLE_JOBS\fR): The number of gems Bundler can install in parallel\. Defaults to 1\.
217
+ \fBjobs\fR (\fBBUNDLE_JOBS\fR): The number of gems Bundler can install in parallel\. Defaults to 1 on Windows, and to the the number of processors on other platforms\.
218
218
  .
219
219
  .IP "\(bu" 4
220
220
  \fBno_install\fR (\fBBUNDLE_NO_INSTALL\fR): Whether \fBbundle package\fR should skip installing gems\.
@@ -241,7 +241,7 @@ The following is a list of all configuration keys and their purpose\. You can le
241
241
  \fBprefer_patch\fR (BUNDLE_PREFER_PATCH): Prefer updating only to next patch version during updates\. Makes \fBbundle update\fR calls equivalent to \fBbundler update \-\-patch\fR\.
242
242
  .
243
243
  .IP "\(bu" 4
244
- \fBprint_only_version_number\fR (\fBBUNDLE_PRINT_ONLY_VERSION_NUMBER\fR) Print only version number from \fBbundler \-\-version\fR\.
244
+ \fBprint_only_version_number\fR (\fBBUNDLE_PRINT_ONLY_VERSION_NUMBER\fR): Print only version number from \fBbundler \-\-version\fR\.
245
245
  .
246
246
  .IP "\(bu" 4
247
247
  \fBredirect\fR (\fBBUNDLE_REDIRECT\fR): The number of redirects allowed for network requests\. Defaults to \fB5\fR\.
@@ -283,7 +283,7 @@ The following is a list of all configuration keys and their purpose\. You can le
283
283
  \fBunlock_source_unlocks_spec\fR (\fBBUNDLE_UNLOCK_SOURCE_UNLOCKS_SPEC\fR): Whether running \fBbundle update \-\-source NAME\fR unlocks a gem with the given name\. Defaults to \fBtrue\fR\.
284
284
  .
285
285
  .IP "\(bu" 4
286
- \fBupdate_requires_all_flag\fR (\fBBUNDLE_UPDATE_REQUIRES_ALL_FLAG\fR) Require passing \fB\-\-all\fR to \fBbundle update\fR when everything should be updated, and disallow passing no options to \fBbundle update\fR\.
286
+ \fBupdate_requires_all_flag\fR (\fBBUNDLE_UPDATE_REQUIRES_ALL_FLAG\fR): Require passing \fB\-\-all\fR to \fBbundle update\fR when everything should be updated, and disallow passing no options to \fBbundle update\fR\.
287
287
  .
288
288
  .IP "\(bu" 4
289
289
  \fBuser_agent\fR (\fBBUNDLE_USER_AGENT\fR): The custom user agent fragment Bundler includes in API requests\.
@@ -206,13 +206,14 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
206
206
  * `global_gem_cache` (`BUNDLE_GLOBAL_GEM_CACHE`):
207
207
  Whether Bundler should cache all gems globally, rather than locally to the
208
208
  installing Ruby installation.
209
- * `ignore_messages` (`BUNDLE_IGNORE_MESSAGES`): When set, no post install
210
- messages will be printed. To silence a single gem, use dot notation like
211
- `ignore_messages.httparty true`.
212
- * `init_gems_rb` (`BUNDLE_INIT_GEMS_RB`)
209
+ * `ignore_messages` (`BUNDLE_IGNORE_MESSAGES`):
210
+ When set, no post install messages will be printed. To silence a single gem,
211
+ use dot notation like `ignore_messages.httparty true`.
212
+ * `init_gems_rb` (`BUNDLE_INIT_GEMS_RB`):
213
213
  Generate a `gems.rb` instead of a `Gemfile` when running `bundle init`.
214
214
  * `jobs` (`BUNDLE_JOBS`):
215
- The number of gems Bundler can install in parallel. Defaults to 1.
215
+ The number of gems Bundler can install in parallel. Defaults to 1 on Windows,
216
+ and to the the number of processors on other platforms.
216
217
  * `no_install` (`BUNDLE_NO_INSTALL`):
217
218
  Whether `bundle package` should skip installing gems.
218
219
  * `no_prune` (`BUNDLE_NO_PRUNE`):
@@ -233,7 +234,7 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
233
234
  Enable Bundler's experimental plugin system.
234
235
  * `prefer_patch` (BUNDLE_PREFER_PATCH):
235
236
  Prefer updating only to next patch version during updates. Makes `bundle update` calls equivalent to `bundler update --patch`.
236
- * `print_only_version_number` (`BUNDLE_PRINT_ONLY_VERSION_NUMBER`)
237
+ * `print_only_version_number` (`BUNDLE_PRINT_ONLY_VERSION_NUMBER`):
237
238
  Print only version number from `bundler --version`.
238
239
  * `redirect` (`BUNDLE_REDIRECT`):
239
240
  The number of redirects allowed for network requests. Defaults to `5`.
@@ -269,7 +270,7 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
269
270
  * `unlock_source_unlocks_spec` (`BUNDLE_UNLOCK_SOURCE_UNLOCKS_SPEC`):
270
271
  Whether running `bundle update --source NAME` unlocks a gem with the given
271
272
  name. Defaults to `true`.
272
- * `update_requires_all_flag` (`BUNDLE_UPDATE_REQUIRES_ALL_FLAG`)
273
+ * `update_requires_all_flag` (`BUNDLE_UPDATE_REQUIRES_ALL_FLAG`):
273
274
  Require passing `--all` to `bundle update` when everything should be updated,
274
275
  and disallow passing no options to `bundle update`.
275
276
  * `user_agent` (`BUNDLE_USER_AGENT`):