domain_finder 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/domain_finder/version.rb +1 -1
- metadata +4 -23
- data/.gitignore +0 -18
- data/.rspec +0 -2
- data/.travis.yml +0 -5
- data/Gemfile +0 -4
- data/LICENSE.txt +0 -22
- data/README.md +0 -49
- data/Rakefile +0 -6
- data/domain_finder.gemspec +0 -26
- data/screenshots/domainfinder.png +0 -0
- data/screenshots/domainfinder2.png +0 -0
- data/spec/cassettes/DomainFinder/GETs_domains_from_registrar.yml +0 -52
- data/spec/cassettes/DomainFinder/GETs_multiple_queries.yml +0 -101
- data/spec/domain_finder_spec.rb +0 -22
- data/spec/spec_helper.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f339fbc4e0ae01450d45cdc750ffe9e751eebe8
|
4
|
+
data.tar.gz: a8d93f2394126b9b53f6224a62ed968ec8ad7d29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b63b8d167d63873da0937a299625a0385a16527dfe59170012cfcba5af548c68d311bf18165e9990b2cd9dfc188ff64fd1623ed3f1b550c882297fe6ff72eceb
|
7
|
+
data.tar.gz: 4f9dc1c17eb5ace213170829ace8b889a8274cd3b95e44394595bb91939d1e121cb67e27f764dbf245e006f4bf84d2f6c33176248fed5b63bcf1cf0b6112c7bd
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: domain_finder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jade McGough
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: vcr
|
@@ -67,30 +67,15 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '2.14'
|
69
69
|
description: Check website domain availability from the command line
|
70
|
-
email:
|
71
|
-
- jade@thezets.com
|
70
|
+
email: jade@thezets.com
|
72
71
|
executables:
|
73
72
|
- domain
|
74
73
|
extensions: []
|
75
74
|
extra_rdoc_files: []
|
76
75
|
files:
|
77
|
-
- ".gitignore"
|
78
|
-
- ".rspec"
|
79
|
-
- ".travis.yml"
|
80
|
-
- Gemfile
|
81
|
-
- LICENSE.txt
|
82
|
-
- README.md
|
83
|
-
- Rakefile
|
84
76
|
- bin/domain
|
85
|
-
- domain_finder.gemspec
|
86
77
|
- lib/domain_finder.rb
|
87
78
|
- lib/domain_finder/version.rb
|
88
|
-
- screenshots/domainfinder.png
|
89
|
-
- screenshots/domainfinder2.png
|
90
|
-
- spec/cassettes/DomainFinder/GETs_domains_from_registrar.yml
|
91
|
-
- spec/cassettes/DomainFinder/GETs_multiple_queries.yml
|
92
|
-
- spec/domain_finder_spec.rb
|
93
|
-
- spec/spec_helper.rb
|
94
79
|
homepage: https://github.com/zetsubo/domain_finder
|
95
80
|
licenses:
|
96
81
|
- MIT
|
@@ -115,8 +100,4 @@ rubygems_version: 2.2.1
|
|
115
100
|
signing_key:
|
116
101
|
specification_version: 4
|
117
102
|
summary: Domain availability checker
|
118
|
-
test_files:
|
119
|
-
- spec/cassettes/DomainFinder/GETs_domains_from_registrar.yml
|
120
|
-
- spec/cassettes/DomainFinder/GETs_multiple_queries.yml
|
121
|
-
- spec/domain_finder_spec.rb
|
122
|
-
- spec/spec_helper.rb
|
103
|
+
test_files: []
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.travis.yml
DELETED
data/Gemfile
DELETED
data/LICENSE.txt
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) 2014 Jade McGough
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
# Domain Finder [![Build Status](https://travis-ci.org/zetsubo/domain_finder.png?branch=master)](https://travis-ci.org/zetsubo/domain_finder)
|
2
|
-
|
3
|
-
Say you're working on a new web project and suddenly think of a good name for it. "Well, this is sort of like Facebook, and also like Twitter," you muse. "I've got it - facetweet!"
|
4
|
-
|
5
|
-
You _could_ open up a browser tab and check domains on a registrar. Or, you could search _right in your terminal_ with domain_finder.
|
6
|
-
|
7
|
-
![](screenshots/domainfinder.png)
|
8
|
-
|
9
|
-
## Installation
|
10
|
-
|
11
|
-
Easy peasy lemon squeezy:
|
12
|
-
|
13
|
-
$ gem install domain_finder
|
14
|
-
|
15
|
-
## Usage
|
16
|
-
|
17
|
-
After installing, simply type `domain foo` in your terminal. Feeling particularly lazy? You can even search for multiple domains at once:
|
18
|
-
|
19
|
-
```
|
20
|
-
domain facetweet twitbook
|
21
|
-
** facetweet **
|
22
|
-
✘ facetweet.com
|
23
|
-
✘ facetweet.net
|
24
|
-
○ facetweet.org
|
25
|
-
✘ facetweet.co
|
26
|
-
○ facetweet.io
|
27
|
-
✘ facetweet.me
|
28
|
-
○ facetw.ee
|
29
|
-
? face.tw
|
30
|
-
✘ facetwe.et
|
31
|
-
✘ fac.et
|
32
|
-
✘ f.ac
|
33
|
-
** twitbook **
|
34
|
-
✘ twitbook.com
|
35
|
-
✘ twitbook.net
|
36
|
-
○ twitbook.org
|
37
|
-
○ twitbook.co
|
38
|
-
○ twitbook.io
|
39
|
-
○ twitbook.me
|
40
|
-
○ twit.bo
|
41
|
-
? twit.book
|
42
|
-
✘ tw
|
43
|
-
✘ twit.boo
|
44
|
-
✘ tw.it
|
45
|
-
```
|
46
|
-
|
47
|
-
## Support
|
48
|
-
|
49
|
-
domain_finder works (and is tested) with Ruby 1.9.3, 2.0.0 and 2.1.0.
|
data/Rakefile
DELETED
data/domain_finder.gemspec
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'domain_finder/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "domain_finder"
|
8
|
-
spec.version = DomainFinder::VERSION
|
9
|
-
spec.authors = ["Jade McGough"]
|
10
|
-
spec.email = ["jade@thezets.com"]
|
11
|
-
spec.summary = %q{Domain availability checker}
|
12
|
-
spec.description = %q{Check website domain availability from the command line}
|
13
|
-
spec.homepage = "https://github.com/zetsubo/domain_finder"
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.files = `git ls-files -z`.split("\x0")
|
17
|
-
spec.executables = ["domain"]
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.add_development_dependency "vcr", "~> 2.8"
|
22
|
-
spec.add_development_dependency "rake", "~> 10.1"
|
23
|
-
spec.add_development_dependency "webmock", "~> 1.16"
|
24
|
-
spec.add_development_dependency "rspec", "~> 2.14"
|
25
|
-
|
26
|
-
end
|
Binary file
|
Binary file
|
@@ -1,52 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://domai.nr/api/json/search?q=thezets
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
Accept-Encoding:
|
11
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
-
Accept:
|
13
|
-
- "*/*"
|
14
|
-
User-Agent:
|
15
|
-
- Ruby
|
16
|
-
response:
|
17
|
-
status:
|
18
|
-
code: 200
|
19
|
-
message: OK
|
20
|
-
headers:
|
21
|
-
Cache-Control:
|
22
|
-
- max-age=0, private, must-revalidate
|
23
|
-
Content-Type:
|
24
|
-
- application/json; charset=utf-8
|
25
|
-
Etag:
|
26
|
-
- "\"cbe3081c4d4868f313dce61692a3c7a2\""
|
27
|
-
Strict-Transport-Security:
|
28
|
-
- max-age=31536000
|
29
|
-
Vary:
|
30
|
-
- Accept-Encoding
|
31
|
-
X-Content-Type-Options:
|
32
|
-
- nosniff
|
33
|
-
X-Frame-Options:
|
34
|
-
- SAMEORIGIN
|
35
|
-
X-Request-Id:
|
36
|
-
- c4809227-5138-4acd-9d78-8e9f0d217607
|
37
|
-
X-Runtime:
|
38
|
-
- '0.025812'
|
39
|
-
X-Ua-Compatible:
|
40
|
-
- chrome=1
|
41
|
-
X-Xss-Protection:
|
42
|
-
- 1; mode=block
|
43
|
-
Content-Length:
|
44
|
-
- '233'
|
45
|
-
Connection:
|
46
|
-
- keep-alive
|
47
|
-
body:
|
48
|
-
encoding: UTF-8
|
49
|
-
string: "{\"query\":\"thezets\",\"results\":[{\"domain\":\"thezets.com\",\"host\":\"\",\"subdomain\":\"thezets.com\",\"path\":\"\",\"availability\":\"taken\",\"register_url\":\"https://domai.nr/thezets.com/register\"},{\"domain\":\"thezets.net\",\"host\":\"\",\"subdomain\":\"thezets.net\",\"path\":\"\",\"availability\":\"available\",\"register_url\":\"https://domai.nr/thezets.net/register\"},{\"domain\":\"thezets.org\",\"host\":\"\",\"subdomain\":\"thezets.org\",\"path\":\"\",\"availability\":\"available\",\"register_url\":\"https://domai.nr/thezets.org/register\"},{\"domain\":\"thezets.co\",\"host\":\"\",\"subdomain\":\"thezets.co\",\"path\":\"\",\"availability\":\"available\",\"register_url\":\"https://domai.nr/thezets.co/register\"},{\"domain\":\"thezets.io\",\"host\":\"\",\"subdomain\":\"thezets.io\",\"path\":\"\",\"availability\":\"available\",\"register_url\":\"https://domai.nr/thezets.io/register\"},{\"domain\":\"thezets.me\",\"host\":\"\",\"subdomain\":\"thezets.me\",\"path\":\"\",\"availability\":\"available\",\"register_url\":\"https://domai.nr/thezets.me/register\"},{\"domain\":\"th\",\"host\":\"\",\"subdomain\":\"th\",\"path\":\"/ezets\",\"availability\":\"tld\",\"register_url\":\"https://domai.nr/th/register\"},{\"domain\":\"thez.et\",\"host\":\"\",\"subdomain\":\"thez.et\",\"path\":\"/s\",\"availability\":\"unavailable\",\"register_url\":\"https://domai.nr/thez.et/register\"}]}"
|
50
|
-
http_version:
|
51
|
-
recorded_at: Tue, 11 Feb 2014 08:21:33 GMT
|
52
|
-
recorded_with: VCR 2.8.0
|
@@ -1,101 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://domai.nr/api/json/search?q=twitbook
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
Accept-Encoding:
|
11
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
-
Accept:
|
13
|
-
- "*/*"
|
14
|
-
User-Agent:
|
15
|
-
- Ruby
|
16
|
-
response:
|
17
|
-
status:
|
18
|
-
code: 200
|
19
|
-
message: OK
|
20
|
-
headers:
|
21
|
-
Cache-Control:
|
22
|
-
- max-age=0, private, must-revalidate
|
23
|
-
Content-Type:
|
24
|
-
- application/json; charset=utf-8
|
25
|
-
Etag:
|
26
|
-
- "\"991602b3520ae947ebcfc13839765713\""
|
27
|
-
Strict-Transport-Security:
|
28
|
-
- max-age=31536000
|
29
|
-
Vary:
|
30
|
-
- Accept-Encoding
|
31
|
-
X-Content-Type-Options:
|
32
|
-
- nosniff
|
33
|
-
X-Frame-Options:
|
34
|
-
- SAMEORIGIN
|
35
|
-
X-Request-Id:
|
36
|
-
- 93da875e-09f8-41e6-a2f9-78e70cf33336
|
37
|
-
X-Runtime:
|
38
|
-
- '0.029765'
|
39
|
-
X-Ua-Compatible:
|
40
|
-
- chrome=1
|
41
|
-
X-Xss-Protection:
|
42
|
-
- 1; mode=block
|
43
|
-
Content-Length:
|
44
|
-
- '281'
|
45
|
-
Connection:
|
46
|
-
- keep-alive
|
47
|
-
body:
|
48
|
-
encoding: UTF-8
|
49
|
-
string: "{\"query\":\"twitbook\",\"results\":[{\"domain\":\"twitbook.com\",\"host\":\"\",\"subdomain\":\"twitbook.com\",\"path\":\"\",\"availability\":\"taken\",\"register_url\":\"https://domai.nr/twitbook.com/register\"},{\"domain\":\"twitbook.net\",\"host\":\"\",\"subdomain\":\"twitbook.net\",\"path\":\"\",\"availability\":\"taken\",\"register_url\":\"https://domai.nr/twitbook.net/register\"},{\"domain\":\"twitbook.org\",\"host\":\"\",\"subdomain\":\"twitbook.org\",\"path\":\"\",\"availability\":\"available\",\"register_url\":\"https://domai.nr/twitbook.org/register\"},{\"domain\":\"twitbook.co\",\"host\":\"\",\"subdomain\":\"twitbook.co\",\"path\":\"\",\"availability\":\"available\",\"register_url\":\"https://domai.nr/twitbook.co/register\"},{\"domain\":\"twitbook.io\",\"host\":\"\",\"subdomain\":\"twitbook.io\",\"path\":\"\",\"availability\":\"available\",\"register_url\":\"https://domai.nr/twitbook.io/register\"},{\"domain\":\"twitbook.me\",\"host\":\"\",\"subdomain\":\"twitbook.me\",\"path\":\"\",\"availability\":\"available\",\"register_url\":\"https://domai.nr/twitbook.me/register\"},{\"domain\":\"twit.bo\",\"host\":\"\",\"subdomain\":\"twit.bo\",\"path\":\"/ok\",\"availability\":\"available\",\"register_url\":\"https://domai.nr/twit.bo/register\"},{\"domain\":\"twit.book\",\"host\":\"\",\"subdomain\":\"twit.book\",\"path\":\"\",\"availability\":\"maybe\",\"register_url\":\"https://domai.nr/twit.book/register\"},{\"domain\":\"tw\",\"host\":\"\",\"subdomain\":\"tw\",\"path\":\"/itbook\",\"availability\":\"tld\",\"register_url\":\"https://domai.nr/tw/register\"},{\"domain\":\"twit.boo\",\"host\":\"\",\"subdomain\":\"twit.boo\",\"path\":\"/k\",\"availability\":\"unavailable\",\"register_url\":\"https://domai.nr/twit.boo/register\"},{\"domain\":\"tw.it\",\"host\":\"\",\"subdomain\":\"tw.it\",\"path\":\"/book\",\"availability\":\"unavailable\",\"register_url\":\"https://domai.nr/tw.it/register\"}]}"
|
50
|
-
http_version:
|
51
|
-
recorded_at: Tue, 11 Feb 2014 08:23:42 GMT
|
52
|
-
- request:
|
53
|
-
method: get
|
54
|
-
uri: https://domai.nr/api/json/search?q=facetweet
|
55
|
-
body:
|
56
|
-
encoding: US-ASCII
|
57
|
-
string: ''
|
58
|
-
headers:
|
59
|
-
Accept-Encoding:
|
60
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
61
|
-
Accept:
|
62
|
-
- "*/*"
|
63
|
-
User-Agent:
|
64
|
-
- Ruby
|
65
|
-
response:
|
66
|
-
status:
|
67
|
-
code: 200
|
68
|
-
message: OK
|
69
|
-
headers:
|
70
|
-
Cache-Control:
|
71
|
-
- max-age=0, private, must-revalidate
|
72
|
-
Content-Type:
|
73
|
-
- application/json; charset=utf-8
|
74
|
-
Etag:
|
75
|
-
- "\"690c76ea706deb2af84b658efa10e7dd\""
|
76
|
-
Strict-Transport-Security:
|
77
|
-
- max-age=31536000
|
78
|
-
Vary:
|
79
|
-
- Accept-Encoding
|
80
|
-
X-Content-Type-Options:
|
81
|
-
- nosniff
|
82
|
-
X-Frame-Options:
|
83
|
-
- SAMEORIGIN
|
84
|
-
X-Request-Id:
|
85
|
-
- 5a010c19-b461-4e9c-8cc0-072247e09466
|
86
|
-
X-Runtime:
|
87
|
-
- '0.033554'
|
88
|
-
X-Ua-Compatible:
|
89
|
-
- chrome=1
|
90
|
-
X-Xss-Protection:
|
91
|
-
- 1; mode=block
|
92
|
-
Content-Length:
|
93
|
-
- '288'
|
94
|
-
Connection:
|
95
|
-
- keep-alive
|
96
|
-
body:
|
97
|
-
encoding: UTF-8
|
98
|
-
string: "{\"query\":\"facetweet\",\"results\":[{\"domain\":\"facetweet.com\",\"host\":\"\",\"subdomain\":\"facetweet.com\",\"path\":\"\",\"availability\":\"taken\",\"register_url\":\"https://domai.nr/facetweet.com/register\"},{\"domain\":\"facetweet.net\",\"host\":\"\",\"subdomain\":\"facetweet.net\",\"path\":\"\",\"availability\":\"taken\",\"register_url\":\"https://domai.nr/facetweet.net/register\"},{\"domain\":\"facetweet.org\",\"host\":\"\",\"subdomain\":\"facetweet.org\",\"path\":\"\",\"availability\":\"available\",\"register_url\":\"https://domai.nr/facetweet.org/register\"},{\"domain\":\"facetweet.co\",\"host\":\"\",\"subdomain\":\"facetweet.co\",\"path\":\"\",\"availability\":\"taken\",\"register_url\":\"https://domai.nr/facetweet.co/register\"},{\"domain\":\"facetweet.io\",\"host\":\"\",\"subdomain\":\"facetweet.io\",\"path\":\"\",\"availability\":\"available\",\"register_url\":\"https://domai.nr/facetweet.io/register\"},{\"domain\":\"facetweet.me\",\"host\":\"\",\"subdomain\":\"facetweet.me\",\"path\":\"\",\"availability\":\"taken\",\"register_url\":\"https://domai.nr/facetweet.me/register\"},{\"domain\":\"facetw.ee\",\"host\":\"\",\"subdomain\":\"facetw.ee\",\"path\":\"/t\",\"availability\":\"available\",\"register_url\":\"https://domai.nr/facetw.ee/register\"},{\"domain\":\"face.tw\",\"host\":\"\",\"subdomain\":\"face.tw\",\"path\":\"/eet\",\"availability\":\"maybe\",\"register_url\":\"https://domai.nr/face.tw/register\"},{\"domain\":\"facetwe.et\",\"host\":\"\",\"subdomain\":\"facetwe.et\",\"path\":\"\",\"availability\":\"unavailable\",\"register_url\":\"https://domai.nr/facetwe.et/register\"},{\"domain\":\"fac.et\",\"host\":\"\",\"subdomain\":\"fac.et\",\"path\":\"/weet\",\"availability\":\"unavailable\",\"register_url\":\"https://domai.nr/fac.et/register\"},{\"domain\":\"f.ac\",\"host\":\"\",\"subdomain\":\"f.ac\",\"path\":\"/etweet\",\"availability\":\"taken\",\"register_url\":\"https://domai.nr/f.ac/register\"}]}"
|
99
|
-
http_version:
|
100
|
-
recorded_at: Tue, 11 Feb 2014 08:23:43 GMT
|
101
|
-
recorded_with: VCR 2.8.0
|
data/spec/domain_finder_spec.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
describe DomainFinder, :vcr do
|
2
|
-
|
3
|
-
it 'GETs domains from registrar' do
|
4
|
-
expect(DomainFinder::search(['thezets'])).to eq ["x thezets.com", "o thezets.net", "o thezets.org", "o thezets.co",
|
5
|
-
"o thezets.io", "o thezets.me", "x th", "x thez.et"]
|
6
|
-
end
|
7
|
-
|
8
|
-
it 'GETs multiple queries' do
|
9
|
-
expect(DomainFinder::search(['twitbook', 'facetweet'])).
|
10
|
-
to eq ["** twitbook **", "x twitbook.com", "x twitbook.net","o twitbook.org", "o twitbook.co",
|
11
|
-
"o twitbook.io", "o twitbook.me", "o twit.bo", "? twit.book", "x tw", "x twit.boo", "x tw.it",
|
12
|
-
"** facetweet **", "x facetweet.com", "x facetweet.net", "o facetweet.org", "x facetweet.co",
|
13
|
-
"o facetweet.io", "x facetweet.me", "o facetw.ee", "? face.tw", "x facetwe.et", "x fac.et", "x f.ac"]
|
14
|
-
|
15
|
-
end
|
16
|
-
|
17
|
-
it 'raises an error if the API response code is unexpected (not 200 or 400)' do
|
18
|
-
stub_request(:get, "https://domai.nr/api/json/search?q=thezets").to_return(status: 500, body: '', headers: {})
|
19
|
-
expect{DomainFinder::search(['thezets'])}.to raise_error(RuntimeError, "Error 500 while accessing domain registrar")
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
data/spec/spec_helper.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
require 'domain_finder'
|
2
|
-
require 'vcr'
|
3
|
-
require 'webmock/rspec'
|
4
|
-
|
5
|
-
VCR.configure do |c|
|
6
|
-
c.cassette_library_dir = 'spec/cassettes'
|
7
|
-
c.hook_into :webmock
|
8
|
-
c.configure_rspec_metadata!
|
9
|
-
c.default_cassette_options[:record] = :new_episodes
|
10
|
-
end
|
11
|
-
|
12
|
-
RSpec.configure do |c|
|
13
|
-
c.treat_symbols_as_metadata_keys_with_true_values = true
|
14
|
-
|
15
|
-
c.expect_with :rspec do |c|
|
16
|
-
c.syntax = :expect
|
17
|
-
end
|
18
|
-
end
|