http 0.9.3 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6d0fc648f6ef248aefe945523640200d4f0f77d2
4
- data.tar.gz: e84a46fc898596c653dada5f8d8bcf82c5cc0eba
3
+ metadata.gz: 2cf4cc1f50d48b38982e5b7d22cce064944076ca
4
+ data.tar.gz: c3528a21ae58c9ea4ce9e8ea6c8c29c8160c74e1
5
5
  SHA512:
6
- metadata.gz: cc8fa5eee19489bfcaa40a046e5699a8f7a99c439223041025348c30bc1e23ba1524692a17dc4d25ba6c1632a0df8923fb0e3f31908c4bdf226660a134ff67d1
7
- data.tar.gz: 225d15b4e50168746f890d08be499a19ecdf39dc41e111e7471e720f8494d2f3eb305d50dcf1a5fe0f735a165168a53e927402ef4176ebe757780452c8fda334
6
+ metadata.gz: 3fbfc83dc70d26f03ceefba22ffed7ad9a235c4811dc05342c0f51d1c968af020f990bc31d8dc713659a1cd952350169a25f575695e684cc7b1242ab5394f186
7
+ data.tar.gz: 631b31981f832f3c22bf6c175345cf68d7a9c0fdac2cb8477c28ba0547bffe0e7dac4218dbdf83242132deb54a867d9d7637a1483ec39107569fa0f0af393aec
data/CHANGES.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.9.4 (2015-08-26)
2
+
3
+ * Fixes regression when body streaming was failing on some URIs.
4
+ See #246. (@zanker)
5
+ * Fixes require timeout statements. See #243. (@ixti)
6
+
7
+
1
8
  ## 0.9.3 (2015-08-19)
2
9
 
3
10
  * Fixed request URI normalization. See #246. (@ixti)
@@ -1,3 +1,7 @@
1
+ require "timeout"
2
+
3
+ require "http/timeout/per_operation"
4
+
1
5
  module HTTP
2
6
  module Timeout
3
7
  class Global < PerOperation
@@ -39,6 +39,8 @@ module HTTP
39
39
  # Read from the socket
40
40
  def readpartial(size)
41
41
  @socket.readpartial(size)
42
+ rescue EOFError
43
+ :eof
42
44
  end
43
45
 
44
46
  # Write to the socket
@@ -1,3 +1,7 @@
1
+ require "timeout"
2
+
3
+ require "http/timeout/null"
4
+
1
5
  module HTTP
2
6
  module Timeout
3
7
  class PerOperation < Null
@@ -1,3 +1,3 @@
1
1
  module HTTP
2
- VERSION = "0.9.3".freeze
2
+ VERSION = "0.9.4".freeze
3
3
  end
@@ -1,3 +1,5 @@
1
+ # coding: utf-8
2
+
1
3
  RSpec.describe HTTP::Request do
2
4
  let(:proxy) { {} }
3
5
  let(:headers) { {:accept => "text/html"} }
@@ -0,0 +1,15 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe "Regression testing" do
4
+ describe "#248" do
5
+ it "does not fails with github" do
6
+ github_uri = "http://github.com/"
7
+ expect { HTTP.get(github_uri).to_s }.not_to raise_error
8
+ end
9
+
10
+ it "does not failes ith googleapis" do
11
+ google_uri = "https://www.googleapis.com/oauth2/v1/userinfo?alt=json"
12
+ expect { HTTP.get(google_uri).to_s }.not_to raise_error
13
+ end
14
+ end
15
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Arcieri
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-08-19 00:00:00.000000000 Z
14
+ date: 2015-08-25 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: http_parser.rb
@@ -152,6 +152,7 @@ files:
152
152
  - spec/lib/http/response/status_spec.rb
153
153
  - spec/lib/http/response_spec.rb
154
154
  - spec/lib/http_spec.rb
155
+ - spec/regression_specs.rb
155
156
  - spec/spec_helper.rb
156
157
  - spec/support/black_hole.rb
157
158
  - spec/support/capture_warning.rb