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 ADDED
@@ -0,0 +1,2 @@
1
+ rvm:
2
+ - 1.9.3
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("github", "twitter")
28
+ availability = NameChecker.check("banana", "twitter")
23
29
  availability.text
24
- #=> "github"
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
- ## Checking Hosts
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
@@ -1,2 +1,8 @@
1
1
  #!/usr/bin/env rake
2
2
  require "bundler/gem_tasks"
3
+
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
@@ -1,3 +1,3 @@
1
1
  module NameChecker
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -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
- # Add your robo whois api key here if you have one:
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 if 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.3
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-06-28 00:00:00.000000000 Z
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: &70267507510360 !ruby/object:Gem::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: *70267507510360
24
+ version_requirements: *70364801557340
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: vcr
27
- requirement: &70267507509900 !ruby/object:Gem::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: *70267507509900
35
+ version_requirements: *70364801556800
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: httparty
38
- requirement: &70267507509460 !ruby/object:Gem::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: *70267507509460
46
+ version_requirements: *70364801556160
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: whois
49
- requirement: &70267507509020 !ruby/object:Gem::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: *70267507509020
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