pebblebed 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pebblebed/http.rb +8 -3
- data/lib/pebblebed/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d39040379314a240c9514dffa13b4d3088aec34d
|
4
|
+
data.tar.gz: 1b84342fa8004cdfdcbacafe4412deb60cd127ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26e70eea47bff69cb1903a03dc964cd23d5ea04e1bb2e72a2d48b16a1e922fef939c17ab8f0f49eac0d8a12b30ad53c689e2e14464d5b24da291cb0d445e5978
|
7
|
+
data.tar.gz: 534d4a10daaa68f4120db373032f269fb33602baae5d3aa0b1caea6fddb64d60dc437f3f95d8a9131a80bfb9ca1ee07593feaf109d9cbf7bd21d0898b0fdde26
|
data/lib/pebblebed/http.rb
CHANGED
@@ -240,7 +240,7 @@ module Pebblebed
|
|
240
240
|
end
|
241
241
|
|
242
242
|
def self.do_request(url, idempotent: true, &block)
|
243
|
-
with_connection(url) { |connection|
|
243
|
+
with_connection(url, idempotent) { |connection|
|
244
244
|
begin
|
245
245
|
request = block.call(connection)
|
246
246
|
response = Response.new(url, request.status, request.body)
|
@@ -262,8 +262,13 @@ module Pebblebed
|
|
262
262
|
}
|
263
263
|
end
|
264
264
|
|
265
|
-
def self.with_connection(url, &block)
|
266
|
-
connection = self.current_connection(url)
|
265
|
+
def self.with_connection(url, idempotent, &block)
|
266
|
+
connection = self.current_connection(url)
|
267
|
+
if connection
|
268
|
+
connection.reset unless idempotent
|
269
|
+
else
|
270
|
+
connection = new_connection(url)
|
271
|
+
end
|
267
272
|
self.current_connection={:url => url, :connection => connection}
|
268
273
|
yield connection
|
269
274
|
end
|
data/lib/pebblebed/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pebblebed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katrina Owen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-03
|
12
|
+
date: 2018-04-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|