async-dns 1.1.0 → 1.1.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: 75dfa7c3b610755410a52e52a8d17f3b98ffafcd0c74949b1f276e654cdf0677
4
- data.tar.gz: 3d3434f03a5cd4492dcb0d1ba5ea2257952ba756a3a284ad021b9e58105e615c
3
+ metadata.gz: 63426837f51c6ded347b85d6595cec47546c105c505c227841b7a74d77143862
4
+ data.tar.gz: c4a40e84680c56bb3afac65e753f4a2c3a004e3b80c434375ac77db7f7028ce3
5
5
  SHA512:
6
- metadata.gz: ad1b54307fc07a786260573d9d97e619a1662af47786460f04d24c35220ef72787f719b174bb676089a8c4f1680f23c2a05c60b256097182ed63935fbfe7263b
7
- data.tar.gz: 332b76c624b5965f41c8d9242252fd4b9e713d9e6cab8a1ccc593101eea6a8a57327f81ea069642d8cafc63460e995a72cae858a66c7427bc79e43e3cd0a1acb
6
+ metadata.gz: 95910a00deba14a1cd7e17f6d0d6c8d141a1aa6dc0376b5dff74ac57b5e25877ac13ecf63f01fb7d7eda9d6e0a45bd49ef20a6202ed5b11e4c94377fc924ffc9
7
+ data.tar.gz: 1ba1956351a68c00d80f9f585f5592f74afed11b344e8352ce51544da2f36747a545b5b5123372c719d43f0708edcafbc6a27934e129504f55926402b052de90
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ gem 'async'
4
+ gem 'async-http'
5
+ gem 'trenni'
6
+
7
+ require 'async/reactor'
8
+ require 'async/http/client'
9
+ require 'async/http/url_endpoint'
10
+
11
+ require 'trenni/uri'
12
+
13
+ # Async.logger.level = Logger::DEBUG
14
+
15
+ endpoint = Async::HTTP::URLEndpoint.parse("https://cloudflare-dns.com/dns-query")
16
+ client = Async::HTTP::Client.new(endpoint)
17
+
18
+ Async::Reactor.run do |task|
19
+ request_uri = Trenni::URI(endpoint.url.request_uri, ct: "application/dns-json", name: "microsoft.com", type: "MX")
20
+
21
+ puts "GET #{request_uri}"
22
+ response = client.get(request_uri.to_s, {})
23
+
24
+ puts "#{response.status} #{response.version} #{response.headers.inspect}"
25
+ puts response.read.inspect
26
+ end
@@ -19,7 +19,7 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  require 'async'
22
- require 'async/io/endpoint'
22
+ require 'async/io'
23
23
 
24
24
  require_relative 'transaction'
25
25
  require_relative 'logger'
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Async
22
22
  module DNS
23
- VERSION = '1.1.0'
23
+ VERSION = '1.1.1'
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-dns
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.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-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-io
@@ -109,6 +109,7 @@ files:
109
109
  - README.md
110
110
  - Rakefile
111
111
  - async-dns.gemspec
112
+ - examples/cloudflare.rb
112
113
  - lib/async/dns.rb
113
114
  - lib/async/dns/chunked.rb
114
115
  - lib/async/dns/extensions/resolv.rb