async-http 0.27.0 → 0.27.1

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
  SHA256:
3
- metadata.gz: 46c2f19cb8438e19ef4b02d5a35dc2916c316119682cd022d3eda40f8a0acf55
4
- data.tar.gz: 6d9c903d8337af465cb0ce824fada879e83e90063cf8ebf2f99445c4e330b01e
3
+ metadata.gz: 29e7c425f733a4ca0835844e9348f012847766a876edaeda46bb6cda9bcb75e3
4
+ data.tar.gz: 988f79cdd1b7b30c9864f1d7f41a393fc19e6ddbcec4cc66bdd4273ac288c1db
5
5
  SHA512:
6
- metadata.gz: ae20e6866313108201bcf25af615131296725836d9bc94b7d816b00abd1416d7ffe098d2614df8c9d285b3bddce965fee0b0cfe9867f1d09b8ef4f4ca517ba8c
7
- data.tar.gz: 2c9087a2300ecfed16f8a7977e549511ede35fc83eb283b4f9939219bac7e5f04640bcfe0d061780c1579f5e007eb7e545ac8c2c79504af5efae98e41408b56a
6
+ metadata.gz: 1a663c0840a0af98cba9fb9f50cbcd912255c0b1674a0d1ba576594f9a0c728a4d78ee435df8badc800253991cd66119f6b5c142c90de76408811e56661be91f
7
+ data.tar.gz: 3fc0c94c16edfd99a31b120757bd5e8f67d9d7ef5a2902ef07e3649af2e5e28e394d589f3ce1d6d39cefa7019b40c549c86a2f5dc26c6e212ebb91b5f8f91462
@@ -37,6 +37,8 @@ module Async
37
37
  if response and response.body
38
38
  response.body = Body::Statistics.new(@start_time, response.body, block)
39
39
  end
40
+
41
+ return response
40
42
  end
41
43
  end
42
44
 
@@ -46,7 +48,7 @@ module Async
46
48
  def initialize(start_time, body, callback)
47
49
  super(body)
48
50
 
49
- @length = 0
51
+ @sent = 0
50
52
 
51
53
  @start_time = start_time
52
54
  @first_chunk_time = nil
@@ -59,7 +61,7 @@ module Async
59
61
  attr :first_chunk_time
60
62
  attr :end_time
61
63
 
62
- attr :length
64
+ attr :sent
63
65
 
64
66
  def total_duration
65
67
  if @end_time
@@ -85,7 +87,7 @@ module Async
85
87
  @first_chunk_time ||= Clock.now
86
88
 
87
89
  if chunk
88
- @length += chunk.length
90
+ @sent += chunk.length
89
91
  else
90
92
  complete_statistics
91
93
  end
@@ -94,7 +96,7 @@ module Async
94
96
  end
95
97
 
96
98
  def to_s
97
- parts = ["sent #{@length} bytes"]
99
+ parts = ["sent #{@sent} bytes"]
98
100
 
99
101
  if duration = self.total_duration
100
102
  parts << "took #{format_duration(duration)} in total"
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Async
22
22
  module HTTP
23
- VERSION = "0.27.0"
23
+ VERSION = "0.27.1"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.0
4
+ version: 0.27.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams