resolv-hosts-dynamic 0.0.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/test.yml +27 -0
- data/.gitignore +0 -1
- data/.pre-commit-config.yaml +14 -0
- data/.rubocop.yml +21 -0
- data/CHANGELOG.md +27 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +60 -0
- data/README.md +8 -4
- data/Rakefile +6 -2
- data/lib/resolv-hosts-dynamic.rb +26 -24
- data/resolv-hosts-dynamic.gemspec +27 -14
- data/spec/resolv-hosts-dynamic_spec.rb +10 -9
- data/spec/spec.gemfile +11 -0
- data/spec/spec_helper.rb +2 -0
- metadata +26 -55
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 126c6b7b7a5bc340dfcb8488cc1623921ad1976dda6034b7ce2f62e2114fc281
|
4
|
+
data.tar.gz: c82cbd54fba898efb13293f1e91d2254b393ec018b6f8f587949d5ce9c58d73f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f21cc848051647d02da4b41babf250c6f59a40e4eb6944f1a25b4e61544fbdd0305888ccf7d5a577f50c95bbd704560e1e940a949b0d09c1f10fc253bb97a64
|
7
|
+
data.tar.gz: 4e3cd8ffbb2b9f4b1bc2b3a416d177816e9725d9bd0de196a9f9cf82800a12b64d8d065a25b71706eb9a1d328c488170a3a66ddb14418ffbbd41ec09a6014e7f
|
@@ -0,0 +1,27 @@
|
|
1
|
+
name: Run tests
|
2
|
+
on: [push, pull_request]
|
3
|
+
jobs:
|
4
|
+
test:
|
5
|
+
strategy:
|
6
|
+
fail-fast: false
|
7
|
+
matrix:
|
8
|
+
ruby: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1']
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
env:
|
11
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/spec/spec.gemfile
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
- uses: ruby/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
ruby-version: ${{ matrix.ruby }}
|
17
|
+
bundler-cache: true
|
18
|
+
- run: bundle exec rspec
|
19
|
+
lint:
|
20
|
+
runs-on: ubuntu-latest
|
21
|
+
steps:
|
22
|
+
- uses: actions/checkout@v2
|
23
|
+
- uses: ruby/setup-ruby@v1
|
24
|
+
with:
|
25
|
+
ruby-version: 2.7
|
26
|
+
bundler-cache: true
|
27
|
+
- run: bundle exec rubocop
|
data/.gitignore
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
repos:
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
3
|
+
rev: v4.4.0
|
4
|
+
hooks:
|
5
|
+
- id: check-added-large-files
|
6
|
+
- id: check-merge-conflict
|
7
|
+
- id: check-yaml
|
8
|
+
- id: end-of-file-fixer
|
9
|
+
- id: trailing-whitespace
|
10
|
+
- repo: https://github.com/mattlqx/pre-commit-ruby
|
11
|
+
rev: v1.3.5
|
12
|
+
hooks:
|
13
|
+
- id: rspec
|
14
|
+
- id: rubocop
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
AllCops:
|
3
|
+
Exclude:
|
4
|
+
- 'spec/fixtures/**/*'
|
5
|
+
- 'vendor/bundle/**/*'
|
6
|
+
NewCops: enable
|
7
|
+
Layout/HashAlignment:
|
8
|
+
EnforcedColonStyle: table
|
9
|
+
EnforcedHashRocketStyle: table
|
10
|
+
Layout/FirstArrayElementIndentation:
|
11
|
+
EnforcedStyle: consistent
|
12
|
+
Layout/FirstHashElementIndentation:
|
13
|
+
EnforcedStyle: consistent
|
14
|
+
Metrics:
|
15
|
+
Enabled: false
|
16
|
+
Naming/FileName:
|
17
|
+
Enabled: false
|
18
|
+
Style/TrailingCommaInArrayLiteral:
|
19
|
+
EnforcedStyleForMultiline: consistent_comma
|
20
|
+
Style/TrailingCommaInHashLiteral:
|
21
|
+
EnforcedStyleForMultiline: consistent_comma
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
|
4
|
+
## [1.0.0] - 2023-03-12
|
5
|
+
|
6
|
+
### Changed
|
7
|
+
|
8
|
+
- Drop support for rubies older than 2.3.0.
|
9
|
+
- Improve documentation.
|
10
|
+
- Various lint fixes.
|
11
|
+
|
12
|
+
|
13
|
+
## [0.0.2] - 2016-04-12
|
14
|
+
|
15
|
+
### Changed
|
16
|
+
|
17
|
+
- Fix minor doc bugs.
|
18
|
+
|
19
|
+
|
20
|
+
## [0.0.1] - 2016-04-08
|
21
|
+
|
22
|
+
Initial release.
|
23
|
+
|
24
|
+
|
25
|
+
[1.0.0]: https://github.com/chris-reeves/gem-resolv-hosts-dynamic/compare/v0.0.2...v1.0.0
|
26
|
+
[0.0.2]: https://github.com/chris-reeves/gem-resolv-hosts-dynamic/compare/v0.0.1...v0.0.2
|
27
|
+
[0.0.1]: https://github.com/chris-reeves/gem-resolv-hosts-dynamic/releases/tag/v0.0.1
|
data/Gemfile
CHANGED
@@ -1,4 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'https://rubygems.org'
|
2
4
|
|
5
|
+
ruby '2.7.7'
|
6
|
+
|
3
7
|
# Specify your gem's dependencies in resolv-hosts-dynamic.gemspec
|
4
8
|
gemspec
|
9
|
+
|
10
|
+
# Development dependencies
|
11
|
+
group :development do
|
12
|
+
gem 'bundler', '~> 2'
|
13
|
+
gem 'rake', '~> 10.0'
|
14
|
+
gem 'rspec'
|
15
|
+
gem 'rubocop', '~> 1.26'
|
16
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
resolv-hosts-dynamic (1.0.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ast (2.4.2)
|
10
|
+
diff-lcs (1.5.0)
|
11
|
+
parallel (1.22.1)
|
12
|
+
parser (3.1.2.0)
|
13
|
+
ast (~> 2.4.1)
|
14
|
+
rainbow (3.1.1)
|
15
|
+
rake (10.5.0)
|
16
|
+
regexp_parser (2.5.0)
|
17
|
+
rexml (3.2.5)
|
18
|
+
rspec (3.11.0)
|
19
|
+
rspec-core (~> 3.11.0)
|
20
|
+
rspec-expectations (~> 3.11.0)
|
21
|
+
rspec-mocks (~> 3.11.0)
|
22
|
+
rspec-core (3.11.0)
|
23
|
+
rspec-support (~> 3.11.0)
|
24
|
+
rspec-expectations (3.11.0)
|
25
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
26
|
+
rspec-support (~> 3.11.0)
|
27
|
+
rspec-mocks (3.11.1)
|
28
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
29
|
+
rspec-support (~> 3.11.0)
|
30
|
+
rspec-support (3.11.0)
|
31
|
+
rubocop (1.28.2)
|
32
|
+
parallel (~> 1.10)
|
33
|
+
parser (>= 3.1.0.0)
|
34
|
+
rainbow (>= 2.2.2, < 4.0)
|
35
|
+
regexp_parser (>= 1.8, < 3.0)
|
36
|
+
rexml
|
37
|
+
rubocop-ast (>= 1.17.0, < 2.0)
|
38
|
+
ruby-progressbar (~> 1.7)
|
39
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
40
|
+
rubocop-ast (1.17.0)
|
41
|
+
parser (>= 3.1.1.0)
|
42
|
+
ruby-progressbar (1.11.0)
|
43
|
+
unicode-display_width (2.2.0)
|
44
|
+
|
45
|
+
PLATFORMS
|
46
|
+
ruby
|
47
|
+
x86_64-linux
|
48
|
+
|
49
|
+
DEPENDENCIES
|
50
|
+
bundler (~> 2)
|
51
|
+
rake (~> 10.0)
|
52
|
+
resolv-hosts-dynamic!
|
53
|
+
rspec
|
54
|
+
rubocop (~> 1.26)
|
55
|
+
|
56
|
+
RUBY VERSION
|
57
|
+
ruby 2.7.7p221
|
58
|
+
|
59
|
+
BUNDLED WITH
|
60
|
+
2.3.8
|
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Resolv::Hosts::Dynamic
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/resolv-hosts-dynamic.svg)](https://badge.fury.io/rb/resolv-hosts-dynamic)
|
4
|
+
[![Tests](https://github.com/chris-reeves/gem-resolv-hosts-dynamic/actions/workflows/test.yml/badge.svg)](https://github.com/chris-reeves/gem-resolv-hosts-dynamic/actions/workflows/test.yml)
|
5
|
+
|
3
6
|
Dynamic in-memory 'hosts' file for resolving hostnames. Injects entries into
|
4
7
|
an in-memory 'hosts' file which can later be used for name resolution without
|
5
8
|
having to modify the system hosts file. This is an extension to the standard
|
@@ -126,7 +129,8 @@ Resolv.getaddresses('www.google.com')
|
|
126
129
|
## Contributing
|
127
130
|
|
128
131
|
1. Fork it ( https://github.com/chris-reeves/gem-resolv-hosts-dynamic/fork )
|
129
|
-
2.
|
130
|
-
3.
|
131
|
-
4.
|
132
|
-
5.
|
132
|
+
2. Install pre-commit (`pip install pre-commit; pre-commit install`)
|
133
|
+
3. Create your feature branch (`git checkout -b my-new-feature`)
|
134
|
+
4. Commit your changes (`git commit -am 'Add some feature'`)
|
135
|
+
5. Push to the branch (`git push origin my-new-feature`)
|
136
|
+
6. Create a new Pull Request
|
data/Rakefile
CHANGED
data/lib/resolv-hosts-dynamic.rb
CHANGED
@@ -1,26 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'resolv'
|
2
4
|
|
3
5
|
class Resolv
|
4
6
|
class Hosts
|
7
|
+
##
|
8
|
+
# Resolve::Hosts::Dynamic is a dynamic in-memory 'hosts' file for
|
9
|
+
# resolving hostnames. It injects entries into an in-memory 'hosts' file
|
10
|
+
# which can later be used for name resolution without having to modify the
|
11
|
+
# system hosts file. This is an extension to the standard ruby Resolv
|
12
|
+
# library and is useful for over-riding name resolution during testing.
|
5
13
|
class Dynamic
|
6
|
-
|
7
14
|
def initialize(hosts = [])
|
8
15
|
@mutex = Mutex.new
|
9
16
|
@name2addr = {}
|
10
17
|
@addr2name = {}
|
11
18
|
|
12
|
-
hosts = [hosts]
|
19
|
+
hosts = [hosts] unless hosts.is_a? Array
|
13
20
|
|
14
|
-
hosts.each
|
15
|
-
|
16
|
-
|
21
|
+
hosts.each do |host|
|
22
|
+
add_address(host)
|
23
|
+
end
|
17
24
|
end
|
18
25
|
|
19
26
|
##
|
20
27
|
# Adds +host+ to the custom resolver.
|
21
28
|
|
22
29
|
def add_address(host)
|
23
|
-
@mutex.synchronize
|
30
|
+
@mutex.synchronize do
|
24
31
|
addr = host['addr']
|
25
32
|
hostname = host['hostname']
|
26
33
|
aliases = host['aliases']
|
@@ -39,20 +46,20 @@ class Resolv
|
|
39
46
|
@addr2name[addr] += aliases if aliases
|
40
47
|
@name2addr[hostname] = [] unless @name2addr.include? hostname
|
41
48
|
@name2addr[hostname] << addr
|
42
|
-
aliases
|
49
|
+
aliases&.each do |n|
|
43
50
|
n.untaint
|
44
51
|
@name2addr[n] = [] unless @name2addr.include? n
|
45
52
|
@name2addr[n] << addr
|
46
|
-
|
47
|
-
|
53
|
+
end
|
54
|
+
end
|
48
55
|
end
|
49
56
|
|
50
57
|
##
|
51
58
|
# Gets the IP address of +name+ from the custom resolver.
|
52
59
|
|
53
60
|
def getaddress(name)
|
54
|
-
each_address(name) {|address| return address}
|
55
|
-
raise ResolvError
|
61
|
+
each_address(name) { |address| return address } # rubocop:disable Lint/UnreachableLoop
|
62
|
+
raise ResolvError, "No dynamic hosts entry for name: #{name}"
|
56
63
|
end
|
57
64
|
|
58
65
|
##
|
@@ -60,25 +67,23 @@ class Resolv
|
|
60
67
|
|
61
68
|
def getaddresses(name)
|
62
69
|
ret = []
|
63
|
-
each_address(name) {|address| ret << address}
|
64
|
-
|
70
|
+
each_address(name) { |address| ret << address }
|
71
|
+
ret
|
65
72
|
end
|
66
73
|
|
67
74
|
##
|
68
75
|
# Iterates over all IP addresses for +name+ retrieved from the custom resolver.
|
69
76
|
|
70
77
|
def each_address(name, &proc)
|
71
|
-
if @name2addr.include?(name)
|
72
|
-
@name2addr[name].each(&proc)
|
73
|
-
end
|
78
|
+
@name2addr[name].each(&proc) if @name2addr.include?(name)
|
74
79
|
end
|
75
80
|
|
76
81
|
##
|
77
82
|
# Gets the hostname of +address+ from the custom resolver.
|
78
83
|
|
79
84
|
def getname(address)
|
80
|
-
each_name(address) {|name| return name}
|
81
|
-
raise ResolvError
|
85
|
+
each_name(address) { |name| return name } # rubocop:disable Lint/UnreachableLoop
|
86
|
+
raise ResolvError, "No dynamic hosts entry for address: #{address}"
|
82
87
|
end
|
83
88
|
|
84
89
|
##
|
@@ -86,19 +91,16 @@ class Resolv
|
|
86
91
|
|
87
92
|
def getnames(address)
|
88
93
|
ret = []
|
89
|
-
each_name(address) {|name| ret << name}
|
90
|
-
|
94
|
+
each_name(address) { |name| ret << name }
|
95
|
+
ret
|
91
96
|
end
|
92
97
|
|
93
98
|
##
|
94
99
|
# Iterates over all hostnames for +address+ retrieved from the custom resolver.
|
95
100
|
|
96
101
|
def each_name(address, &proc)
|
97
|
-
if @addr2name.include?(address)
|
98
|
-
@addr2name[address].each(&proc)
|
99
|
-
end
|
102
|
+
@addr2name[address].each(&proc) if @addr2name.include?(address)
|
100
103
|
end
|
101
|
-
|
102
104
|
end
|
103
105
|
end
|
104
106
|
end
|
@@ -1,23 +1,36 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
|
5
6
|
Gem::Specification.new do |spec|
|
6
|
-
spec.name =
|
7
|
-
spec.version =
|
8
|
-
spec.authors = [
|
9
|
-
spec.email = [
|
10
|
-
spec.summary =
|
11
|
-
spec.description =
|
12
|
-
|
13
|
-
|
7
|
+
spec.name = 'resolv-hosts-dynamic'
|
8
|
+
spec.version = '1.0.0'
|
9
|
+
spec.authors = ['Chris Reeves']
|
10
|
+
spec.email = ['chris.reeves@iname.com']
|
11
|
+
spec.summary = "Dynamic in-memory 'hosts' file for resolving hostnames."
|
12
|
+
spec.description = <<-DESCRIPTION
|
13
|
+
Dynamic in-memory 'hosts' file for resolving hostnames. Injects entries
|
14
|
+
into an in-memory 'hosts' file which can later be used for name resolution
|
15
|
+
without having to modify the system hosts file. This is an extension to
|
16
|
+
the standard ruby Resolv library and is useful for over-riding name
|
17
|
+
resolution during testing.
|
18
|
+
DESCRIPTION
|
19
|
+
spec.homepage = 'https://github.com/chris-reeves/gem-resolv-hosts-dynamic'
|
20
|
+
spec.license = 'MIT'
|
21
|
+
|
22
|
+
spec.metadata = {
|
23
|
+
'homepage_uri' => 'https://github.com/chris-reeves/gem-resolv-hosts-dynamic',
|
24
|
+
'changelog_uri' => 'https://github.com/chris-reeves/gem-resolv-hosts-dynamic/blob/master/CHANGELOG.md',
|
25
|
+
'source_code_uri' => 'https://github.com/chris-reeves/gem-resolv-hosts-dynamic',
|
26
|
+
'bug_tracker_uri' => 'https://github.com/chris-reeves/gem-resolv-hosts-dynamic/issues',
|
27
|
+
'rubygems_mfa_required' => 'true',
|
28
|
+
}
|
14
29
|
|
15
30
|
spec.files = `git ls-files -z`.split("\x0")
|
16
31
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
32
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
-
spec.require_paths = [
|
33
|
+
spec.require_paths = ['lib']
|
19
34
|
|
20
|
-
spec.
|
21
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
22
|
-
spec.add_development_dependency "rspec"
|
35
|
+
spec.required_ruby_version = '>= 2.3.0' # rubocop:disable Gemspec/RequiredRubyVersion
|
23
36
|
end
|
@@ -1,7 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
describe Resolv::Hosts::Dynamic do
|
4
|
-
|
5
6
|
describe '#initialize' do
|
6
7
|
context 'with an empty params list' do
|
7
8
|
res = Resolv::Hosts::Dynamic.new
|
@@ -122,7 +123,7 @@ describe Resolv::Hosts::Dynamic do
|
|
122
123
|
res.add_address({
|
123
124
|
'addr' => '127.1.2.3',
|
124
125
|
'hostname' => 'host.example.com',
|
125
|
-
'aliases' => [
|
126
|
+
'aliases' => %w[host host2],
|
126
127
|
})
|
127
128
|
|
128
129
|
it 'should map the hostname to the address' do
|
@@ -217,7 +218,7 @@ describe Resolv::Hosts::Dynamic do
|
|
217
218
|
dynres.add_address({
|
218
219
|
'addr' => '127.1.2.3',
|
219
220
|
'hostname' => 'host.example.com',
|
220
|
-
'aliases' => 'host'
|
221
|
+
'aliases' => 'host',
|
221
222
|
})
|
222
223
|
|
223
224
|
# name with multiple addresses
|
@@ -236,9 +237,9 @@ describe Resolv::Hosts::Dynamic do
|
|
236
237
|
end
|
237
238
|
|
238
239
|
it 'raises ResolvError if the name can not be looked up' do
|
239
|
-
expect
|
240
|
+
expect do
|
240
241
|
res.getaddress('no.such.host.')
|
241
|
-
|
242
|
+
end.to raise_error(Resolv::ResolvError)
|
242
243
|
end
|
243
244
|
end
|
244
245
|
|
@@ -246,7 +247,7 @@ describe Resolv::Hosts::Dynamic do
|
|
246
247
|
it 'resolves host.example.com to multiple addresses' do
|
247
248
|
expect(
|
248
249
|
res.getaddresses('host.example.com')
|
249
|
-
).to eq [
|
250
|
+
).to eq ['127.1.2.3', '127.4.5.6']
|
250
251
|
end
|
251
252
|
|
252
253
|
it 'resolves to no addresses if the name can not be looked up' do
|
@@ -264,9 +265,9 @@ describe Resolv::Hosts::Dynamic do
|
|
264
265
|
end
|
265
266
|
|
266
267
|
it 'raises ResolvError if the address can not be looked up' do
|
267
|
-
expect
|
268
|
+
expect do
|
268
269
|
res.getname('127.7.8.9')
|
269
|
-
|
270
|
+
end.to raise_error(Resolv::ResolvError)
|
270
271
|
end
|
271
272
|
end
|
272
273
|
|
@@ -274,7 +275,7 @@ describe Resolv::Hosts::Dynamic do
|
|
274
275
|
it 'resolves 127.1.2.3 to a single hostname' do
|
275
276
|
expect(
|
276
277
|
res.getnames('127.1.2.3')
|
277
|
-
).to eq [
|
278
|
+
).to eq ['host.example.com', 'host']
|
278
279
|
end
|
279
280
|
|
280
281
|
it 'resolves to no hostnames if the address can not be looked up' do
|
data/spec/spec.gemfile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
gemspec path: '..'
|
6
|
+
|
7
|
+
# This is a cut down Gemfile with minimal dependencies sufficient to run spec
|
8
|
+
# tests across as wide a range of ruby versions as possible.
|
9
|
+
group :development do
|
10
|
+
gem 'rspec'
|
11
|
+
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,81 +1,52 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resolv-hosts-dynamic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Reeves
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
version: '1.7'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '1.7'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '10.0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '10.0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rspec
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
description: Dynamic in-memory 'hosts' file for resolving hostnames. Injects entries
|
56
|
-
into an in-memory 'hosts' file which can later be used for name resolution without
|
57
|
-
having to modify the system hosts file. This is an extension to the standard ruby
|
58
|
-
Resolv library and is useful for over-riding name resolution during testing.
|
11
|
+
date: 2023-03-12 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: |2
|
14
|
+
Dynamic in-memory 'hosts' file for resolving hostnames. Injects entries
|
15
|
+
into an in-memory 'hosts' file which can later be used for name resolution
|
16
|
+
without having to modify the system hosts file. This is an extension to
|
17
|
+
the standard ruby Resolv library and is useful for over-riding name
|
18
|
+
resolution during testing.
|
59
19
|
email:
|
60
|
-
- chris.reeves@
|
20
|
+
- chris.reeves@iname.com
|
61
21
|
executables: []
|
62
22
|
extensions: []
|
63
23
|
extra_rdoc_files: []
|
64
24
|
files:
|
25
|
+
- ".github/workflows/test.yml"
|
65
26
|
- ".gitignore"
|
27
|
+
- ".pre-commit-config.yaml"
|
66
28
|
- ".rspec"
|
29
|
+
- ".rubocop.yml"
|
30
|
+
- CHANGELOG.md
|
67
31
|
- Gemfile
|
32
|
+
- Gemfile.lock
|
68
33
|
- LICENSE
|
69
34
|
- README.md
|
70
35
|
- Rakefile
|
71
36
|
- lib/resolv-hosts-dynamic.rb
|
72
37
|
- resolv-hosts-dynamic.gemspec
|
73
38
|
- spec/resolv-hosts-dynamic_spec.rb
|
39
|
+
- spec/spec.gemfile
|
74
40
|
- spec/spec_helper.rb
|
75
|
-
homepage:
|
41
|
+
homepage: https://github.com/chris-reeves/gem-resolv-hosts-dynamic
|
76
42
|
licenses:
|
77
43
|
- MIT
|
78
|
-
metadata:
|
44
|
+
metadata:
|
45
|
+
homepage_uri: https://github.com/chris-reeves/gem-resolv-hosts-dynamic
|
46
|
+
changelog_uri: https://github.com/chris-reeves/gem-resolv-hosts-dynamic/blob/master/CHANGELOG.md
|
47
|
+
source_code_uri: https://github.com/chris-reeves/gem-resolv-hosts-dynamic
|
48
|
+
bug_tracker_uri: https://github.com/chris-reeves/gem-resolv-hosts-dynamic/issues
|
49
|
+
rubygems_mfa_required: 'true'
|
79
50
|
post_install_message:
|
80
51
|
rdoc_options: []
|
81
52
|
require_paths:
|
@@ -84,18 +55,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
84
55
|
requirements:
|
85
56
|
- - ">="
|
86
57
|
- !ruby/object:Gem::Version
|
87
|
-
version:
|
58
|
+
version: 2.3.0
|
88
59
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
60
|
requirements:
|
90
61
|
- - ">="
|
91
62
|
- !ruby/object:Gem::Version
|
92
63
|
version: '0'
|
93
64
|
requirements: []
|
94
|
-
|
95
|
-
rubygems_version: 2.4.3
|
65
|
+
rubygems_version: 3.1.6
|
96
66
|
signing_key:
|
97
67
|
specification_version: 4
|
98
68
|
summary: Dynamic in-memory 'hosts' file for resolving hostnames.
|
99
69
|
test_files:
|
100
70
|
- spec/resolv-hosts-dynamic_spec.rb
|
71
|
+
- spec/spec.gemfile
|
101
72
|
- spec/spec_helper.rb
|