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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 289438b42b2dfd42062c109ba4cad7052e006ba8
4
- data.tar.gz: 3c9c82ad37cf3f2a01bb54706873b7ccc93bd3aa
3
+ metadata.gz: dc44c461c8f9bc4707f98cbdaed5c73d34cb855a
4
+ data.tar.gz: 641a72010573c501be1be0c166c659be3884d044
5
5
  SHA512:
6
- metadata.gz: 24b764d06d7ac98aaf95b9b22e80e7789b3b3b381b31260faa37aa1610cbc1c88d95f4fcab71664a212ece2cd0fa40136caca4c844ecab2d90ad32f1167fa0ac
7
- data.tar.gz: 981cfd985560bb5cf1b5a97cfe8a831296f62bd454aaf9830b9813d90315246c1fd1ca5f2d953577c721971b121974092ab7922191bdda543e9b178ed7d4f583
6
+ metadata.gz: 74fd9a2352ebcee3c06c959f007ac5399f8e26096117b72adcdbecce80f15aa385fc98f772fe2b18a05364e8131aa682efed8310c089c81184db01562c331298
7
+ data.tar.gz: f9181d3899f38966abf5aa043dce64507038ce34f5ec5a926b92b0bbc04288c972c70ef3e348b59e0c6b4f19df32b3d017c0a15ba32c57ba99e2d524cd2dceff
@@ -15,4 +15,5 @@ deploy:
15
15
  gem: azure-core
16
16
  on:
17
17
  tags: true
18
+ condition: "$TRAVIS_RUBY_VERSION == 2.3.0"
18
19
  repo: Azure/azure-ruby-asm-core
@@ -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
@@ -18,7 +18,7 @@ module Azure
18
18
  class Version
19
19
  MAJOR = 0 unless defined? MAJOR
20
20
  MINOR = 1 unless defined? MINOR
21
- UPDATE = 8 unless defined? UPDATE
21
+ UPDATE = 9 unless defined? UPDATE
22
22
  PRE = nil unless defined? PRE
23
23
 
24
24
  class << self
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.8
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-04-17 00:00:00.000000000 Z
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