white_pages 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +1 -0
- data/.travis.yml +1 -0
- data/lib/white_pages.rb +5 -9
- data/lib/white_pages/client.rb +6 -3
- data/white_pages.gemspec +4 -6
- metadata +60 -60
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YWNhMjczZTlkY2EzMzU2NTU3MTM5YWUyZTI3ZjcyMWQwNDFmZGIxMQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NmQ1ZmE0MGY4NGNiNjYyZjY1ODk4NTAwMWFiYTQyZDk2MGI4M2MyZA==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MjMwZmFkMTA1NzU3NDBjZDRmYzc1NDVmYmQzMDFjMmI1MDFiYzY3Mzg5Y2Ni
|
10
|
+
ZDZmNDY3OTc2ZDRiYzJkN2EwOWMyNTVlNDUyYzI5NjlmZjZjZjU2YTkxYWRi
|
11
|
+
ZGE1M2VjYWQ1MjUzZjQ5MDg3ZmY0ZTdhNmZhYzlkNWYwZDYxMzg=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MmNhN2I2ODgxZTQ5ZWE0YmQ0MWRmMzQ1NWFjZTRiZGNkNGNlMzQ1NTFlMjJh
|
14
|
+
YzhlZTM3ZDU4ZmJkMzc1Mjc0OWJjMTVjYzliMDlhZTMwNGJjMzdjZjA5ODQ0
|
15
|
+
MGIzNjA0MDA3NGE0NmRiYmZkZjQ1NjMzNDUyNWI0NjFiZjA2YWU=
|
data/.gitignore
CHANGED
data/.travis.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm: 1.9.2
|
data/lib/white_pages.rb
CHANGED
@@ -1,30 +1,26 @@
|
|
1
|
-
require '
|
2
|
-
require 'httparty'
|
1
|
+
require 'white_pages/client'
|
3
2
|
|
4
3
|
module WhitePages
|
5
|
-
VERSION = "0.0.1"
|
6
4
|
|
7
5
|
class WhitePagesError < StandardError; end
|
8
6
|
|
9
|
-
autoload :Client, 'white_pages/client'
|
10
|
-
|
11
7
|
class << self
|
12
8
|
attr_accessor :api_key
|
13
9
|
end
|
14
10
|
|
15
11
|
def self.find_person(options)
|
16
|
-
Client.new
|
12
|
+
Client.new.find_person(options)
|
17
13
|
end
|
18
14
|
|
19
15
|
def self.find_business(options)
|
20
|
-
Client.new
|
16
|
+
Client.new.find_business(options)
|
21
17
|
end
|
22
18
|
|
23
19
|
def self.reverse_address(options)
|
24
|
-
Client.new
|
20
|
+
Client.new.reverse_address(options)
|
25
21
|
end
|
26
22
|
|
27
23
|
def self.reverse_phone(options)
|
28
|
-
Client.new
|
24
|
+
Client.new.reverse_phone(options)
|
29
25
|
end
|
30
26
|
end
|
data/lib/white_pages/client.rb
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
require 'hashie'
|
2
|
+
require 'httparty'
|
3
|
+
|
1
4
|
module WhitePages
|
2
5
|
class Client
|
3
6
|
include HTTParty
|
@@ -97,9 +100,9 @@ module WhitePages
|
|
97
100
|
options.merge!(api_key: WhitePages.api_key, outputtype: 'JSON')
|
98
101
|
response = self.class.get("/#{method}/#{version}", query: options)
|
99
102
|
case response.code
|
100
|
-
when
|
101
|
-
else
|
102
|
-
end
|
103
|
+
when 200 then Hashie::Mash.new(response)
|
104
|
+
else raise WhitePagesError.new(response.headers['x-mashery-error-code'])
|
105
|
+
end
|
103
106
|
end
|
104
107
|
end
|
105
108
|
end
|
data/white_pages.gemspec
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
$:.push File.expand_path("../lib", __FILE__)
|
3
|
-
require "white_pages"
|
4
3
|
|
5
4
|
Gem::Specification.new do |s|
|
6
5
|
s.name = "white_pages"
|
7
|
-
s.version =
|
6
|
+
s.version = '0.0.2'
|
8
7
|
s.platform = Gem::Platform::RUBY
|
9
8
|
s.authors = ["kris"]
|
10
9
|
s.email = ["kris@octohq.com"]
|
@@ -13,10 +12,9 @@ Gem::Specification.new do |s|
|
|
13
12
|
s.description = %q{Simple interface to WhitePages API}
|
14
13
|
|
15
14
|
s.rubyforge_project = "white_pages"
|
16
|
-
|
17
|
-
s.add_dependency "hashie"
|
18
|
-
s.add_dependency "httparty"
|
19
|
-
|
15
|
+
|
16
|
+
s.add_dependency "hashie", "~> 2.0.5"
|
17
|
+
s.add_dependency "httparty", "~> 0.11.0"
|
20
18
|
s.add_development_dependency("rspec", "~> 2.0.1")
|
21
19
|
|
22
20
|
s.files = `git ls-files`.split("\n")
|
metadata
CHANGED
@@ -1,64 +1,68 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: white_pages
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 0.0.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
6
5
|
platform: ruby
|
7
|
-
authors:
|
6
|
+
authors:
|
8
7
|
- kris
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2013-07-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
17
14
|
name: hashie
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version: "0"
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.0.5
|
25
20
|
type: :runtime
|
26
|
-
version_requirements: *id001
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: httparty
|
29
21
|
prerelease: false
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.0.5
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: httparty
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.11.0
|
36
34
|
type: :runtime
|
37
|
-
version_requirements: *id002
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: rspec
|
40
35
|
prerelease: false
|
41
|
-
|
42
|
-
|
43
|
-
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.11.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
44
45
|
- - ~>
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
+
- !ruby/object:Gem::Version
|
46
47
|
version: 2.0.1
|
47
48
|
type: :development
|
48
|
-
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.0.1
|
49
55
|
description: Simple interface to WhitePages API
|
50
|
-
email:
|
56
|
+
email:
|
51
57
|
- kris@octohq.com
|
52
58
|
executables: []
|
53
|
-
|
54
59
|
extensions: []
|
55
|
-
|
56
60
|
extra_rdoc_files: []
|
57
|
-
|
58
|
-
files:
|
61
|
+
files:
|
59
62
|
- .gitignore
|
60
63
|
- .rspec
|
61
64
|
- .rvmrc
|
65
|
+
- .travis.yml
|
62
66
|
- Gemfile
|
63
67
|
- LICENSE
|
64
68
|
- README
|
@@ -68,34 +72,30 @@ files:
|
|
68
72
|
- spec/spec_helper.rb
|
69
73
|
- spec/white_pages_spec.rb
|
70
74
|
- white_pages.gemspec
|
71
|
-
|
72
|
-
homepage: ""
|
75
|
+
homepage: ''
|
73
76
|
licenses: []
|
74
|
-
|
77
|
+
metadata: {}
|
75
78
|
post_install_message:
|
76
79
|
rdoc_options: []
|
77
|
-
|
78
|
-
require_paths:
|
80
|
+
require_paths:
|
79
81
|
- lib
|
80
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
version: "0"
|
82
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ! '>='
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ! '>='
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
92
|
requirements: []
|
93
|
-
|
94
93
|
rubyforge_project: white_pages
|
95
|
-
rubygems_version:
|
94
|
+
rubygems_version: 2.0.5
|
96
95
|
signing_key:
|
97
|
-
specification_version:
|
96
|
+
specification_version: 4
|
98
97
|
summary: Simple interface to WhitePages API
|
99
|
-
test_files:
|
98
|
+
test_files:
|
100
99
|
- spec/spec_helper.rb
|
101
100
|
- spec/white_pages_spec.rb
|
101
|
+
has_rdoc:
|