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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +3 -3
- data/lib/contact-data/contact.rb +1 -0
- data/lib/contact-data/fetcher.rb +9 -1
- data/lib/contact-data/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c1c82c65ef8c8d34506b2e689b50532c6b4fc49
|
4
|
+
data.tar.gz: ddda08c9b6170f22285d02d6c835c8c872e63204
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ee5d3c705b684c0ed843d1545a213899953ef5f5f478667da7abe8479f1b6e378f14df1c16108d2847488bba10ff853390287c3026cc99c4f2cab5318979340
|
7
|
+
data.tar.gz: ce24b728e14339f8922772ae814f1baa0bcd47ff6339d0e04ae87cb859820acd3de492ac4288326e8349cd3a6de82e9241910c7f90055c86677af0ee696dd9ca
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The contact-data gem
|
2
2
|
|
3
|
-
 [](https://coveralls.io/r/Xenapto/contact-data?branch=master)
|
3
|
+
 [](https://codeclimate.com/github/Xenapto/contact-data) [](https://coveralls.io/r/Xenapto/contact-data?branch=master)
|
4
4
|
[](http://xenapto.com)
|
5
5
|

|
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
|
|
data/lib/contact-data/contact.rb
CHANGED
data/lib/contact-data/fetcher.rb
CHANGED
@@ -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
|
-
|
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
|
|
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.0.
|
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-
|
11
|
+
date: 2014-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|