bundler 1.12.3 → 1.12.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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c15aaa11ff788fac27d745977d65c170a91071b
4
- data.tar.gz: eb9e4cb055efa20be455f6c537c6ffcf4678adbe
3
+ metadata.gz: 2b5433fc9cc8573aa85b617097a9c959a633b4fc
4
+ data.tar.gz: 53fe7741d85bcc26b81211e9b51ab6056e907f3e
5
5
  SHA512:
6
- metadata.gz: 9c3435f9a2b65a9ad4d04b4ca7138186792189579de8cc5adc9656ae07e044adbb84ad7f2ad4c29f1b270435afd9c65fc08e00949abcc6b9f591eebd4ae3b2e7
7
- data.tar.gz: 685ea90c4ad254f3637e155658d9a3f54fa618f06c73854d0752619b36286b772a1c80e727b9c0670e8c9afcb535d49caa982b00c2a35501052fd102433311bd
6
+ metadata.gz: e738d624fbd192e6d6fd01ac413675e5e15e3f514618530bf36451798ee4798e73f6dd5f5b1b5b7acf151cc5326ec4c0f828424914d209d36d351b31d356cd8f
7
+ data.tar.gz: 11996eed9e6045a19e039044e151bdb010b013c697d8abbdef9d6d3cd5157e2c70de3087c130617f5bdee95f53243459e3ea83053c401055a706542b61d0e789
@@ -1,3 +1,11 @@
1
+ ## 1.12.4 (2016-05-16)
2
+
3
+ Bugfixes:
4
+ - ensure concurrent use of the new index can't corrupt the cache (#4519, @domcleal)
5
+ - allow missing rubygems credentials when pushing a gem with a custom host (#4437, @Cohen-Carlisle)
6
+ - fix installing built-in specs with `--standalone` (#4557, @segiddins)
7
+ - fix `bundle show` when a gem has a prerelease version that includes a `-` (#4385, @segiddins)
8
+
1
9
  ## 1.12.3 (2016-05-06)
2
10
 
3
11
  Bugfixes:
@@ -92,15 +92,15 @@ module Bundler
92
92
  protected
93
93
 
94
94
  def rubygem_push(path)
95
- unless Pathname.new("~/.gem/credentials").expand_path.file?
96
- raise "Your rubygems.org credentials aren't set. Run `gem push` to set them."
97
- end
98
95
  allowed_push_host = nil
99
96
  gem_command = "gem push '#{path}'"
100
97
  if @gemspec.respond_to?(:metadata)
101
98
  allowed_push_host = @gemspec.metadata["allowed_push_host"]
102
99
  gem_command += " --host #{allowed_push_host}" if allowed_push_host
103
100
  end
101
+ unless allowed_push_host || Pathname.new("~/.gem/credentials").expand_path.file?
102
+ raise "Your rubygems.org credentials aren't set. Run `gem push` to set them."
103
+ end
104
104
  sh(gem_command)
105
105
  Bundler.ui.confirm "Pushed #{name} #{version} to #{allowed_push_host ? allowed_push_host : "rubygems.org."}"
106
106
  end
@@ -89,7 +89,7 @@ module Bundler
89
89
  alias_method :[], :search
90
90
 
91
91
  def <<(spec)
92
- @specs[spec.name]["#{spec.version}-#{spec.platform}"] = spec
92
+ @specs[spec.name][spec.full_name] = spec
93
93
 
94
94
  spec
95
95
  end
@@ -175,7 +175,7 @@ module Bundler
175
175
  end
176
176
 
177
177
  def search_by_spec(spec)
178
- spec = @specs[spec.name]["#{spec.version}-#{spec.platform}"]
178
+ spec = @specs[spec.name][spec.full_name]
179
179
  spec ? [spec] : []
180
180
  end
181
181
 
@@ -25,7 +25,7 @@ module Bundler
25
25
  @ref = options["ref"] || options["branch"] || options["tag"] || "master"
26
26
  @submodules = options["submodules"]
27
27
  @name = options["name"]
28
- @version = options["version"]
28
+ @version = options["version"].to_s.strip.gsub("-", ".pre.")
29
29
 
30
30
  @copied = false
31
31
  @local = false
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
+ require "fileutils"
2
3
  require "stringio"
4
+ require "tmpdir"
3
5
  require "zlib"
4
6
 
5
7
  class Bundler::CompactIndexClient
@@ -24,33 +26,41 @@ class Bundler::CompactIndexClient
24
26
  def update(local_path, remote_path, retrying = nil)
25
27
  headers = {}
26
28
 
27
- if local_path.file?
28
- headers["If-None-Match"] = etag_for(local_path)
29
- headers["Range"] = "bytes=#{local_path.size}-"
30
- else
31
- # Fastly ignores Range when Accept-Encoding: gzip is set
32
- headers["Accept-Encoding"] = "gzip"
33
- end
29
+ Dir.mktmpdir(local_path.basename.to_s, local_path.dirname) do |local_temp_dir|
30
+ local_temp_path = Pathname.new(local_temp_dir).join(local_path.basename)
34
31
 
35
- response = @fetcher.call(remote_path, headers)
36
- return if response.is_a?(Net::HTTPNotModified)
32
+ # download new file if retrying
33
+ if retrying.nil? && local_path.file?
34
+ FileUtils.cp local_path, local_temp_path
35
+ headers["If-None-Match"] = etag_for(local_temp_path)
36
+ headers["Range"] = "bytes=#{local_temp_path.size}-"
37
+ else
38
+ # Fastly ignores Range when Accept-Encoding: gzip is set
39
+ headers["Accept-Encoding"] = "gzip"
40
+ end
37
41
 
38
- content = response.body
39
- if response["Content-Encoding"] == "gzip"
40
- content = Zlib::GzipReader.new(StringIO.new(content)).read
41
- end
42
+ response = @fetcher.call(remote_path, headers)
43
+ return if response.is_a?(Net::HTTPNotModified)
44
+
45
+ content = response.body
46
+ if response["Content-Encoding"] == "gzip"
47
+ content = Zlib::GzipReader.new(StringIO.new(content)).read
48
+ end
42
49
 
43
- mode = response.is_a?(Net::HTTPPartialContent) ? "a" : "w"
44
- local_path.open(mode) {|f| f << content }
50
+ mode = response.is_a?(Net::HTTPPartialContent) ? "a" : "w"
51
+ local_temp_path.open(mode) {|f| f << content }
45
52
 
46
- response_etag = response["ETag"]
47
- return if etag_for(local_path) == response_etag
53
+ response_etag = response["ETag"]
54
+ if etag_for(local_temp_path) == response_etag
55
+ FileUtils.mv(local_temp_path, local_path)
56
+ return
57
+ end
48
58
 
49
- if retrying.nil?
50
- local_path.delete
51
- update(local_path, remote_path, :retrying)
52
- else
53
- raise MisMatchedChecksumError.new(remote_path, response_etag, etag_for(local_path))
59
+ if retrying.nil?
60
+ update(local_path, remote_path, :retrying)
61
+ else
62
+ raise MisMatchedChecksumError.new(remote_path, response_etag, etag_for(local_temp_path))
63
+ end
54
64
  end
55
65
  end
56
66
 
@@ -7,5 +7,5 @@ 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.12.3" unless defined?(::Bundler::VERSION)
10
+ VERSION = "1.12.4" unless defined?(::Bundler::VERSION)
11
11
  end
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: 1.12.3
4
+ version: 1.12.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Arko
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2016-05-06 00:00:00.000000000 Z
14
+ date: 2016-05-16 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: automatiek