async-http 0.17.0 → 0.17.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: 5e36c2e4c547a2fab5f4080479acd7fd4964194ded2bf10b0e1f596f0cedcbe0
4
- data.tar.gz: 0eb2ced279e0fa57db73b4bdc4fb8a450cc1440b95dd96a0c694d804bb11a45c
3
+ metadata.gz: 2a529cc7156fef7700b2d40a03ae88512fe7ad34efcba524a17a23c5bc4bead5
4
+ data.tar.gz: 06e805dcf6fb6dacf9f00317238026f1faa97c7dbe294f22111cf1e333d6c827
5
5
  SHA512:
6
- metadata.gz: 5f703f9ca20ef9a7c9675251f65575b0004de8e9757f2542167aaf330b6796522d5dcee0b219ffb528e388aee6970ae34aad18985d31f2e14821160d699245fc
7
- data.tar.gz: ccf65ec4786912ec2636ad8c5ad13cac4e09c1b439c51c8b4efa342a11f03d4a7a78d807402fe608ad67a42d625b19a27a9d941e3f9c079c5d1c9a839c080783
6
+ metadata.gz: 153939bf31fb232c81681feed848f0f6cf10656609f2755006297a8ff6bb93c7646aa3cfc5f489a680d2c29370fa4069d4de472a7e0860a3b7a932cf60a47c5a
7
+ data.tar.gz: da73399d0615db7aaf78fc008e914819b6da85b79c8d25d521ef2d7c756895bdbca4506754344979493e14a53fd95cdb7bec34ce4d332951508ac8d9a711fa7f
data/README.md CHANGED
@@ -31,11 +31,14 @@ Or install it yourself as:
31
31
  Here is a basic example of a client/server running in the same reactor:
32
32
 
33
33
  ```ruby
34
+ #!/usr/bin/env ruby
35
+
34
36
  require 'async/http/server'
35
37
  require 'async/http/client'
36
38
  require 'async/reactor'
39
+ require 'async/http/url_endpoint'
37
40
 
38
- endpoint = Async::IO::Endpoint.tcp('127.0.0.1', 9294, reuse_port: true)
41
+ endpoint = Async::HTTP::URLEndpoint.parse('http://127.0.0.1:9294', reuse_port: true)
39
42
 
40
43
  class Server < Async::HTTP::Server
41
44
  def handle_request(request, peer, address)
@@ -52,7 +55,7 @@ Async::Reactor.run do |task|
52
55
  end
53
56
 
54
57
  response = client.get("/", {})
55
- puts response.body
58
+ puts response.read
56
59
 
57
60
  server_task.stop
58
61
  end
data/Rakefile CHANGED
@@ -36,6 +36,8 @@ task :client do
36
36
  response = client.get("/")
37
37
 
38
38
  puts response.inspect
39
+
40
+ client.close
39
41
  end
40
42
  end
41
43
 
@@ -51,6 +51,9 @@ module Async
51
51
  # Async.logger.debug(self) {"Incoming request from #{address.inspect}: #{request.method} #{request.path}"}
52
52
  handle_request(request, peer, address)
53
53
  end
54
+
55
+ # hijack should be false by default.
56
+ false
54
57
  end
55
58
 
56
59
  if hijack
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Async
22
22
  module HTTP
23
- VERSION = "0.17.0"
23
+ VERSION = "0.17.1"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-11 00:00:00.000000000 Z
11
+ date: 2018-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async