contact-data 0.4.1 → 0.4.2

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: a24d10ebb4542f7ee1364a9088cb0ef2118d8766
4
- data.tar.gz: edb4ff8571185a8924a63537125321393a63e241
3
+ metadata.gz: 5c0323cd517654462549ac589fec8dcbab71174b
4
+ data.tar.gz: fb30d5f2babc58b1c66fb2bd6f02934b5ff929ff
5
5
  SHA512:
6
- metadata.gz: 57daed5ea129024c8d4b19db2e3240129a8ea0dd40f97e665bec9a928b4ea18e1a4789b45e3eef42e8bf3cf81a5f4a504c6edd061653cc1a201a448b71f71825
7
- data.tar.gz: 076a3e302cb6d3828a409d2dfdb8293a37cdeab85b897784b33cacd3b917da8ad06b16f02d06bf1d1f8dd7e2a714eff2e83a79a56fb5d6a289e868f024090ad8
6
+ metadata.gz: 4d93463479baf4139ae80c58e34efcaf34cbd0fb8315a3e915279cb51b6b917b6e642e0038f8081e959783f80a47d6ef735f8f91f5249cbb085aa931e682b861
7
+ data.tar.gz: 9bf4563078d7b630de1ecb02c61868db83e24e87c1efa90d21df56c538d25d448ceba7498565e4e8e29e3c2a35049870f4565bb033d6a27437b7e041c04c4c60
data/.coveralls.yml ADDED
@@ -0,0 +1,3 @@
1
+ notify:
2
+ webhooks:
3
+ - url: https://coveralls.io/webhook?repo_token=eM9kX6uXHQQVaRCL3Oerbfn7BLuifapdU
data/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # The contact-data gem
2
2
 
3
3
  ![Gem Version](http://img.shields.io/gem/v/contact-data.svg?style=flat) [![Code Climate](http://img.shields.io/codeclimate/github/Xenapto/contact-data.svg?style=flat)](https://codeclimate.com/github/Xenapto/contact-data) [![Coverage Status](https://img.shields.io/coveralls/Xenapto/contact-data.svg?style=flat)](https://coveralls.io/r/Xenapto/contact-data?branch=master)
4
- [![Developer status](http://img.shields.io/badge/developer-awesome-brightgreen.svg?style=flat)](http://xenapto.com)
5
- ![build status](https://circleci.com/gh/Xenapto/contact-data.png?circle-token=4c6f3dcc1912d30c8d903ae767f0beee94d9b4e2)
4
+ [![security](https://hakiri.io/github/Xenapto/contact-data/develop.svg)](https://hakiri.io/github/Xenapto/contact-data/develop)
5
+ ![build status](https://circleci.com/gh/Xenapto/contact-data.png?style=shield&circle-token=4c6f3dcc1912d30c8d903ae767f0beee94d9b4e2)
6
+ [![Developer status](http://img.shields.io/badge/developer-awesome-brightgreen.svg)](http://xenapto.com)
6
7
 
7
8
  Retrieves information about people and organizations from http://public.xenapto.com
8
9
 
@@ -9,7 +9,7 @@ module ContactData
9
9
  attr_reader :http_method, :api_method, :options
10
10
 
11
11
  URL = ENV['XENDATA_URL'] || 'http://public.xenapto.com'
12
- API = 'api/v2'
12
+ API = 'api/v2'.freeze
13
13
 
14
14
  LOGLEVEL = Logger::WARN
15
15
 
@@ -28,13 +28,7 @@ module ContactData
28
28
 
29
29
  def url
30
30
  return @url if @url
31
-
32
- if api_method.is_a?(String)
33
- @url = "#{url_base}/#{api_method}"
34
- else
35
- @url = "#{api_base}/#{method_base}#{api_method}"
36
- end
37
-
31
+ @url = api_method.is_a?(String) ? "#{url_base}/#{api_method}" : "#{api_base}/#{method_base}#{api_method}"
38
32
  @url = "#{@url}.#{options[:format] || :json}" unless options[:noformat]
39
33
  @url
40
34
  end
@@ -68,7 +62,7 @@ module ContactData
68
62
  return @json if @json
69
63
  logger.info { "Using #{display_method} for #{url}" }
70
64
  @json = RestClient::Request.new(args).execute
71
- rescue RestClient::Exception => e
65
+ rescue RestClient::Exception, SocketError => e
72
66
  raise ContactData::FetchError, "#{e.message} when trying to #{display_method} url: #{url}", e.backtrace
73
67
  end
74
68
 
@@ -1,4 +1,4 @@
1
1
  # Gem version
2
2
  module ContactData
3
- VERSION = '0.4.1'
3
+ VERSION = '0.4.2'.freeze
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.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xenapto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-24 00:00:00.000000000 Z
11
+ date: 2016-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -213,6 +213,7 @@ executables: []
213
213
  extensions: []
214
214
  extra_rdoc_files: []
215
215
  files:
216
+ - ".coveralls.yml"
216
217
  - ".env"
217
218
  - ".gitignore"
218
219
  - ".hound.yml"