bundler 1.16.4 → 1.16.5

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 (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/lib/bundler/build_metadata.rb +11 -3
  4. data/lib/bundler/cli/exec.rb +1 -0
  5. data/lib/bundler/current_ruby.rb +7 -1
  6. data/lib/bundler/dep_proxy.rb +2 -2
  7. data/lib/bundler/dependency.rb +1 -0
  8. data/lib/bundler/deprecate.rb +2 -1
  9. data/lib/bundler/env.rb +1 -1
  10. data/lib/bundler/fetcher/downloader.rb +10 -5
  11. data/lib/bundler/gem_version_promoter.rb +12 -0
  12. data/lib/bundler/lazy_specification.rb +1 -1
  13. data/lib/bundler/resolver.rb +6 -5
  14. data/lib/bundler/ruby_version.rb +1 -1
  15. data/lib/bundler/shared_helpers.rb +6 -1
  16. data/lib/bundler/version.rb +1 -1
  17. data/man/bundle-add.1 +1 -1
  18. data/man/bundle-add.1.txt +1 -1
  19. data/man/bundle-binstubs.1 +1 -1
  20. data/man/bundle-binstubs.1.txt +1 -1
  21. data/man/bundle-check.1 +1 -1
  22. data/man/bundle-check.1.txt +1 -1
  23. data/man/bundle-clean.1 +1 -1
  24. data/man/bundle-clean.1.txt +1 -1
  25. data/man/bundle-config.1 +1 -1
  26. data/man/bundle-config.1.txt +1 -1
  27. data/man/bundle-doctor.1 +1 -1
  28. data/man/bundle-doctor.1.txt +1 -1
  29. data/man/bundle-exec.1 +1 -1
  30. data/man/bundle-exec.1.txt +1 -1
  31. data/man/bundle-gem.1 +1 -1
  32. data/man/bundle-gem.1.txt +1 -1
  33. data/man/bundle-info.1 +1 -1
  34. data/man/bundle-info.1.txt +1 -1
  35. data/man/bundle-init.1 +1 -1
  36. data/man/bundle-init.1.txt +1 -1
  37. data/man/bundle-inject.1 +1 -1
  38. data/man/bundle-inject.1.txt +1 -1
  39. data/man/bundle-install.1 +1 -1
  40. data/man/bundle-install.1.txt +1 -1
  41. data/man/bundle-list.1 +1 -1
  42. data/man/bundle-list.1.txt +1 -1
  43. data/man/bundle-lock.1 +1 -1
  44. data/man/bundle-lock.1.txt +1 -1
  45. data/man/bundle-open.1 +1 -1
  46. data/man/bundle-open.1.txt +1 -1
  47. data/man/bundle-outdated.1 +1 -1
  48. data/man/bundle-outdated.1.txt +1 -1
  49. data/man/bundle-package.1 +1 -1
  50. data/man/bundle-package.1.txt +1 -1
  51. data/man/bundle-platform.1 +1 -1
  52. data/man/bundle-platform.1.txt +1 -1
  53. data/man/bundle-pristine.1 +1 -1
  54. data/man/bundle-pristine.1.txt +1 -1
  55. data/man/bundle-show.1 +1 -1
  56. data/man/bundle-show.1.txt +1 -1
  57. data/man/bundle-update.1 +1 -1
  58. data/man/bundle-update.1.txt +1 -1
  59. data/man/bundle-viz.1 +1 -1
  60. data/man/bundle-viz.1.txt +1 -1
  61. data/man/bundle.1 +1 -1
  62. data/man/bundle.1.txt +1 -1
  63. data/man/gemfile.5 +10 -6
  64. data/man/gemfile.5.ronn +8 -6
  65. data/man/gemfile.5.txt +124 -120
  66. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d6603948ae8baa7859049f1add82a42f4b7aa5d88b1b6d7668a2f612fefa4f0
4
- data.tar.gz: f4392924d1507711efe081176356e4c28a7e425370b18a7366fa096bb0402b8d
3
+ metadata.gz: 3e8f09b15ec720f36b02c5c1019f1be7553a19fbbedad74dc01117e36400ebef
4
+ data.tar.gz: 7784b991c1d91877448cda94e998759ccfe6537a310e6ea64a762eb76ac025ac
5
5
  SHA512:
6
- metadata.gz: c2aafdb6623c8deb7ba107a45c73d7d33a27b419aa84e955aa51b3f7541900c92e69d0a5d1f63b6056bbfdc323e7e5989f8019927a7abef5dd1f46b5e6f110dc
7
- data.tar.gz: a993c5a5f4d904011bab4a1fa02d8ddc44be4ce24ae91672e56591e651c86ffd43d23e729a2236c20df681e774c7b8e32c48936e2b510a906c19eb4c8b7486fc
6
+ metadata.gz: 2822b0401f58bcd9a7513e32b3fdc0a4b7bfe31ebf8fee9e46128b9ae9358c552622764ca2172ccc2390aaf8d2b6fddc9726207715e5c33b59e447e291c3a514
7
+ data.tar.gz: 1abdf68ab861e154efc3aa1f5d7c17520814b872663147b870208f5086cd3f1d643ac803622a7692278465cc7370d55e6805c8c8d3059191180615cc4cd5668d
@@ -1,3 +1,19 @@
1
+ ## 1.16.5 (2018-09-18)
2
+
3
+ Changes:
4
+
5
+ - Add support for TruffleRuby (@eregon)
6
+
7
+ Bugfixes:
8
+
9
+ - Avoid printing git errors when checking the version on incorrectly packaged versions of Bundler ([#6453](https://github.com/bundler/bundler/issues/6453), @greysteil)
10
+ - Fix issue where Bundler does not check the given class when comparing equality in DepProxy (@ChrisBr)
11
+ - Handle `RangeNotSatisfiable` error in Compact Index (@MaxLap)
12
+ - Check for initialized `search` variable in `LazySpecification` (@voxik)
13
+ - Fix LoadError occurring in nested bundle exec calls ([#6537](https://github.com/bundler/bundler/issues/6537), @colby-swandale)
14
+ - Check that Bundler::Deprecate is not an autoload constant ([#6163](https://github.com/bundler/bundler/issues/6163), @eregon)
15
+ - Prefer non-pre-release versions when performing a `bundle update --patch` ([#6684](https://github.com/bundler/bundler/issues/6684), @segiddins)
16
+
1
17
  ## 1.16.4 (2017-08-17)
2
18
 
3
19
  Changes:
@@ -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 = "2018-08-20".freeze
8
- @git_commit_sha = "a356d8cf9".freeze
7
+ @built_at = "2018-09-18".freeze
8
+ @git_commit_sha = "1da10a61b".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -25,7 +25,15 @@ module Bundler
25
25
 
26
26
  # The SHA for the git commit the bundler gem was built from.
27
27
  def self.git_commit_sha
28
- @git_commit_sha ||= Dir.chdir(File.expand_path("..", __FILE__)) do
28
+ return @git_commit_sha if @git_commit_sha
29
+
30
+ # If Bundler has been installed without its .git directory and without a
31
+ # commit instance variable then we can't determine its commits SHA.
32
+ git_dir = File.join(File.expand_path("../../..", __FILE__), ".git")
33
+ return "unknown" unless File.directory?(git_dir)
34
+
35
+ # Otherwise shell out to git.
36
+ @git_commit_sha = Dir.chdir(File.expand_path("..", __FILE__)) do
29
37
  `git rev-parse --short HEAD`.strip.freeze
30
38
  end
31
39
  end
@@ -89,6 +89,7 @@ module Bundler
89
89
  possibilities = [
90
90
  "#!/usr/bin/env ruby\n",
91
91
  "#!/usr/bin/env jruby\n",
92
+ "#!/usr/bin/env truffleruby\n",
92
93
  "#!#{Gem.ruby}\n",
93
94
  ]
94
95
 
@@ -32,11 +32,13 @@ module Bundler
32
32
  mswin64
33
33
  rbx
34
34
  ruby
35
+ truffleruby
35
36
  x64_mingw
36
37
  ].freeze
37
38
 
38
39
  def ruby?
39
- !mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx" || RUBY_ENGINE == "maglev")
40
+ !mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby" ||
41
+ RUBY_ENGINE == "rbx" || RUBY_ENGINE == "maglev" || RUBY_ENGINE == "truffleruby")
40
42
  end
41
43
 
42
44
  def mri?
@@ -55,6 +57,10 @@ module Bundler
55
57
  defined?(RUBY_ENGINE) && RUBY_ENGINE == "maglev"
56
58
  end
57
59
 
60
+ def truffleruby?
61
+ defined?(RUBY_ENGINE) && RUBY_ENGINE == "truffleruby"
62
+ end
63
+
58
64
  def mswin?
59
65
  Bundler::WINDOWS
60
66
  end
@@ -10,11 +10,11 @@ module Bundler
10
10
  end
11
11
 
12
12
  def hash
13
- @hash ||= dep.hash
13
+ @hash ||= [dep, __platform].hash
14
14
  end
15
15
 
16
16
  def ==(other)
17
- return if other.nil?
17
+ return false if other.class != self.class
18
18
  dep == other.dep && __platform == other.__platform
19
19
  end
20
20
 
@@ -30,6 +30,7 @@ module Bundler
30
30
  :mri_24 => Gem::Platform::RUBY,
31
31
  :mri_25 => Gem::Platform::RUBY,
32
32
  :rbx => Gem::Platform::RUBY,
33
+ :truffleruby => Gem::Platform::RUBY,
33
34
  :jruby => Gem::Platform::JAVA,
34
35
  :jruby_18 => Gem::Platform::JAVA,
35
36
  :jruby_19 => Gem::Platform::JAVA,
@@ -8,7 +8,8 @@ rescue LoadError
8
8
  end
9
9
 
10
10
  module Bundler
11
- if defined? Bundler::Deprecate
11
+ # If Bundler::Deprecate is an autoload constant, we need to define it
12
+ if defined?(Bundler::Deprecate) && !autoload?(:Deprecate)
12
13
  # nothing to do!
13
14
  elsif defined? ::Deprecate
14
15
  Deprecate = ::Deprecate
@@ -88,7 +88,7 @@ module Bundler
88
88
 
89
89
  def self.version_of(script)
90
90
  return "not installed" unless Bundler.which(script)
91
- `#{script} --version`
91
+ `#{script} --version`.chomp
92
92
  end
93
93
 
94
94
  def self.chruby_version
@@ -11,10 +11,10 @@ module Bundler
11
11
  @redirect_limit = redirect_limit
12
12
  end
13
13
 
14
- def fetch(uri, options = {}, counter = 0)
14
+ def fetch(uri, headers = {}, counter = 0)
15
15
  raise HTTPError, "Too many redirects" if counter >= redirect_limit
16
16
 
17
- response = request(uri, options)
17
+ response = request(uri, headers)
18
18
  Bundler.ui.debug("HTTP #{response.code} #{response.message} #{uri}")
19
19
 
20
20
  case response
@@ -26,7 +26,12 @@ module Bundler
26
26
  new_uri.user = uri.user
27
27
  new_uri.password = uri.password
28
28
  end
29
- fetch(new_uri, options, counter + 1)
29
+ fetch(new_uri, headers, counter + 1)
30
+ when Net::HTTPRequestedRangeNotSatisfiable
31
+ new_headers = headers.dup
32
+ new_headers.delete("Range")
33
+ new_headers["Accept-Encoding"] = "gzip"
34
+ fetch(uri, new_headers)
30
35
  when Net::HTTPRequestEntityTooLarge
31
36
  raise FallbackError, response.body
32
37
  when Net::HTTPUnauthorized
@@ -38,11 +43,11 @@ module Bundler
38
43
  end
39
44
  end
40
45
 
41
- def request(uri, options)
46
+ def request(uri, headers)
42
47
  validate_uri_scheme!(uri)
43
48
 
44
49
  Bundler.ui.debug "HTTP GET #{uri}"
45
- req = Net::HTTP::Get.new uri.request_uri, options
50
+ req = Net::HTTP::Get.new uri.request_uri, headers
46
51
  if uri.user
47
52
  user = CGI.unescape(uri.user)
48
53
  password = uri.password ? CGI.unescape(uri.password) : nil
@@ -22,6 +22,8 @@ module Bundler
22
22
  # existing in the referenced source.
23
23
  attr_accessor :strict
24
24
 
25
+ attr_accessor :prerelease_specified
26
+
25
27
  # Given a list of locked_specs and a list of gems to unlock creates a
26
28
  # GemVersionPromoter instance.
27
29
  #
@@ -37,6 +39,7 @@ module Bundler
37
39
  @locked_specs = locked_specs
38
40
  @unlock_gems = unlock_gems
39
41
  @sort_versions = {}
42
+ @prerelease_specified = {}
40
43
  end
41
44
 
42
45
  # @param value [Symbol] One of three Symbols: :major, :minor or :patch.
@@ -121,6 +124,15 @@ module Bundler
121
124
  result = spec_groups.sort do |a, b|
122
125
  @a_ver = a.version
123
126
  @b_ver = b.version
127
+
128
+ unless @prerelease_specified[@gem_name]
129
+ a_pre = @a_ver.prerelease?
130
+ b_pre = @b_ver.prerelease?
131
+
132
+ next -1 if a_pre && !b_pre
133
+ next 1 if b_pre && !a_pre
134
+ end
135
+
124
136
  if major?
125
137
  @a_ver <=> @b_ver
126
138
  elsif either_version_older_than_locked
@@ -80,7 +80,7 @@ module Bundler
80
80
  "To use the platform-specific version of the gem, run `bundle config specific_platform true` and install again."
81
81
  search = source.specs.search(self).last
82
82
  end
83
- search.dependencies = dependencies if search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification)
83
+ search.dependencies = dependencies if search && (search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification))
84
84
  search
85
85
  end
86
86
  end
@@ -42,7 +42,7 @@ module Bundler
42
42
  end
43
43
 
44
44
  def start(requirements)
45
- @prerelease_specified = {}
45
+ @gem_version_promoter.prerelease_specified = @prerelease_specified = {}
46
46
  requirements.each {|dep| @prerelease_specified[dep.name] ||= dep.prerelease? }
47
47
 
48
48
  verify_gemfile_dependencies_are_found!(requirements)
@@ -104,16 +104,17 @@ module Bundler
104
104
  index = index_for(dependency)
105
105
  results = index.search(dependency, @base[dependency.name])
106
106
 
107
- unless @prerelease_specified[dependency.name]
107
+ if vertex = @base_dg.vertex_named(dependency.name)
108
+ locked_requirement = vertex.payload.requirement
109
+ end
110
+
111
+ if !@prerelease_specified[dependency.name] && (!@use_gvp || locked_requirement.nil?)
108
112
  # Move prereleases to the beginning of the list, so they're considered
109
113
  # last during resolution.
110
114
  pre, results = results.partition {|spec| spec.version.prerelease? }
111
115
  results = pre + results
112
116
  end
113
117
 
114
- if vertex = @base_dg.vertex_named(dependency.name)
115
- locked_requirement = vertex.payload.requirement
116
- end
117
118
  spec_groups = if results.any?
118
119
  nested = []
119
120
  results.each do |spec|
@@ -118,7 +118,7 @@ module Bundler
118
118
  when "jruby"
119
119
  JRUBY_VERSION.dup
120
120
  else
121
- raise BundlerError, "RUBY_ENGINE value #{RUBY_ENGINE} is not recognized"
121
+ RUBY_ENGINE_VERSION.dup
122
122
  end
123
123
  patchlevel = RUBY_PATCHLEVEL.to_s
124
124
 
@@ -293,7 +293,12 @@ module Bundler
293
293
 
294
294
  def set_bundle_variables
295
295
  begin
296
- Bundler::SharedHelpers.set_env "BUNDLE_BIN_PATH", Bundler.rubygems.bin_path("bundler", "bundle", VERSION)
296
+ exe_file = Bundler.rubygems.bin_path("bundler", "bundle", VERSION)
297
+ unless File.exist?(exe_file)
298
+ exe_file = File.expand_path("../../../exe/bundle", __FILE__)
299
+ end
300
+
301
+ Bundler::SharedHelpers.set_env "BUNDLE_BIN_PATH", exe_file
297
302
  rescue Gem::GemNotFoundException
298
303
  Bundler::SharedHelpers.set_env "BUNDLE_BIN_PATH", File.expand_path("../../../exe/bundle", __FILE__)
299
304
  end
@@ -7,7 +7,7 @@ module Bundler
7
7
  # We're doing this because we might write tests that deal
8
8
  # with other versions of bundler and we are unsure how to
9
9
  # handle this better.
10
- VERSION = "1.16.4" unless defined?(::Bundler::VERSION)
10
+ VERSION = "1.16.5" unless defined?(::Bundler::VERSION)
11
11
 
12
12
  def self.overwrite_loaded_gem_version
13
13
  begin
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-ADD" "1" "August 2018" "" ""
4
+ .TH "BUNDLE\-ADD" "1" "September 2018" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
@@ -37,4 +37,4 @@ OPTIONS
37
37
 
38
38
 
39
39
 
40
- August 2018 BUNDLE-ADD(1)
40
+ September 2018 BUNDLE-ADD(1)
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-BINSTUBS" "1" "August 2018" "" ""
4
+ .TH "BUNDLE\-BINSTUBS" "1" "September 2018" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
@@ -45,4 +45,4 @@ BUNDLE INSTALL --BINSTUBS
45
45
 
46
46
 
47
47
 
48
- August 2018 BUNDLE-BINSTUBS(1)
48
+ September 2018 BUNDLE-BINSTUBS(1)
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-CHECK" "1" "August 2018" "" ""
4
+ .TH "BUNDLE\-CHECK" "1" "September 2018" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
@@ -30,4 +30,4 @@ OPTIONS
30
30
 
31
31
 
32
32
 
33
- August 2018 BUNDLE-CHECK(1)
33
+ September 2018 BUNDLE-CHECK(1)
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-CLEAN" "1" "August 2018" "" ""
4
+ .TH "BUNDLE\-CLEAN" "1" "September 2018" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
@@ -23,4 +23,4 @@ OPTIONS
23
23
 
24
24
 
25
25
 
26
- August 2018 BUNDLE-CLEAN(1)
26
+ September 2018 BUNDLE-CLEAN(1)
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-CONFIG" "1" "August 2018" "" ""
4
+ .TH "BUNDLE\-CONFIG" "1" "September 2018" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-config\fR \- Set bundler configuration options
@@ -498,4 +498,4 @@ CREDENTIALS FOR GEM SOURCES
498
498
 
499
499
 
500
500
 
501
- August 2018 BUNDLE-CONFIG(1)
501
+ September 2018 BUNDLE-CONFIG(1)
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-DOCTOR" "1" "August 2018" "" ""
4
+ .TH "BUNDLE\-DOCTOR" "1" "September 2018" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-doctor\fR \- Checks the bundle for common problems
@@ -41,4 +41,4 @@ OPTIONS
41
41
 
42
42
 
43
43
 
44
- August 2018 BUNDLE-DOCTOR(1)
44
+ September 2018 BUNDLE-DOCTOR(1)
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-EXEC" "1" "August 2018" "" ""
4
+ .TH "BUNDLE\-EXEC" "1" "September 2018" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-exec\fR \- Execute a command in the context of the bundle
@@ -175,4 +175,4 @@ RUBYGEMS PLUGINS
175
175
 
176
176
 
177
177
 
178
- August 2018 BUNDLE-EXEC(1)
178
+ September 2018 BUNDLE-EXEC(1)
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-GEM" "1" "August 2018" "" ""
4
+ .TH "BUNDLE\-GEM" "1" "September 2018" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
@@ -88,4 +88,4 @@ SEE ALSO
88
88
 
89
89
 
90
90
 
91
- August 2018 BUNDLE-GEM(1)
91
+ September 2018 BUNDLE-GEM(1)
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-INFO" "1" "August 2018" "" ""
4
+ .TH "BUNDLE\-INFO" "1" "September 2018" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-info\fR \- Show information for the given gem in your bundle
@@ -18,4 +18,4 @@ OPTIONS
18
18
 
19
19
 
20
20
 
21
- August 2018 BUNDLE-INFO(1)
21
+ September 2018 BUNDLE-INFO(1)
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-INIT" "1" "August 2018" "" ""
4
+ .TH "BUNDLE\-INIT" "1" "September 2018" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-init\fR \- Generates a Gemfile into the current working directory