name_checker 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/name_checker/facebook_checker.rb +1 -0
- data/lib/name_checker/logging.rb +2 -2
- data/lib/name_checker/robo_whois_checker.rb +3 -3
- data/lib/name_checker/version.rb +1 -1
- data/spec/fixtures/vcr_cassettes/robo_whois/available.yml +9 -9
- data/spec/fixtures/vcr_cassettes/robo_whois/credits.yml +9 -9
- data/spec/fixtures/vcr_cassettes/robo_whois/unavailable.yml +9 -9
- data/spec/spec_helper.rb +5 -3
- metadata +59 -29
data/lib/name_checker/logging.rb
CHANGED
@@ -5,14 +5,14 @@ module NameChecker
|
|
5
5
|
include HTTParty
|
6
6
|
include Logging
|
7
7
|
|
8
|
-
base_uri 'http://api.robowhois.com'
|
8
|
+
base_uri 'http://api.robowhois.com/v1'
|
9
|
+
format :json
|
9
10
|
@service_name = :robo_whois
|
10
11
|
|
11
12
|
def self.check(host, options={})
|
12
13
|
options.merge!(basic_auth: auth_options)
|
13
14
|
|
14
|
-
|
15
|
-
res = get("/whois/#{host}/availability", options)
|
15
|
+
res = get("/availability/#{host}", options)
|
16
16
|
status = handle_response(res, host)
|
17
17
|
Availability.new(@service_name, status)
|
18
18
|
rescue
|
data/lib/name_checker/version.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http
|
5
|
+
uri: http://<ROBO_WHOIS_API_KEY>:X@api.robowhois.com/v1/availability/fwekjfkewfhwefhhfjcjksdjklka.com
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -25,24 +25,24 @@ http_interactions:
|
|
25
25
|
X-Ua-Compatible:
|
26
26
|
- IE=Edge,chrome=1
|
27
27
|
Etag:
|
28
|
-
- ! '"
|
28
|
+
- ! '"9a204bc84555cf74ce903aacc8566ac1"'
|
29
29
|
Cache-Control:
|
30
30
|
- must-revalidate, private, max-age=0
|
31
31
|
X-Request-Id:
|
32
|
-
-
|
32
|
+
- a65189befc42537da49cdee67e0213c9
|
33
33
|
X-Runtime:
|
34
|
-
- '0.
|
34
|
+
- '0.911466'
|
35
35
|
X-Creditlimit-Remaining:
|
36
|
-
- '
|
36
|
+
- '495'
|
37
37
|
Date:
|
38
|
-
- Tue,
|
38
|
+
- Tue, 29 Jan 2013 11:37:36 GMT
|
39
39
|
X-Rack-Cache:
|
40
40
|
- miss
|
41
41
|
Server:
|
42
42
|
- nginx/1.1.14 + Phusion Passenger 3.0.11 (mod_rails/mod_rack)
|
43
43
|
body:
|
44
44
|
encoding: US-ASCII
|
45
|
-
string: ! '{"response":{"
|
45
|
+
string: ! '{"response":{"available":true}}'
|
46
46
|
http_version:
|
47
|
-
recorded_at: Tue,
|
48
|
-
recorded_with: VCR 2.
|
47
|
+
recorded_at: Tue, 29 Jan 2013 11:37:36 GMT
|
48
|
+
recorded_with: VCR 2.4.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http
|
5
|
+
uri: http://<ROBO_WHOIS_API_KEY>:X@api.robowhois.com/v1/availability/apple.ly
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -25,24 +25,24 @@ http_interactions:
|
|
25
25
|
X-Ua-Compatible:
|
26
26
|
- IE=Edge,chrome=1
|
27
27
|
Etag:
|
28
|
-
- ! '"
|
28
|
+
- ! '"99a2ce43bf05a2f503c7cad2965787b1"'
|
29
29
|
Cache-Control:
|
30
30
|
- must-revalidate, private, max-age=0
|
31
31
|
X-Request-Id:
|
32
|
-
-
|
32
|
+
- a9d8cc5562a96852513a944d9c1f0b3b
|
33
33
|
X-Runtime:
|
34
|
-
- '
|
34
|
+
- '2.238968'
|
35
35
|
X-Creditlimit-Remaining:
|
36
|
-
- '
|
36
|
+
- '40'
|
37
37
|
Date:
|
38
|
-
- Tue,
|
38
|
+
- Tue, 29 Jan 2013 11:35:23 GMT
|
39
39
|
X-Rack-Cache:
|
40
40
|
- miss
|
41
41
|
Server:
|
42
42
|
- nginx/1.1.14 + Phusion Passenger 3.0.11 (mod_rails/mod_rack)
|
43
43
|
body:
|
44
44
|
encoding: US-ASCII
|
45
|
-
string: ! '{"response":{"daystamp":"
|
45
|
+
string: ! '{"response":{"daystamp":"2013-01-29","available":false,"registered":true}}'
|
46
46
|
http_version:
|
47
|
-
recorded_at: Tue,
|
48
|
-
recorded_with: VCR 2.
|
47
|
+
recorded_at: Tue, 29 Jan 2013 11:35:23 GMT
|
48
|
+
recorded_with: VCR 2.4.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http
|
5
|
+
uri: http://<ROBO_WHOIS_API_KEY>:X@api.robowhois.com/v1/availability/apple.com
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -25,24 +25,24 @@ http_interactions:
|
|
25
25
|
X-Ua-Compatible:
|
26
26
|
- IE=Edge,chrome=1
|
27
27
|
Etag:
|
28
|
-
- ! '"
|
28
|
+
- ! '"d3c2e3d6c06f9cf647c640b2f81f5c9f"'
|
29
29
|
Cache-Control:
|
30
30
|
- must-revalidate, private, max-age=0
|
31
31
|
X-Request-Id:
|
32
|
-
-
|
32
|
+
- 39f0b9267a9dd92224fb9a737012e936
|
33
33
|
X-Runtime:
|
34
|
-
- '0.
|
34
|
+
- '0.674255'
|
35
35
|
X-Creditlimit-Remaining:
|
36
|
-
- '
|
36
|
+
- '496'
|
37
37
|
Date:
|
38
|
-
- Tue,
|
38
|
+
- Tue, 29 Jan 2013 11:37:34 GMT
|
39
39
|
X-Rack-Cache:
|
40
40
|
- miss
|
41
41
|
Server:
|
42
42
|
- nginx/1.1.14 + Phusion Passenger 3.0.11 (mod_rails/mod_rack)
|
43
43
|
body:
|
44
44
|
encoding: US-ASCII
|
45
|
-
string: ! '{"response":{"
|
45
|
+
string: ! '{"response":{"available":false}}'
|
46
46
|
http_version:
|
47
|
-
recorded_at: Tue,
|
48
|
-
recorded_with: VCR 2.
|
47
|
+
recorded_at: Tue, 29 Jan 2013 11:37:35 GMT
|
48
|
+
recorded_with: VCR 2.4.0
|
data/spec/spec_helper.rb
CHANGED
@@ -5,9 +5,8 @@ unless defined?(SPEC_ROOT)
|
|
5
5
|
SPEC_ROOT = File.expand_path("../", __FILE__)
|
6
6
|
end
|
7
7
|
|
8
|
-
# A RoboWhois API Key must b supplied in order to regenerate
|
9
|
-
|
10
|
-
ROBO_WHOIS_API_KEY = nil
|
8
|
+
# A RoboWhois API Key must b supplied in order to regenerate VCR casettes.
|
9
|
+
ROBO_WHOIS_API_KEY = "12345"
|
11
10
|
|
12
11
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
13
12
|
# in spec/support/ and its subdirectories.
|
@@ -23,6 +22,9 @@ VCR.configure do |c|
|
|
23
22
|
end
|
24
23
|
end
|
25
24
|
|
25
|
+
# Suppress warnings such as rate limit warnings when running specs.
|
26
|
+
Logging.logger(nil)
|
27
|
+
|
26
28
|
NameChecker.configure do |config|
|
27
29
|
config.robo_whois_api_key = ROBO_WHOIS_API_KEY || 'ROBO_WHOIS_API_KEY'
|
28
30
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: name_checker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,74 +9,104 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
|
17
|
-
|
16
|
+
prerelease: false
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '0'
|
22
|
+
none: false
|
22
23
|
type: :development
|
23
|
-
|
24
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - ! '>='
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '0'
|
29
|
+
none: false
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: webmock
|
27
|
-
|
28
|
-
|
32
|
+
prerelease: false
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
29
34
|
requirements:
|
30
35
|
- - ! '>='
|
31
36
|
- !ruby/object:Gem::Version
|
32
37
|
version: '0'
|
38
|
+
none: false
|
33
39
|
type: :development
|
34
|
-
|
35
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ! '>='
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0'
|
45
|
+
none: false
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: vcr
|
38
|
-
|
39
|
-
|
48
|
+
prerelease: false
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
40
50
|
requirements:
|
41
51
|
- - ! '>='
|
42
52
|
- !ruby/object:Gem::Version
|
43
53
|
version: '0'
|
54
|
+
none: false
|
44
55
|
type: :development
|
45
|
-
|
46
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ! '>='
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
none: false
|
47
62
|
- !ruby/object:Gem::Dependency
|
48
63
|
name: rake
|
49
|
-
|
50
|
-
|
64
|
+
prerelease: false
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
51
66
|
requirements:
|
52
67
|
- - ! '>='
|
53
68
|
- !ruby/object:Gem::Version
|
54
69
|
version: '0'
|
70
|
+
none: false
|
55
71
|
type: :development
|
56
|
-
|
57
|
-
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
none: false
|
58
78
|
- !ruby/object:Gem::Dependency
|
59
79
|
name: httparty
|
60
|
-
|
61
|
-
|
80
|
+
prerelease: false
|
81
|
+
requirement: !ruby/object:Gem::Requirement
|
62
82
|
requirements:
|
63
83
|
- - ! '>='
|
64
84
|
- !ruby/object:Gem::Version
|
65
85
|
version: '0'
|
86
|
+
none: false
|
66
87
|
type: :runtime
|
67
|
-
|
68
|
-
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ! '>='
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0'
|
93
|
+
none: false
|
69
94
|
- !ruby/object:Gem::Dependency
|
70
95
|
name: whois
|
71
|
-
|
72
|
-
|
96
|
+
prerelease: false
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
73
98
|
requirements:
|
74
99
|
- - ! '>='
|
75
100
|
- !ruby/object:Gem::Version
|
76
101
|
version: '0'
|
102
|
+
none: false
|
77
103
|
type: :runtime
|
78
|
-
|
79
|
-
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - ! '>='
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '0'
|
109
|
+
none: false
|
80
110
|
description: ! ' NameChecker is a Ruby library for checking the availability of
|
81
111
|
a word across various TLDs and social networks. It was created to power http://domiy.com.
|
82
112
|
|
@@ -133,20 +163,20 @@ rdoc_options: []
|
|
133
163
|
require_paths:
|
134
164
|
- lib
|
135
165
|
required_ruby_version: !ruby/object:Gem::Requirement
|
136
|
-
none: false
|
137
166
|
requirements:
|
138
167
|
- - ! '>='
|
139
168
|
- !ruby/object:Gem::Version
|
140
169
|
version: '0'
|
141
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
142
170
|
none: false
|
171
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
172
|
requirements:
|
144
173
|
- - ! '>='
|
145
174
|
- !ruby/object:Gem::Version
|
146
175
|
version: '0'
|
176
|
+
none: false
|
147
177
|
requirements: []
|
148
178
|
rubyforge_project:
|
149
|
-
rubygems_version: 1.8.
|
179
|
+
rubygems_version: 1.8.24
|
150
180
|
signing_key:
|
151
181
|
specification_version: 3
|
152
182
|
summary: Check the availability of a name on various services.
|