azure-core 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/ChangeLog.md +3 -0
- data/lib/azure/core/http/http_request.rb +10 -1
- data/lib/azure/core/version.rb +1 -1
- data/test/fixtures/files/test.png +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc44c461c8f9bc4707f98cbdaed5c73d34cb855a
|
4
|
+
data.tar.gz: 641a72010573c501be1be0c166c659be3884d044
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74fd9a2352ebcee3c06c959f007ac5399f8e26096117b72adcdbecce80f15aa385fc98f772fe2b18a05364e8131aa682efed8310c089c81184db01562c331298
|
7
|
+
data.tar.gz: f9181d3899f38966abf5aa043dce64507038ce34f5ec5a926b92b0bbc04288c972c70ef3e348b59e0c6b4f19df32b3d017c0a15ba32c57ba99e2d524cd2dceff
|
data/.travis.yml
CHANGED
data/ChangeLog.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
# 2017.08.01 - azure-core gem @version 0.1.9
|
2
|
+
* Added support for StringIO inside body headers. [#39](https://github.com/Azure/azure-ruby-asm-core/pull/39)
|
3
|
+
|
1
4
|
# 2017.04.17 - azure-core gem @version 0.1.8
|
2
5
|
* Fixed rubocop scanned out issue. [#31](https://github.com/Azure/azure-ruby-asm-core/pull/31)
|
3
6
|
* Code changes to install nokogiri based on the ruby version. [#35](https://github.com/Azure/azure-ruby-asm-core/pull/35)
|
@@ -155,6 +155,16 @@ module Azure
|
|
155
155
|
if IO === body
|
156
156
|
headers['Content-Length'] = body.size.to_s
|
157
157
|
headers['Content-MD5'] = Digest::MD5.file(body.path).base64digest unless headers['Content-MD5']
|
158
|
+
elsif StringIO === body
|
159
|
+
headers['Content-Length'] = body.size.to_s
|
160
|
+
unless headers['Content-MD5']
|
161
|
+
headers['Content-MD5'] = Digest::MD5.new.tap do |checksum|
|
162
|
+
while chunk = body.read(5242880)
|
163
|
+
checksum << chunk
|
164
|
+
end
|
165
|
+
body.rewind
|
166
|
+
end.base64digest
|
167
|
+
end
|
158
168
|
else
|
159
169
|
headers['Content-Length'] = body.bytesize.to_s
|
160
170
|
headers['Content-MD5'] = Base64.strict_encode64(Digest::MD5.digest(body)) unless headers['Content-MD5']
|
@@ -163,7 +173,6 @@ module Azure
|
|
163
173
|
headers['Content-Length'] = '0'
|
164
174
|
end
|
165
175
|
end
|
166
|
-
|
167
176
|
end
|
168
177
|
end
|
169
178
|
end
|
data/lib/azure/core/version.rb
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azure-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Microsoft Corporation
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-08-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -184,6 +184,7 @@ files:
|
|
184
184
|
- lib/azure/core/utility.rb
|
185
185
|
- lib/azure/core/version.rb
|
186
186
|
- lib/azure/http_response_helper.rb
|
187
|
+
- test/fixtures/files/test.png
|
187
188
|
- test/fixtures/http_error.xml
|
188
189
|
- test/fixtures/http_invalid_header.xml
|
189
190
|
- test/support/fixtures.rb
|