name_checker 0.0.3 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +2 -0
- data/README.md +19 -4
- data/Rakefile +6 -0
- data/lib/name_checker/version.rb +1 -1
- data/spec/name_checker/net_checker_spec.rb +2 -2
- data/spec/spec_helper.rb +3 -2
- metadata +11 -10
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
# NameChecker
|
2
2
|
|
3
3
|
NameChecker makes it easy to check the availability of a word across various
|
4
|
-
top-level domains and social networks.
|
4
|
+
top-level domains and social networks.
|
5
|
+
|
6
|
+
It powers checking at [Namedar.com](http://namedar.com).
|
5
7
|
|
6
8
|
## Installation
|
7
9
|
|
@@ -17,11 +19,15 @@ Or install it yourself as:
|
|
17
19
|
|
18
20
|
$ gem install name_checker
|
19
21
|
|
22
|
+
## API
|
23
|
+
|
24
|
+
availability = NameChecker.check(<WORD>, <SERVICE>)
|
25
|
+
|
20
26
|
## Usage
|
21
27
|
|
22
|
-
availability = NameChecker.check("
|
28
|
+
availability = NameChecker.check("banana", "twitter")
|
23
29
|
availability.text
|
24
|
-
#=> "
|
30
|
+
#=> "banana"
|
25
31
|
availability.available?
|
26
32
|
#=> false
|
27
33
|
|
@@ -33,7 +39,16 @@ Or install it yourself as:
|
|
33
39
|
availability.available?
|
34
40
|
#=> true
|
35
41
|
|
36
|
-
##
|
42
|
+
## Supported Social Networks
|
43
|
+
|
44
|
+
- Facebook
|
45
|
+
- Twitter
|
46
|
+
|
47
|
+
## Supported Top-level Domains
|
48
|
+
|
49
|
+
See the documentation of the [Ruby-Whois Gem](http://www.ruby-whois.org/).
|
50
|
+
|
51
|
+
## Checking Domain Availability
|
37
52
|
|
38
53
|
Domain availability checking can occur either with the [Whois Gem](http://bit.ly/KYquaW)
|
39
54
|
(default) or via the [RoboWhois API](http://bit.ly/KYqveX).
|
data/Rakefile
CHANGED
data/lib/name_checker/version.rb
CHANGED
@@ -7,9 +7,9 @@ describe NameChecker::NetChecker do
|
|
7
7
|
let(:host_name) { "apple" }
|
8
8
|
let(:tld) { ".com" }
|
9
9
|
|
10
|
-
# NOTE: This test assumes there is a ROBO_WHOIS_API_KEY
|
11
|
-
# set in spec/shec_helper.rb
|
12
10
|
it "should hit the RoboWhoisChecker if there is an api key" do
|
11
|
+
NameChecker.configuration.stub(:robo_whois_api_key) { "123" }
|
12
|
+
|
13
13
|
NameChecker::RoboWhoisChecker.should_receive(:check)
|
14
14
|
.with(host_name + tld)
|
15
15
|
subject.check(host_name, tld)
|
data/spec/spec_helper.rb
CHANGED
@@ -5,7 +5,8 @@ unless defined?(SPEC_ROOT)
|
|
5
5
|
SPEC_ROOT = File.expand_path("../", __FILE__)
|
6
6
|
end
|
7
7
|
|
8
|
-
#
|
8
|
+
# A RoboWhois API Key must b supplied in order to regenerate
|
9
|
+
# VCR casettes.
|
9
10
|
ROBO_WHOIS_API_KEY = nil
|
10
11
|
|
11
12
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
@@ -23,5 +24,5 @@ VCR.configure do |c|
|
|
23
24
|
end
|
24
25
|
|
25
26
|
NameChecker.configure do |config|
|
26
|
-
config.robo_whois_api_key = ROBO_WHOIS_API_KEY
|
27
|
+
config.robo_whois_api_key = ROBO_WHOIS_API_KEY || 'ROBO_WHOIS_API_KEY'
|
27
28
|
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.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-07-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70364801557340 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70364801557340
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: vcr
|
27
|
-
requirement: &
|
27
|
+
requirement: &70364801556800 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70364801556800
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: httparty
|
38
|
-
requirement: &
|
38
|
+
requirement: &70364801556160 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70364801556160
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: whois
|
49
|
-
requirement: &
|
49
|
+
requirement: &70364801555540 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70364801555540
|
58
58
|
description: ! ' NameChecker is a Ruby library for checking the availability of
|
59
59
|
a word across various TLDs and social networks. It was created to power http://domiy.com.
|
60
60
|
|
@@ -67,6 +67,7 @@ extra_rdoc_files: []
|
|
67
67
|
files:
|
68
68
|
- .gitignore
|
69
69
|
- .rspec
|
70
|
+
- .travis.yml
|
70
71
|
- Gemfile
|
71
72
|
- LICENSE
|
72
73
|
- README.md
|