swift_client 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/swift_client.rb CHANGED
@@ -167,12 +167,14 @@ class SwiftClient
167
167
  headers["X-Auth-Token"] = auth_token
168
168
  headers["Accept"] = "application/json"
169
169
 
170
+ stream_pos = opts[:body_stream].pos if opts[:body_stream]
171
+
170
172
  response = HTTParty.send(method, "#{storage_url}#{path}", opts.merge(:headers => headers))
171
173
 
172
174
  if response.code == 401
173
175
  authenticate
174
176
 
175
- opts[:body_stream].rewind if opts[:body_stream].respond_to?(:rewind)
177
+ opts[:body_stream].pos = stream_pos if opts[:body_stream]
176
178
 
177
179
  return request(method, path, opts)
178
180
  end
@@ -1,5 +1,5 @@
1
1
 
2
2
  class SwiftClient
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swift_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: