contact-data 0.4.2 → 0.4.3

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: 5c0323cd517654462549ac589fec8dcbab71174b
4
- data.tar.gz: fb30d5f2babc58b1c66fb2bd6f02934b5ff929ff
3
+ metadata.gz: 20a5203c8c8e4effff38a60d841f0b505efc0d87
4
+ data.tar.gz: 294fb4d913e6f1a5d208bfd5ae2beb9a2beb9a85
5
5
  SHA512:
6
- metadata.gz: 4d93463479baf4139ae80c58e34efcaf34cbd0fb8315a3e915279cb51b6b917b6e642e0038f8081e959783f80a47d6ef735f8f91f5249cbb085aa931e682b861
7
- data.tar.gz: 9bf4563078d7b630de1ecb02c61868db83e24e87c1efa90d21df56c538d25d448ceba7498565e4e8e29e3c2a35049870f4565bb033d6a27437b7e041c04c4c60
6
+ metadata.gz: 6f617c198c55a469d87ec66492d4dd76b5ef220187ea3177a51447cf3f85cf7753b21e41d5d56e475bda83776d9ad67f9c3c6ff55f68985c488fa741007ad79a
7
+ data.tar.gz: b91f817e52960d236e6571d9d1aedfe7e4a0c5fed430488045ad289c9d4497da9ec6686aaffbd622a015b4e2d349f5e85bc774c0271b0bbf1014fce268bcd694
data/README.md CHANGED
@@ -3,7 +3,7 @@
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
4
  [![security](https://hakiri.io/github/Xenapto/contact-data/develop.svg)](https://hakiri.io/github/Xenapto/contact-data/develop)
5
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
+ [![Developer status](http://img.shields.io/badge/developer-awesome-brightgreen.svg)](http://xenapto.com) [![Join the chat at https://gitter.im/Xenapto/contact-data](https://badges.gitter.im/Xenapto/contact-data.svg)](https://gitter.im/Xenapto/contact-data?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
7
7
 
8
8
  Retrieves information about people and organizations from http://public.xenapto.com
9
9
 
@@ -5,16 +5,25 @@ module ContactData
5
5
 
6
6
  class << self
7
7
  def search(name, options = {})
8
- options[:base] = BASE
9
- options[:params] = { name: name }
8
+ options[:base] ||= BASE
9
+ options[:params] ||= { name: name }
10
10
  Fetcher.get(:search, options)
11
11
  end
12
12
 
13
13
  def from(source, slug, options = {})
14
- options[:base] = BASE
15
- options[:params] = { source: source, slug: slug }
14
+ options[:base] ||= BASE
15
+ options[:params] ||= { source: source, slug: slug }
16
16
  Fetcher.get(:from, options)
17
17
  end
18
+
19
+ def from_domain(domain, options = {})
20
+ options[:base] ||= BASE
21
+ options[:api_base] ||= 'api/v3'
22
+ options[:url_base] ||= 'http://localhost:5000' # debug
23
+ options[:params] ||= { domain: domain }
24
+ options[:params][:contact_type] ||= options.delete(:contact_type)
25
+ Fetcher.get(:from_domain, options)
26
+ end
18
27
  end
19
28
  end
20
29
  end
@@ -1,4 +1,4 @@
1
1
  # Gem version
2
2
  module ContactData
3
- VERSION = '0.4.2'.freeze
3
+ VERSION = '0.4.3'.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.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xenapto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-15 00:00:00.000000000 Z
11
+ date: 2016-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client