resolve-hostname 0.0.4 → 0.1.0

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
  SHA1:
3
- metadata.gz: 7b834934e1e6464dff4bed92852f583042b35431
4
- data.tar.gz: 0bd6fab1ad72007220577e477c42bbba6ddcc7ec
3
+ metadata.gz: f1d164496a81c635f6cfd8ff85dc250ec223f497
4
+ data.tar.gz: 6888123eea4076a5ad0a96789876183db1b9aa6b
5
5
  SHA512:
6
- metadata.gz: ac3ad9dc7199a0803698f64cc0e63c41585351ddc051aed35cfdfed3ea8a37a7725ec30eed752309fa6b2b058f2813f7ff9e87dbe3ecaa0dbd13fc53b0f84361
7
- data.tar.gz: 8983a8199bb1e4649dd2e9027fd80444ffcee72ed348fb470a188ce26102a46182455afc5a77ba7bc0833c78b704b5a4dca07bee0afeebe1da0f273b440d7e29
6
+ metadata.gz: ea4a68d80e9633734a1dbbf62d117f2b5abbe3e31de1214277ba48d3794a67c6db83133f6e287e9da642c18b3c87d713063dd0a3cafc4b4ecfd6be8180f2086a
7
+ data.tar.gz: c2621533f68b74171700e4ef09bc22615fd07390c139828d9d285dbcb35ebcabe633e88707713667dd46853773ea79107508515580fb8e441395d45af7c27456
@@ -0,0 +1,6 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0.0
4
+ - 1.9.3
5
+ - jruby-19mode
6
+ - rbx-19mode
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  require "bundler/gem_tasks"
2
2
 
3
3
  require 'rspec/core/rake_task'
4
- RSpec::Core::RakeTask.new(:test) do |t|
4
+ RSpec::Core::RakeTask.new(:spec) do |t|
5
5
  t.rspec_opts = ["-c", "-f progress"] # '--format specdoc'
6
6
  t.pattern = 'spec/**/*_spec.rb'
7
7
  end
@@ -90,7 +90,7 @@ module Resolve
90
90
  begin
91
91
  IPAddr.new(name)
92
92
  is_address = true
93
- rescue @invalid_address_error => e
93
+ rescue @invalid_address_error
94
94
  # ignore
95
95
  end
96
96
  return name if is_address
@@ -1,5 +1,5 @@
1
1
  module Resolve
2
2
  class Hostname
3
- VERSION = "0.0.4"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
@@ -72,8 +72,9 @@ describe Resolve::Hostname do
72
72
  expect(r.getaddress('www.google.com')).to match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)
73
73
  end
74
74
 
75
- it 'returns 192.0.43.10 for example.com' do
76
- expect(r.getaddress('example.com')).to eq('192.0.43.10')
75
+ it 'returns IPv4 address for example.com' do
76
+ require 'ipaddr'
77
+ expect(IPAddr.new(r.getaddress('example.com')).ipv4?).to be_true
77
78
  end
78
79
 
79
80
  it 'returns same ruby object for second query' do
@@ -105,9 +106,9 @@ describe Resolve::Hostname do
105
106
  end
106
107
  end
107
108
 
108
- context 'initialized as system resolver enabled'
109
- context 'initialized with ipv6 primary'
110
- context 'initialized as not permitted for secondary address version'
109
+ context 'initialized as system resolver enabled' #TODO
110
+ context 'initialized with ipv6 primary' #TODO
111
+ context 'initialized as not permitted for secondary address version' #TODO
111
112
 
112
- context 'initialized as not to raise NotFoundError'
113
+ context 'initialized as not to raise NotFoundError' #TODO
113
114
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resolve-hostname
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TAGOMORI Satoshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-16 00:00:00.000000000 Z
11
+ date: 2017-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '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
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: With caching, selector for IPv4/IPv6, and many other features
@@ -59,8 +59,9 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - .gitignore
63
- - .rspec
62
+ - ".gitignore"
63
+ - ".rspec"
64
+ - ".travis.yml"
64
65
  - Gemfile
65
66
  - LICENSE.txt
66
67
  - README.md
@@ -80,21 +81,20 @@ require_paths:
80
81
  - lib
81
82
  required_ruby_version: !ruby/object:Gem::Requirement
82
83
  requirements:
83
- - - '>='
84
+ - - ">="
84
85
  - !ruby/object:Gem::Version
85
86
  version: '0'
86
87
  required_rubygems_version: !ruby/object:Gem::Requirement
87
88
  requirements:
88
- - - '>='
89
+ - - ">="
89
90
  - !ruby/object:Gem::Version
90
91
  version: '0'
91
92
  requirements: []
92
93
  rubyforge_project:
93
- rubygems_version: 2.0.2
94
+ rubygems_version: 2.6.8
94
95
  signing_key:
95
96
  specification_version: 4
96
97
  summary: Hostname resolver with caching
97
98
  test_files:
98
99
  - spec/resolve_hostname_spec.rb
99
100
  - spec/spec_helper.rb
100
- has_rdoc: