doh_client 0.2.1 → 0.2.2

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: acfbac85a8cd2afab9b179a9e026eced2f7af92cd193d559c1b3321e860348c8
4
- data.tar.gz: 1ccbec4bc38a37546b51bf2f23444e726b49aa174e18aa3c205620e5ed1b0df7
3
+ metadata.gz: a0a8512d9ea1dafd21307264d6a5d5f7dd3e5bce1c287ab0be93b6f67fd40938
4
+ data.tar.gz: f316009dbb22a98a20f9309847100ef7376ed06419a13e3d3f064d7e324d71c6
5
5
  SHA512:
6
- metadata.gz: 0a090878e7a7605945e5e2fef7a780d61669176ddb2a102bd5aa8a5d95941a86342565d1818a1567f9ba6912665d3dbc8bfcb93cee524aca47d5504ba90c79bb
7
- data.tar.gz: 53046218f014d59499266e6c5ab80f78e4908de2447b852572572b485c14b336e08d200698ec13ab04992b6b6903cae782a6e89f24268b9fb646645b5b91afc8
6
+ metadata.gz: f98a53b8d96da588c1dc66fb4e95d85753397c88a419f19b96715b971d130b293d258d9a9f7c5fcd5a80e49f61b4df20ea95f30b1e97ea986092b290a6fada2f
7
+ data.tar.gz: 593d06970307666bacbeb7c053b0b258f715e45026dea85a8eaa1191de7c27a2c8da1ce431be72cbb99d38fd00610371711cc0620968f4eeebc3228eda5902d2
@@ -4,4 +4,7 @@ language: ruby
4
4
  cache: bundler
5
5
  rvm:
6
6
  - 2.5
7
- before_install: gem install bundler -v 1.16.4
7
+ - 2.6
8
+ before_install:
9
+ - gem update --system
10
+ - gem install bundler
data/Gemfile CHANGED
@@ -1,6 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source "https://rubygems.org"
2
4
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
6
 
5
7
  # Specify your gem's dependencies in doh_client.gemspec
6
8
  gemspec
data/Rakefile CHANGED
@@ -1,6 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "bundler/gem_tasks"
2
4
  require "rspec/core/rake_task"
3
5
 
4
6
  RSpec::Core::RakeTask.new(:spec)
5
7
 
6
- task :default => :spec
8
+ task default: :spec
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require "bundler/setup"
4
5
  require "doh_client"
@@ -25,14 +25,14 @@ Gem::Specification.new do |spec|
25
25
  spec.require_paths = ["lib"]
26
26
 
27
27
  spec.add_development_dependency "async-rspec", "~> 1.11"
28
- spec.add_development_dependency "bundler", "~> 1.16"
28
+ spec.add_development_dependency "bundler", "~> 2.0"
29
29
  spec.add_development_dependency "coveralls", "~> 0.8"
30
30
  spec.add_development_dependency "rake", "~> 12.3"
31
31
  spec.add_development_dependency "rspec", "~> 3.8"
32
32
  spec.add_development_dependency "vcr", "~> 4.0"
33
- spec.add_development_dependency "webmock", "~> 3.4"
33
+ spec.add_development_dependency "webmock", "~> 3.5"
34
34
 
35
35
  spec.add_dependency "async-dns", "~> 1.2"
36
- spec.add_dependency "http", "~> 3.3"
36
+ spec.add_dependency "http", "~> 4.0"
37
37
  spec.add_dependency "thor", "~> 0.19"
38
38
  end
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require "doh_client"
4
5
 
@@ -6,6 +6,7 @@ module DoHClient
6
6
  def get(url, query)
7
7
  res = http.headers(headers).get(url, params: query);
8
8
  return JSON.parse(res.body.to_s) if res.code == 200
9
+
9
10
  raise ResponseError, res.body.to_s
10
11
  end
11
12
 
@@ -25,6 +25,7 @@ module DoHClient
25
25
  transaction.append_question!
26
26
  answers.each do |answer|
27
27
  next unless klass = Resolv::DNS::Resource.get_class(answer["type"], resource_class::ClassValue)
28
+
28
29
  resource = klass < Resolv::DNS::Resource::DomainName ? klass.new(Resolv::DNS::Name.create(answer["data"])) : klass.new(answer["data"])
29
30
  transaction.response.add_answer(answer["name"], answer["TTL"], resource)
30
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DoHClient
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doh_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manabu Niseki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-27 00:00:00.000000000 Z
11
+ date: 2019-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-rspec
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.16'
33
+ version: '2.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.16'
40
+ version: '2.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: coveralls
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '3.4'
103
+ version: '3.5'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '3.4'
110
+ version: '3.5'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: async-dns
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '3.3'
131
+ version: '4.0'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '3.3'
138
+ version: '4.0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: thor
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -197,8 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
197
  - !ruby/object:Gem::Version
198
198
  version: '0'
199
199
  requirements: []
200
- rubyforge_project:
201
- rubygems_version: 2.7.6
200
+ rubygems_version: 3.0.2
202
201
  signing_key:
203
202
  specification_version: 4
204
203
  summary: DNS over HTTPS(DoH) client for Ruby