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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b9fd4a7e795248e243dea1dee296dead465d6d12
4
- data.tar.gz: 9d2a99a60ac49a17327fd6bbe357568b207ca0fd
3
+ metadata.gz: 1cab0068423542a42926b2b0a56312f9410dba18
4
+ data.tar.gz: daa1b2a29efdb94eed0d37ec1cb520dcbbb3dada
5
5
  SHA512:
6
- metadata.gz: ff6d9c0a9c8520a9e7dbcc2cfe53e60aaae1631dc85a9554e3db8d994b2b378043cac4163f783f52be7a439540158e1dfa55f6fa8d46a2e0c009e4367b218c0e
7
- data.tar.gz: 93ae324d45583d1e94222718c2c274c4cf98cc912b8c7f053f5dae21058cf87f014197e87551776ff21ec0bc20a613c02895314ce9c84f8438a376c8466b8ef9
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.1.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.7.7)
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
@@ -28,4 +28,5 @@ Gem::Specification.new do |spec|
28
28
  spec.add_development_dependency 'coveralls', '~> 0'
29
29
  spec.add_development_dependency 'vcr', '~> 2'
30
30
  spec.add_development_dependency 'webmock', '~> 1'
31
+ spec.add_development_dependency 'byebug'
31
32
  end
@@ -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, :args,
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
- RestClient::Request.new(args).execute
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)
@@ -1,4 +1,4 @@
1
1
  # Gem version
2
2
  module ContactData
3
- VERSION = '0.2.0'
3
+ VERSION = '0.2.1'
4
4
  end
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.0
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-08-27 00:00:00.000000000 Z
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