artifactory 2.0.0 → 2.1.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 096468dc3e965e5a8eccdbc3c0e70e56db2f3e13
4
- data.tar.gz: a301449af639917f992d38e3ced4d7215d32612d
3
+ metadata.gz: c58b27e404ab5b0cf35d0149b39b0d9ae686c164
4
+ data.tar.gz: 1a30c31b530c2515545cbe8750c539aa766e0edf
5
5
  SHA512:
6
- metadata.gz: f91a4477e6b82e3f2728de0ad4872269e77696e6dbc9195ec4900c27173021a0805ced4da035d8edda721e82ab81f09156616b15208d8d0df860b6fc80aee583
7
- data.tar.gz: 4a3eaac28598ff0aee2936795f231b7e2549921131967f4448037ac36021ef595a98aba69ea4c2356b0027cdb9c1811dea7fa865815b77d81a7f671b9a7aa106
6
+ metadata.gz: dae25695725bbaa608a641addbe029a80139ea3c2e0b8d468e059fe0f7826d0b5519934e3cc2f95ac5941f99cc51d8b3d7bf66b57501bfce60fe6c9f99563aa6
7
+ data.tar.gz: fcc812bcc77dfa1bff3b5e0984b3f6b4b5d2d609d169d770ece94256bed9a4f0069212a4881b4e6c4343ed49a6f43749f0a82bf71ebc15e557f3d18698d3f955
data/CHANGELOG.md CHANGED
@@ -3,6 +3,11 @@ Artifactory Client CHANGELOG
3
3
  This file is used to document the changes between releases of the Artifactory
4
4
  Ruby client.
5
5
 
6
+ v2.1.0 (08-21-2014)
7
+ -------------------
8
+ - Add `Content-Size` header
9
+ - Expose `read_timeout` as a configurable (defaulting to 120 seconds)
10
+
6
11
  v2.0.0 (07-15-2014)
7
12
  -------------------
8
13
  **Breaking Changes**
@@ -180,7 +180,7 @@ module Artifactory
180
180
  # Setup PATCH/POST/PUT
181
181
  if [:patch, :post, :put].include?(verb)
182
182
  if data.respond_to?(:read)
183
- request.add_field('Transfer-Encoding', 'chunked')
183
+ request.content_length = data.size
184
184
  request.body_stream = data
185
185
  elsif data.is_a?(Hash)
186
186
  request.form_data = data
@@ -195,6 +195,11 @@ module Artifactory
195
195
  connection = Net::HTTP.new(uri.host, uri.port,
196
196
  proxy_address, proxy_port, proxy_username, proxy_password)
197
197
 
198
+ # The artifacts being uploaded might be large, so there’s a good chance
199
+ # we'll need to bump this higher than the `Net::HTTP` default of 60
200
+ # seconds.
201
+ connection.read_timeout = read_timeout
202
+
198
203
  # Apply SSL, if applicable
199
204
  if uri.scheme == 'https'
200
205
  require 'net/https' unless defined?(Net::HTTPS)
@@ -22,6 +22,7 @@ module Artifactory
22
22
  :ssl_pem_file,
23
23
  :ssl_verify,
24
24
  :user_agent,
25
+ :read_timeout,
25
26
  ]
26
27
  end
27
28
  end
@@ -111,6 +111,15 @@ module Artifactory
111
111
  %w[t y].include?(ENV['ARTIFACTORY_SSL_VERIFY'].downcase[0])
112
112
  end
113
113
  end
114
+
115
+ #
116
+ # Number of seconds to wait for a response from Artifactory
117
+ #
118
+ # @return [Integer, nil]
119
+ #
120
+ def read_timeout
121
+ ENV['ARTIFACTORY_READ_TIMEOUT'] || 120
122
+ end
114
123
  end
115
124
  end
116
125
  end
@@ -1,3 +1,3 @@
1
1
  module Artifactory
2
- VERSION = '2.0.0'
2
+ VERSION = '2.1.0'
3
3
  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: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Vargo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-15 00:00:00.000000000 Z
11
+ date: 2014-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler