netprospex-ruby 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +4 -0
- data/fixtures/cassettes/acl-error.yml +45 -0
- data/fixtures/cassettes/auth-error.yml +45 -0
- data/fixtures/cassettes/incomplete-organization.yml +55 -0
- data/fixtures/cassettes/incomplete-person.yml +52 -0
- data/fixtures/cassettes/industries.yml +136 -0
- data/fixtures/cassettes/pag-error.yml +45 -0
- data/fixtures/cassettes/person-by-email.yml +55 -0
- data/fixtures/cassettes/person-by-id.yml +55 -0
- data/fixtures/cassettes/person-list.yml +619 -0
- data/fixtures/cassettes/req-error.yml +45 -0
- data/lib/netprospex.rb +8 -0
- data/lib/netprospex/api/address.rb +9 -0
- data/lib/netprospex/api/organization.rb +10 -0
- data/lib/netprospex/api/person.rb +10 -0
- data/lib/netprospex/api/phone.rb +9 -0
- data/lib/netprospex/api/sub_objects.rb +52 -0
- data/lib/netprospex/client.rb +53 -0
- data/lib/netprospex/configuration.rb +28 -0
- data/lib/netprospex/exceptions.rb +13 -0
- data/lib/netprospex/helpers/formatters.rb +67 -0
- data/lib/netprospex/middleware/raise_exceptions.rb +34 -0
- data/lib/netprospex/middleware/rubyize.rb +16 -0
- data/lib/netprospex/query_methods.rb +41 -0
- data/lib/netprospex/version.rb +3 -0
- data/netprospex.gemspec +31 -0
- data/spec/netprospex/api/organization_spec.rb +51 -0
- data/spec/netprospex/api/person_spec.rb +45 -0
- data/spec/netprospex/client_spec.rb +34 -0
- data/spec/netprospex/configuration_spec.rb +21 -0
- data/spec/netprospex/helpers/formatters_spec.rb +78 -0
- data/spec/netprospex/middleware/raise_exceptions_spec.rb +92 -0
- data/spec/netprospex/query_methods_spec.rb +68 -0
- data/spec/netprospex_spec.rb +5 -0
- data/spec/spec_helper.rb +7 -0
- data/spec/vcr_helper.rb +12 -0
- metadata +236 -0
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'vcr_helper'
|
3
|
+
require_relative '../../../lib/netprospex.rb'
|
4
|
+
|
5
|
+
describe NetProspex::Api::Organization do
|
6
|
+
before(:each) do
|
7
|
+
NetProspex.configure do |c|
|
8
|
+
c.consumer_key = ENV['NETPROSPEX_KEY']
|
9
|
+
c.consumer_secret = ENV['NETPROSPEX_SECRET']
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
let(:client) { NetProspex::Client.new(ENV['NETPROSPEX_USER_TOKEN'], ENV['NETPROSPEX_USER_SECRET']) }
|
14
|
+
let(:person) {
|
15
|
+
VCR.use_cassette("person-by-id") do
|
16
|
+
client.find_person_by_id(29435533)
|
17
|
+
end
|
18
|
+
}
|
19
|
+
let(:organization) { person.organization }
|
20
|
+
|
21
|
+
it "simplifies domains to an array" do
|
22
|
+
organization.domains.should be_an Array
|
23
|
+
organization.domains.first.should be_a String
|
24
|
+
end
|
25
|
+
|
26
|
+
it "converts phones to objects" do
|
27
|
+
organization.phones.should be_an Array
|
28
|
+
organization.phones.first.should be_a NetProspex::Api::Phone
|
29
|
+
end
|
30
|
+
|
31
|
+
it "converts address to an object" do
|
32
|
+
organization.postal_address.should be_a NetProspex::Api::Address
|
33
|
+
end
|
34
|
+
|
35
|
+
context "when missing data" do
|
36
|
+
let(:incomplete_organization) {
|
37
|
+
VCR.use_cassette("incomplete-organization") do
|
38
|
+
client.find_person_by_id(85652828).organization
|
39
|
+
end
|
40
|
+
}
|
41
|
+
|
42
|
+
it "has nil address" do
|
43
|
+
incomplete_organization.postal_address.should be_nil
|
44
|
+
end
|
45
|
+
|
46
|
+
it "has empty phones array" do
|
47
|
+
incomplete_organization.phones.should be_an Array
|
48
|
+
incomplete_organization.phones.should be_empty
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'vcr_helper'
|
3
|
+
require_relative '../../../lib/netprospex.rb'
|
4
|
+
|
5
|
+
describe NetProspex::Api::Person do
|
6
|
+
before(:each) do
|
7
|
+
NetProspex.configure do |c|
|
8
|
+
c.consumer_key = ENV['NETPROSPEX_KEY']
|
9
|
+
c.consumer_secret = ENV['NETPROSPEX_SECRET']
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
let(:client) { NetProspex::Client.new(ENV['NETPROSPEX_USER_TOKEN'], ENV['NETPROSPEX_USER_SECRET']) }
|
14
|
+
let(:person) {
|
15
|
+
VCR.use_cassette("person-by-id") do
|
16
|
+
client.find_person_by_id(29435533)
|
17
|
+
end
|
18
|
+
}
|
19
|
+
|
20
|
+
it "converts organization to an object" do
|
21
|
+
person.organization.should be_a NetProspex::Api::Organization
|
22
|
+
end
|
23
|
+
|
24
|
+
it "converts phones to objects" do
|
25
|
+
person.phones.should be_an Array
|
26
|
+
person.phones.first.should be_a NetProspex::Api::Phone
|
27
|
+
end
|
28
|
+
|
29
|
+
it "converts address to an object" do
|
30
|
+
person.postal_address.should be_a NetProspex::Api::Address
|
31
|
+
end
|
32
|
+
|
33
|
+
context "when missing data" do
|
34
|
+
let(:incomplete_person) {
|
35
|
+
VCR.use_cassette("incomplete-person") do
|
36
|
+
client.find_people(organization_name: "Pardot", preview: true, limit: 1).first
|
37
|
+
end
|
38
|
+
}
|
39
|
+
|
40
|
+
it "has empty phones array" do
|
41
|
+
incomplete_person.phones.should be_an Array
|
42
|
+
incomplete_person.phones.should be_empty
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "vcr_helper"
|
3
|
+
require_relative "../../lib/netprospex.rb"
|
4
|
+
|
5
|
+
describe NetProspex::Client do
|
6
|
+
before(:each) do
|
7
|
+
NetProspex.configure do |c|
|
8
|
+
c.consumer_key = ENV['NETPROSPEX_KEY']
|
9
|
+
c.consumer_secret = ENV['NETPROSPEX_SECRET']
|
10
|
+
end
|
11
|
+
end
|
12
|
+
after(:each) { NetProspex.reset }
|
13
|
+
|
14
|
+
let(:client) { NetProspex::Client.new(ENV['NETPROSPEX_USER_TOKEN'], ENV['NETPROSPEX_USER_SECRET']) }
|
15
|
+
|
16
|
+
it "builds the version into the api url" do
|
17
|
+
NetProspex.configure { |c| c.version = "9.9" }
|
18
|
+
stub = stub_request(:get, %r(api\.netprospex\.com/9\.9/.*)).to_return(body: '{"response":{}}', headers: {'Content-Type' => 'application/json'})
|
19
|
+
client.get("/industries.json")
|
20
|
+
stub.should have_been_requested
|
21
|
+
end
|
22
|
+
|
23
|
+
it "makes GET requests" do
|
24
|
+
VCR.use_cassette("industries") do
|
25
|
+
client.get("/industries.json")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
it "makes GET requests with fancy parameters" do
|
30
|
+
VCR.use_cassette("person-list") do
|
31
|
+
client.get("/person/list.json", organization_name: ["Pardot", "Silverpop"])
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require_relative "../../lib/netprospex.rb"
|
3
|
+
|
4
|
+
describe NetProspex::Configuration do
|
5
|
+
after(:each) { NetProspex.reset }
|
6
|
+
|
7
|
+
it "can be configured" do
|
8
|
+
expect {
|
9
|
+
NetProspex.configure do |config|
|
10
|
+
config.consumer_key = "foo"
|
11
|
+
config.consumer_secret = "bar"
|
12
|
+
config.version = "1.1"
|
13
|
+
end
|
14
|
+
}.to_not raise_exception
|
15
|
+
end
|
16
|
+
|
17
|
+
it "stores the api version" do
|
18
|
+
NetProspex.configure { |config| config.version = "9.9" }
|
19
|
+
NetProspex.version.should == "9.9"
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require_relative "../../../lib/netprospex.rb"
|
3
|
+
|
4
|
+
describe NetProspex::Helpers::Formatters do
|
5
|
+
include NetProspex::Helpers::Formatters
|
6
|
+
describe ".unrubyize_keys" do
|
7
|
+
it "converts snake_case to camelCase" do
|
8
|
+
unrubyize_keys(first_name: "John", last_name: "Doe").should == {
|
9
|
+
'firstName' => 'John',
|
10
|
+
'lastName' => 'Doe'
|
11
|
+
}
|
12
|
+
end
|
13
|
+
|
14
|
+
it "handles nested hashes" do
|
15
|
+
unrubyize_keys(some_person: {first_name: "John", last_name: "Doe"}).should ==
|
16
|
+
{'somePerson' => {'firstName' => 'John', 'lastName' => 'Doe'}}
|
17
|
+
end
|
18
|
+
|
19
|
+
it "handles array values" do
|
20
|
+
unrubyize_keys(some_people: [
|
21
|
+
{first_name: "John", last_name: "Doe"},
|
22
|
+
{first_name: "Mary", last_name: "Smith"}
|
23
|
+
]).should == {'somePeople' => [
|
24
|
+
{'firstName' => 'John', 'lastName' => 'Doe'},
|
25
|
+
{'firstName' => 'Mary', 'lastName' => 'Smith'}
|
26
|
+
]}
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe ".rubyize_keys" do
|
31
|
+
it "converts camelCase to snake_case" do
|
32
|
+
rubyize_keys({
|
33
|
+
'firstName' => 'John',
|
34
|
+
'lastName' => 'Doe'
|
35
|
+
}).should == {first_name: "John", last_name: "Doe"}
|
36
|
+
end
|
37
|
+
|
38
|
+
it "handles nested hashes" do
|
39
|
+
rubyize_keys({'somePerson' =>
|
40
|
+
{'firstName' => 'John', 'lastName' => 'Doe'}}).should ==
|
41
|
+
{some_person: {first_name: "John", last_name: "Doe"}}
|
42
|
+
end
|
43
|
+
|
44
|
+
it "handles array values" do
|
45
|
+
rubyize_keys({'somePeople' => [
|
46
|
+
{'firstName' => 'John', 'lastName' => 'Doe'},
|
47
|
+
{'firstName' => 'Mary', 'lastName' => 'Smith'}
|
48
|
+
]}).should == {some_people: [
|
49
|
+
{first_name: "John", last_name: "Doe"},
|
50
|
+
{first_name: "Mary", last_name: "Smith"}
|
51
|
+
]}
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe ".stringify_query" do
|
56
|
+
it "is blank for empty query" do
|
57
|
+
stringify_query(nil).should == ""
|
58
|
+
stringify_query({}).should == ""
|
59
|
+
end
|
60
|
+
|
61
|
+
it "converts snake_case keys to camelCase" do
|
62
|
+
stringify_query(first_name: "John", last_name: "Doe").should ==
|
63
|
+
"?firstName=John&lastName=Doe"
|
64
|
+
end
|
65
|
+
|
66
|
+
it "escapes keys and values" do
|
67
|
+
stringify_query('be safe?&=' => 'foo').should ==
|
68
|
+
"?be+safe%3F%26%3D=foo"
|
69
|
+
stringify_query(first_name: "John&doEvil=true").should ==
|
70
|
+
"?firstName=John%26doEvil%3Dtrue"
|
71
|
+
end
|
72
|
+
|
73
|
+
it "handles array values" do
|
74
|
+
stringify_query(companies: ["Apple", "Google"]).should ==
|
75
|
+
"?companies%5B%5D=Apple&companies%5B%5D=Google"
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'vcr_helper'
|
3
|
+
require_relative "../../../lib/netprospex.rb"
|
4
|
+
|
5
|
+
describe NetProspex::Middleware::RaiseExceptions do
|
6
|
+
before(:each) do
|
7
|
+
NetProspex.configure do |c|
|
8
|
+
c.consumer_key = ENV['NETPROSPEX_KEY']
|
9
|
+
c.consumer_secret = ENV['NETPROSPEX_SECRET']
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
let(:client) { NetProspex::Client.new(ENV['NETPROSPEX_USER_TOKEN'], ENV['NETPROSPEX_USER_SECRET']) }
|
14
|
+
|
15
|
+
it "raises AccessDenied" do
|
16
|
+
VCR.use_cassette('acl-error') do
|
17
|
+
expect {
|
18
|
+
client.get('/prospect/profile.json', organization_name: 'Pardot')
|
19
|
+
}.to raise_exception(NetProspex::AccessDenied)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
it "raises AuthenticationError" do
|
24
|
+
VCR.use_cassette('auth-error') do
|
25
|
+
expect {
|
26
|
+
NetProspex::Client.new('bad','keys').get('/industries.json')
|
27
|
+
}.to raise_exception(NetProspex::AuthenticationError)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
it "raises PaginationError" do
|
32
|
+
VCR.use_cassette('pag-error') do
|
33
|
+
expect {
|
34
|
+
client.get('/person/list.json', organization_name: 'Pardot', offset: -1)
|
35
|
+
}.to raise_exception(NetProspex::PaginationError)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
it "raises ArgumentMissing" do
|
40
|
+
VCR.use_cassette('req-error') do
|
41
|
+
expect {
|
42
|
+
client.get('/person/list.json')
|
43
|
+
}.to raise_exception(NetProspex::ArgumentMissing)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# these are hard to produce so they're stubbed instead of VCRed
|
48
|
+
it "raises ZeroBalanceError" do
|
49
|
+
stub_request(:get, %r(api\.netprospex\.com/1\.1/person/list\.json)).to_return(body: '{"response":{"error":{"message":"zero balance","code":"ZBAL"}}}', headers: {'Content-Type' => 'application/json'})
|
50
|
+
expect {
|
51
|
+
puts client.get('/person/list.json', organization_name: 'Pardot')
|
52
|
+
}.to raise_exception(NetProspex::ZeroBalanceError)
|
53
|
+
end
|
54
|
+
|
55
|
+
it "raises DatabaseError" do
|
56
|
+
stub_request(:get, %r(api\.netprospex\.com/1\.1/person/list\.json)).to_return(body: '{"response":{"error":{"message":"database error","code":"DB"}}}', headers: {'Content-Type' => 'application/json'})
|
57
|
+
expect {
|
58
|
+
puts client.get('/person/list.json', organization_name: 'Pardot')
|
59
|
+
}.to raise_exception(NetProspex::DatabaseError)
|
60
|
+
end
|
61
|
+
|
62
|
+
it "raises SearchError" do
|
63
|
+
stub_request(:get, %r(api\.netprospex\.com/1\.1/person/list\.json)).to_return(body: '{"response":{"error":{"message":"search engine error","code":"SS"}}}', headers: {'Content-Type' => 'application/json'})
|
64
|
+
expect {
|
65
|
+
puts client.get('/person/list.json', organization_name: 'Pardot')
|
66
|
+
}.to raise_exception(NetProspex::SearchError)
|
67
|
+
end
|
68
|
+
|
69
|
+
it "raises ApiError for unknown error" do
|
70
|
+
stub_request(:get, %r(api\.netprospex\.com/1\.1/person/list\.json)).to_return(body: '{"response":{"error":{"message":"unknown error","code":"UNX"}}}', headers: {'Content-Type' => 'application/json'})
|
71
|
+
expect {
|
72
|
+
puts client.get('/person/list.json', organization_name: 'Pardot')
|
73
|
+
}.to raise_exception(NetProspex::ApiError)
|
74
|
+
end
|
75
|
+
|
76
|
+
it "raises ApiError for general error" do
|
77
|
+
stub_request(:get, %r(api\.netprospex\.com/1\.1/person/list\.json)).to_return(body: '{"response":{"error":{"message":"general error","code":"FAULT"}}}', headers: {'Content-Type' => 'application/json'})
|
78
|
+
expect {
|
79
|
+
puts client.get('/person/list.json', organization_name: 'Pardot')
|
80
|
+
}.to raise_exception(NetProspex::ApiError)
|
81
|
+
end
|
82
|
+
|
83
|
+
it "raises ApiError for version error" do
|
84
|
+
stub_request(:get, %r(api\.netprospex\.com/1\.1/person/list\.json)).to_return(
|
85
|
+
body: '{"response":{"version":"1.1","responseId":"8A3837BF-AB10-F3B4-EA19-0606207939CE","responseType":"error","request":{"startTime":"2013-09-04 09:18:21","requestType":"person_list","url":"\/1.1\/person\/list.json?firstName=Bob&lastName=Colananni&preview=1","userId":"1aebe6ed-6c79-11e2-a4df-f04da23ce7b0"},"transaction":{"accountId":"1ad39da8-6c79-11e2-a4df-f04da23ce7b0","accountStartBalance":100000,"accountEndBalance":null},"error":{"message":"invalid API version=1.1","code":"ARG"},"debug":{"requestTime":0.0185089111328}}}',
|
86
|
+
headers: {'Content-Type' => 'application/json'}
|
87
|
+
)
|
88
|
+
expect {
|
89
|
+
puts client.get('/person/list.json', organization_name: 'Pardot')
|
90
|
+
}.to raise_exception(NetProspex::ApiError)
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'vcr_helper'
|
3
|
+
require_relative "../../lib/netprospex.rb"
|
4
|
+
|
5
|
+
describe NetProspex::QueryMethods do
|
6
|
+
before(:each) do
|
7
|
+
NetProspex.configure do |c|
|
8
|
+
c.consumer_key = ENV['NETPROSPEX_KEY']
|
9
|
+
c.consumer_secret = ENV['NETPROSPEX_SECRET']
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
let(:client) { NetProspex::Client.new(ENV['NETPROSPEX_USER_TOKEN'], ENV['NETPROSPEX_USER_SECRET']) }
|
14
|
+
|
15
|
+
describe "#find_person_by_id" do
|
16
|
+
it "gets a person" do
|
17
|
+
VCR.use_cassette("person-by-id") do
|
18
|
+
resp = client.find_person_by_id(29435533)
|
19
|
+
resp.should be_a NetProspex::Api::Person
|
20
|
+
resp.person_id.should == 29435533
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
it "stores account balance" do
|
25
|
+
VCR.use_cassette("person-by-id") do
|
26
|
+
client.account_balance.should be_nil
|
27
|
+
client.find_person_by_id(29435533)
|
28
|
+
client.account_balance.should_not be_nil
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
describe "#find_person_by_email" do
|
34
|
+
it "gets a person" do
|
35
|
+
VCR.use_cassette("person-by-email") do
|
36
|
+
resp = client.find_person_by_email("grublev@netprospex.com")
|
37
|
+
resp.should be_a NetProspex::Api::Person
|
38
|
+
resp.email.should == "grublev@netprospex.com"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
it "stores account balance" do
|
43
|
+
VCR.use_cassette("person-by-email") do
|
44
|
+
client.account_balance.should be_nil
|
45
|
+
client.find_person_by_email("grublev@netprospex.com")
|
46
|
+
client.account_balance.should_not be_nil
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
describe "#find_people" do
|
52
|
+
it "gets a list of people" do
|
53
|
+
VCR.use_cassette("person-list") do
|
54
|
+
resp = client.find_people(organization_name: ["Pardot", "Silverpop"])
|
55
|
+
resp.should be_an Array
|
56
|
+
resp.first.should be_a NetProspex::Api::Person
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
it "stores account balance" do
|
61
|
+
VCR.use_cassette("person-list") do
|
62
|
+
client.account_balance.should be_nil
|
63
|
+
client.find_people(organization_name: ["Pardot", "Silverpop"])
|
64
|
+
client.account_balance.should_not be_nil
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
data/spec/spec_helper.rb
ADDED
data/spec/vcr_helper.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require "vcr"
|
2
|
+
|
3
|
+
VCR.configure do |c|
|
4
|
+
c.cassette_library_dir = "fixtures/cassettes"
|
5
|
+
c.hook_into :webmock
|
6
|
+
c.default_cassette_options = { :record => :once }
|
7
|
+
c.configure_rspec_metadata!
|
8
|
+
c.filter_sensitive_data('<NETPROSPEX_KEY>') { ENV['NETPROSPEX_KEY'] }
|
9
|
+
c.filter_sensitive_data('<NETPROSPEX_SECRET>') { ENV['NETPROSPEX_SECRET'] }
|
10
|
+
c.filter_sensitive_data('<NETPROSPEX_USER_TOKEN>') { ENV['NETPROSPEX_USER_TOKEN'] }
|
11
|
+
c.filter_sensitive_data('<NETPROSPEX_USER_SECRET>') { ENV['NETPROSPEX_USER_SECRET'] }
|
12
|
+
end
|
metadata
ADDED
@@ -0,0 +1,236 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: netprospex-ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.3
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Michael Limiero
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-03-04 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: webmock
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: vcr
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: activesupport
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: faraday
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: faraday_middleware
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: json
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: simple_oauth
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '>='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
description: The NetProspex API provides search and lookup for detailed information
|
154
|
+
on people and companies.
|
155
|
+
email:
|
156
|
+
- mike5713@gmail.com
|
157
|
+
executables: []
|
158
|
+
extensions: []
|
159
|
+
extra_rdoc_files: []
|
160
|
+
files:
|
161
|
+
- .gitignore
|
162
|
+
- Gemfile
|
163
|
+
- LICENSE.txt
|
164
|
+
- README.md
|
165
|
+
- Rakefile
|
166
|
+
- fixtures/cassettes/acl-error.yml
|
167
|
+
- fixtures/cassettes/auth-error.yml
|
168
|
+
- fixtures/cassettes/incomplete-organization.yml
|
169
|
+
- fixtures/cassettes/incomplete-person.yml
|
170
|
+
- fixtures/cassettes/industries.yml
|
171
|
+
- fixtures/cassettes/pag-error.yml
|
172
|
+
- fixtures/cassettes/person-by-email.yml
|
173
|
+
- fixtures/cassettes/person-by-id.yml
|
174
|
+
- fixtures/cassettes/person-list.yml
|
175
|
+
- fixtures/cassettes/req-error.yml
|
176
|
+
- lib/netprospex.rb
|
177
|
+
- lib/netprospex/api/address.rb
|
178
|
+
- lib/netprospex/api/organization.rb
|
179
|
+
- lib/netprospex/api/person.rb
|
180
|
+
- lib/netprospex/api/phone.rb
|
181
|
+
- lib/netprospex/api/sub_objects.rb
|
182
|
+
- lib/netprospex/client.rb
|
183
|
+
- lib/netprospex/configuration.rb
|
184
|
+
- lib/netprospex/exceptions.rb
|
185
|
+
- lib/netprospex/helpers/formatters.rb
|
186
|
+
- lib/netprospex/middleware/raise_exceptions.rb
|
187
|
+
- lib/netprospex/middleware/rubyize.rb
|
188
|
+
- lib/netprospex/query_methods.rb
|
189
|
+
- lib/netprospex/version.rb
|
190
|
+
- netprospex.gemspec
|
191
|
+
- spec/netprospex/api/organization_spec.rb
|
192
|
+
- spec/netprospex/api/person_spec.rb
|
193
|
+
- spec/netprospex/client_spec.rb
|
194
|
+
- spec/netprospex/configuration_spec.rb
|
195
|
+
- spec/netprospex/helpers/formatters_spec.rb
|
196
|
+
- spec/netprospex/middleware/raise_exceptions_spec.rb
|
197
|
+
- spec/netprospex/query_methods_spec.rb
|
198
|
+
- spec/netprospex_spec.rb
|
199
|
+
- spec/spec_helper.rb
|
200
|
+
- spec/vcr_helper.rb
|
201
|
+
homepage: https://github.com/SalesLoft/netprospex-ruby
|
202
|
+
licenses:
|
203
|
+
- MIT
|
204
|
+
metadata: {}
|
205
|
+
post_install_message:
|
206
|
+
rdoc_options: []
|
207
|
+
require_paths:
|
208
|
+
- lib
|
209
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
210
|
+
requirements:
|
211
|
+
- - '>='
|
212
|
+
- !ruby/object:Gem::Version
|
213
|
+
version: '0'
|
214
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
215
|
+
requirements:
|
216
|
+
- - '>='
|
217
|
+
- !ruby/object:Gem::Version
|
218
|
+
version: '0'
|
219
|
+
requirements: []
|
220
|
+
rubyforge_project:
|
221
|
+
rubygems_version: 2.2.1
|
222
|
+
signing_key:
|
223
|
+
specification_version: 4
|
224
|
+
summary: Ruby bindings for NetProspex API
|
225
|
+
test_files:
|
226
|
+
- spec/netprospex/api/organization_spec.rb
|
227
|
+
- spec/netprospex/api/person_spec.rb
|
228
|
+
- spec/netprospex/client_spec.rb
|
229
|
+
- spec/netprospex/configuration_spec.rb
|
230
|
+
- spec/netprospex/helpers/formatters_spec.rb
|
231
|
+
- spec/netprospex/middleware/raise_exceptions_spec.rb
|
232
|
+
- spec/netprospex/query_methods_spec.rb
|
233
|
+
- spec/netprospex_spec.rb
|
234
|
+
- spec/spec_helper.rb
|
235
|
+
- spec/vcr_helper.rb
|
236
|
+
has_rdoc:
|