domainr 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/domainr/version.rb +1 -1
- data/lib/domainr.rb +3 -3
- data/spec/spec_helper.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bf2a895932dc0a644e69b58273546a8c5b80b27
|
4
|
+
data.tar.gz: c04c463acfb2dfd58820bb802073c2a692d0b723
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61709312a0d83ba43dbb689130dab896e93d59a69afe8a087efb09d1cb86eaa326d50046293a90c537cc91f0940d755fc5b435cb0b3670c50edd4f104fc2a5e7
|
7
|
+
data.tar.gz: 8d3a9dcb449994ab51645cdfa8ba5c241a5f2049be5f984e6af9523ef36e2dfcd38393c8defdd1a441fd2c25934f7ea4a29c6f1fec45c92aa2c7a016fa120ef3
|
data/README.md
CHANGED
data/lib/domainr/version.rb
CHANGED
data/lib/domainr.rb
CHANGED
@@ -6,7 +6,7 @@ module Domainr
|
|
6
6
|
|
7
7
|
include HTTParty
|
8
8
|
format :json
|
9
|
-
base_uri 'domainr.com'
|
9
|
+
base_uri 'https://api.domainr.com'
|
10
10
|
|
11
11
|
def self.client_id=(id)
|
12
12
|
@client_id = id
|
@@ -18,12 +18,12 @@ module Domainr
|
|
18
18
|
|
19
19
|
def search(term)
|
20
20
|
options = { :q => term, :client_id => client_id }
|
21
|
-
Hashie::Mash.new(get('/
|
21
|
+
Hashie::Mash.new(get('/v1/search', { :query => options }))
|
22
22
|
end
|
23
23
|
|
24
24
|
def info(domain)
|
25
25
|
options = { :q => domain, :client_id => client_id }
|
26
|
-
Hashie::Mash.new(get('/
|
26
|
+
Hashie::Mash.new(get('/v1/info', { :query => options }))
|
27
27
|
end
|
28
28
|
|
29
29
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -12,10 +12,10 @@ require 'domainr'
|
|
12
12
|
|
13
13
|
FakeWeb.allow_net_connect = false
|
14
14
|
|
15
|
-
FakeWeb.register_uri(:get, "
|
16
|
-
FakeWeb.register_uri(:get, "
|
17
|
-
FakeWeb.register_uri(:get, "
|
18
|
-
FakeWeb.register_uri(:get, "
|
15
|
+
FakeWeb.register_uri(:get, "https://api.domainr.com/v1/info?q=domai.nr&client_id=domainr_rubygem", :response => File.join(File.dirname(__FILE__), 'fixtures', 'info.json'), :content_type => "text/javascript+json; charset=utf-8", :status => ["200", "OK"])
|
16
|
+
FakeWeb.register_uri(:get, "https://api.domainr.com/v1/info?q=d&client_id=domainr_rubygem", :response => File.join(File.dirname(__FILE__), 'fixtures', 'empty_info.json'), :content_type => "text/javascript+json; charset=utf-8", :status => ["200", "OK"])
|
17
|
+
FakeWeb.register_uri(:get, "https://api.domainr.com/v1/search?q=domainr&client_id=domainr_rubygem", :response => File.join(File.dirname(__FILE__), 'fixtures', 'search.json'), :content_type => "text/javascript+json; charset=utf-8", :status => ["200", "OK"])
|
18
|
+
FakeWeb.register_uri(:get, "https://api.domainr.com/v1/search?q=&client_id=domainr_rubygem", :response => File.join(File.dirname(__FILE__), 'fixtures', 'empty_search.json'), :content_type => "text/javascript+json; charset=utf-8", :status => ["200", "OK"])
|
19
19
|
|
20
20
|
RSpec.configure do |config|
|
21
21
|
config.order = :random
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: domainr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Agalloco
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|