artifactory 3.0.12 → 3.0.15

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: 9f2ac1ef78888d5d68cd444274bfdc534226285b1680c3dbd5051e588a7e782c
4
- data.tar.gz: 73dd6f6671ed821caf2bb0a2d209011848d62f7a2b29377d32b0b28ae672cf70
3
+ metadata.gz: b25bc5d80ff1f446765041dfa18c8124632de6d74c99757b968ee599afb687f5
4
+ data.tar.gz: 872377830c2c226593aa01dd98bcd9a9ed077a1fc987ac014056e976f64db7b6
5
5
  SHA512:
6
- metadata.gz: 547a6b02af33b3c6ae0dcef9f696bda622664256953963a93537075c84f5951eadc0191465598608a79ba7c4efe0441d03eb92e918df1812c70edc854bc83621
7
- data.tar.gz: 0ef42dcf24579618c86fd7e8512021e4eef5c16cdc4dcef65116da36cab77403dc704b927708783c42ee8261975dce7dd14522b95db4f8dfc25fff2ec8c99989
6
+ metadata.gz: 64e08e305ffadc57955be2aa5ec362e3c79dfb425af8180d3d9560db573cef1a4f5b0f0d1fd49f8e3e173cb4ce7ef8f58eec53290e5a170a98bfec9469f5919d
7
+ data.tar.gz: 82474417dff7e81ae2c1c26029d5c91c780c1275201ac1d2a96bfda419c3314cf0ceb577284fc1c059a4a8f4c474337c6565d64def6f1d4e60cee478390930b0
@@ -258,8 +258,16 @@ module Artifactory
258
258
 
259
259
  if block_given?
260
260
  http.request(request) do |response|
261
- response.read_body do |chunk|
262
- yield chunk
261
+ case response
262
+ when Net::HTTPRedirection
263
+ redirect = response["location"]
264
+ request(verb, redirect, data, headers, &block)
265
+ when Net::HTTPSuccess
266
+ response.read_body do |chunk|
267
+ yield chunk
268
+ end
269
+ else
270
+ error(response)
263
271
  end
264
272
  end
265
273
  else
@@ -243,7 +243,15 @@ module Artifactory
243
243
  # the URL-safe version of the string
244
244
  #
245
245
  def url_safe(value)
246
- URI.escape(URI.unescape(value.to_s))
246
+ uri_parser.escape(uri_parser.unescape(value.to_s))
247
+ end
248
+
249
+ #
250
+ # Generate a URI parser
251
+ #
252
+ # @return [URI::Parser]
253
+ def uri_parser
254
+ @uri_parser ||= URI::Parser.new
247
255
  end
248
256
  end
249
257
 
@@ -353,8 +361,8 @@ module Artifactory
353
361
  #
354
362
  def to_query_string_parameters(hash = {})
355
363
  properties = hash.map do |k, v|
356
- key = URI.escape(k.to_s)
357
- value = URI.escape(v.to_s)
364
+ key = self.class.uri_parser.escape(k.to_s)
365
+ value = self.class.uri_parser.escape(v.to_s)
358
366
 
359
367
  "#{key}=#{value}"
360
368
  end
@@ -15,5 +15,5 @@
15
15
  #
16
16
 
17
17
  module Artifactory
18
- VERSION = "3.0.12".freeze
18
+ VERSION = "3.0.15".freeze
19
19
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: artifactory
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.12
4
+ version: 3.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef Release Engineering Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-31 00:00:00.000000000 Z
11
+ date: 2020-05-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A Ruby client for Artifactory
14
14
  email: releng@chef.io