contact-data 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32ce9c98af3dca3b721bb98c611089aad1bb4750
4
- data.tar.gz: 612c6167327a9876b34e18dfb83c59a117fefe9b
3
+ metadata.gz: 9c1c82c65ef8c8d34506b2e689b50532c6b4fc49
4
+ data.tar.gz: ddda08c9b6170f22285d02d6c835c8c872e63204
5
5
  SHA512:
6
- metadata.gz: 8ecd8aa977f67e11b150464757a94cb29fdc67b0ee7c1af0d18dc3312064cec42bae686cd8f5b3b4d4f935bd8b988dc39b1a7a30ea08438dc4f0bcdcf7887358
7
- data.tar.gz: 56b18b43da22b46d7115e35a98e07cd962391f60b0259f2e728df323c57129b3610d9957f9ca7ddf46598083002a0f8d46da068e4836bc808e6610b600001704
6
+ metadata.gz: 1ee5d3c705b684c0ed843d1545a213899953ef5f5f478667da7abe8479f1b6e378f14df1c16108d2847488bba10ff853390287c3026cc99c4f2cab5318979340
7
+ data.tar.gz: ce24b728e14339f8922772ae814f1baa0bcd47ff6339d0e04ae87cb859820acd3de492ac4288326e8349cd3a6de82e9241910c7f90055c86677af0ee696dd9ca
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- contact-data (0.0.8)
4
+ contact-data (0.0.9)
5
5
  rest-client (~> 1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # The contact-data gem
2
2
 
3
- ![Gem Version](http://img.shields.io/gem/v/contact-data.svg?style=flat) [![Coverage Status](https://img.shields.io/coveralls/Xenapto/contact-data.svg?style=flat)](https://coveralls.io/r/Xenapto/contact-data?branch=master)
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
4
  [![Developer status](http://img.shields.io/badge/developer-awesome-brightgreen.svg?style=flat)](http://xenapto.com)
5
5
  ![build status](https://circleci.com/gh/Xenapto/contact-data.png?circle-token=4c6f3dcc1912d30c8d903ae767f0beee94d9b4e2)
6
6
 
@@ -31,7 +31,7 @@ ContactData.search 'John Smith III'
31
31
  Or you can create an instance if you need to call it several times
32
32
 
33
33
  ```ruby
34
- contact_data = ContactData.new
34
+ contact_data = ContactData::Contact.new
35
35
 
36
36
  ['John Smith', 'Example Inc.', 'Crazy Ventures LLC'].each do |name|
37
37
  contact_data.search name
@@ -41,7 +41,7 @@ end
41
41
  ContactData will make an intelligent guess at the type of the name but it's not infallible. ContactData likes it if you tell it whether the name is a person or an organization:
42
42
 
43
43
  ```ruby
44
- contact_data = ContactData.new 'Di Doo Doo d.o.o.', contact_type: :organization
44
+ contact_data = ContactData::Contact.new 'Di Doo Doo d.o.o.', contact_type: :organization
45
45
  contact_data.search
46
46
  ```
47
47
 
@@ -4,6 +4,7 @@ module ContactData
4
4
  class << self
5
5
  def search(name, options = {})
6
6
  options[:params] = { name: name }
7
+ options[:timeout] ||= 90 # seconds
7
8
  Fetcher.get(:search, options)
8
9
  end
9
10
  end
@@ -48,7 +48,15 @@ module ContactData
48
48
  logger.info { "Using #{method.to_s.upcase} for #{url}" }
49
49
  args = { url: url, method: method }
50
50
  args[:headers] = { params: options[:params] } if options.key? :params
51
- args[:payload] = options[:payload] if options.key? :payload
51
+
52
+ %w(
53
+ :method :url :headers :cookies :payload :user :password :timeout
54
+ :max_redirects :open_timeout :raw_response :processed_headers :args
55
+ :ssl_opts :verify_ssl :ssl_client_cert :ssl_client_key :ssl_ca_file
56
+ :ssl_ca_path :ssl_cert_store :ssl_verify_callback
57
+ :ssl_verify_callback_warnings :ssl_version :ssl_ciphers
58
+ ).each { |key| args[key] = options[key] if options.key? key }
59
+
52
60
  RestClient::Request.new(args).execute
53
61
  end
54
62
 
@@ -1,4 +1,4 @@
1
1
  # Gem version
2
2
  module ContactData
3
- VERSION = '0.0.9'
3
+ VERSION = '0.0.10'
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.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xenapto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-19 00:00:00.000000000 Z
11
+ date: 2014-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client