contact-data 0.0.8 → 0.0.9

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: 54231531a3525502f001d7520cd3c8438b38f8ae
4
- data.tar.gz: 4a6a358d5dad6579fad774f1fabf8de214dd7607
3
+ metadata.gz: 32ce9c98af3dca3b721bb98c611089aad1bb4750
4
+ data.tar.gz: 612c6167327a9876b34e18dfb83c59a117fefe9b
5
5
  SHA512:
6
- metadata.gz: 8f6c44fde705d97f373abef710ffb1111104efa02cee5d4fcf9ff89e517ba8cef776c88f18675d2ad7102a4577a2fb69b35aaa34a0124da5e3c65262449e0b8d
7
- data.tar.gz: d6bb4a5a5634829e12dbe3d905e44e875e4289b1efbe195c10be1e9cfaf7abebff246806a5799a578061cbf0339225f89f1e4faf768f7c9f4495ca1e59d951aa
6
+ metadata.gz: 8ecd8aa977f67e11b150464757a94cb29fdc67b0ee7c1af0d18dc3312064cec42bae686cd8f5b3b4d4f935bd8b988dc39b1a7a30ea08438dc4f0bcdcf7887358
7
+ data.tar.gz: 56b18b43da22b46d7115e35a98e07cd962391f60b0259f2e728df323c57129b3610d9957f9ca7ddf46598083002a0f8d46da068e4836bc808e6610b600001704
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- contact-data (0.0.7)
4
+ contact-data (0.0.8)
5
5
  rest-client (~> 1)
6
6
 
7
7
  GEM
@@ -21,6 +21,8 @@ module ContactData
21
21
  def options_from(params = {})
22
22
  options = { base: BASE }
23
23
 
24
+ params = { url: params } if params.is_a? String
25
+
24
26
  options[:verbose] = params.delete(:verbose) if params.key? :verbose
25
27
  options[:params] = params unless params.empty?
26
28
  options
@@ -1,4 +1,4 @@
1
1
  # Gem version
2
2
  module ContactData
3
- VERSION = '0.0.8'
3
+ VERSION = '0.0.9'
4
4
  end
@@ -2,7 +2,7 @@
2
2
  require 'spec_helper'
3
3
  require 'contact-data'
4
4
 
5
- describe ContactData do
5
+ describe ContactData::Contact do
6
6
  let(:name) { 'Derek Jones III' }
7
7
 
8
8
  it 'searches for a contact by name' do
@@ -19,6 +19,13 @@ describe ContactData::Link do
19
19
  end
20
20
  end
21
21
 
22
+ it 'gets metadata about a url when passed a url as a string' do
23
+ VCR.use_cassette('links_info_search') do
24
+ result = ContactData::Link.search url
25
+ expect(result).to be_a(Hash)
26
+ end
27
+ end
28
+
22
29
  it 'gets metadata & contact from a url' do
23
30
  VCR.use_cassette('links_info_search') do
24
31
  result = ContactData::Link.info url: url, verbose: true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contact-data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xenapto