contact-data 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +11 -3
- data/contact-data.gemspec +1 -0
- data/lib/contact-data/fetcher.rb +7 -2
- data/lib/contact-data/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cab0068423542a42926b2b0a56312f9410dba18
|
4
|
+
data.tar.gz: daa1b2a29efdb94eed0d37ec1cb520dcbbb3dada
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0faf6f889688acf0b44613ad59d2100e09c159cc5ae14dd2f0b8807d3434803d603ea6511d2552373a2e352cfdf4b3e59f0d0ed55e3bf648e5b8259983f37cf2
|
7
|
+
data.tar.gz: 1484b54086c2a71b5e86f4c11570480eb8c45c078ccdc7def5729e5c1de49075bd13d4c1de679b9f79cd1c37dff319d2b89f59d24cb27dd2126dbdf7a64efb98
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
contact-data (0.
|
4
|
+
contact-data (0.2.0)
|
5
5
|
addressable (~> 2.3)
|
6
6
|
rest-client (~> 1)
|
7
7
|
|
@@ -9,6 +9,11 @@ GEM
|
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
11
|
addressable (2.3.6)
|
12
|
+
byebug (3.5.1)
|
13
|
+
columnize (~> 0.8)
|
14
|
+
debugger-linecache (~> 1.2)
|
15
|
+
slop (~> 3.6)
|
16
|
+
columnize (0.8.9)
|
12
17
|
coveralls (0.7.0)
|
13
18
|
multi_json (~> 1.3)
|
14
19
|
rest-client
|
@@ -17,12 +22,13 @@ GEM
|
|
17
22
|
thor
|
18
23
|
crack (0.4.2)
|
19
24
|
safe_yaml (~> 1.0.0)
|
25
|
+
debugger-linecache (1.2.0)
|
20
26
|
diff-lcs (1.2.5)
|
21
27
|
docile (1.1.5)
|
22
28
|
gem-release (0.7.3)
|
23
|
-
mime-types (2.3)
|
29
|
+
mime-types (2.4.3)
|
24
30
|
multi_json (1.10.1)
|
25
|
-
netrc (0.
|
31
|
+
netrc (0.8.0)
|
26
32
|
rake (10.3.2)
|
27
33
|
rest-client (1.7.2)
|
28
34
|
mime-types (>= 1.16, < 3.0)
|
@@ -41,6 +47,7 @@ GEM
|
|
41
47
|
multi_json
|
42
48
|
simplecov-html (~> 0.8.0)
|
43
49
|
simplecov-html (0.8.0)
|
50
|
+
slop (3.6.0)
|
44
51
|
term-ansicolor (1.3.0)
|
45
52
|
tins (~> 1.0)
|
46
53
|
thor (0.19.1)
|
@@ -55,6 +62,7 @@ PLATFORMS
|
|
55
62
|
|
56
63
|
DEPENDENCIES
|
57
64
|
bundler (~> 1)
|
65
|
+
byebug
|
58
66
|
contact-data!
|
59
67
|
coveralls (~> 0)
|
60
68
|
gem-release (~> 0)
|
data/contact-data.gemspec
CHANGED
data/lib/contact-data/fetcher.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require 'rest-client'
|
3
|
+
require 'contact-data/exception'
|
3
4
|
|
4
5
|
module ContactData
|
5
6
|
class Fetcher
|
@@ -55,13 +56,17 @@ module ContactData
|
|
55
56
|
|
56
57
|
[
|
57
58
|
:method, :url, :headers, :cookies, :payload, :user, :password, :timeout,
|
58
|
-
:max_redirects, :open_timeout, :raw_response, :processed_headers,
|
59
|
+
:max_redirects, :open_timeout, :raw_response, :processed_headers,
|
59
60
|
:ssl_opts, :verify_ssl, :ssl_client_cert, :ssl_client_key, :ssl_ca_file,
|
60
61
|
:ssl_ca_path, :ssl_cert_store, :ssl_verify_callback,
|
61
62
|
:ssl_verify_callback_warnings, :ssl_version, :ssl_ciphers
|
62
63
|
].each { |key| args[key] = options[key] if options.key? key }
|
63
64
|
|
64
|
-
|
65
|
+
begin
|
66
|
+
RestClient::Request.new(args).execute
|
67
|
+
rescue RestClient::Exception => e
|
68
|
+
raise ContactData::FetchError, "#{e.message} when trying to #{method.to_s.upcase} url: #{url}", e.backtrace
|
69
|
+
end
|
65
70
|
end
|
66
71
|
|
67
72
|
def parse(json)
|
data/lib/contact-data/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contact-data
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Xenapto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -156,6 +156,20 @@ dependencies:
|
|
156
156
|
- - "~>"
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: '1'
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: byebug
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '0'
|
159
173
|
description: A Ruby gem to retrieve data about people and organizations from http://public.xenapto.com
|
160
174
|
email:
|
161
175
|
- developers@xenapto.com
|