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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/contact-data/link.rb +2 -0
- data/lib/contact-data/version.rb +1 -1
- data/spec/contact-data_contact_spec.rb +1 -1
- data/spec/contact-data_link_spec.rb +7 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32ce9c98af3dca3b721bb98c611089aad1bb4750
|
4
|
+
data.tar.gz: 612c6167327a9876b34e18dfb83c59a117fefe9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ecd8aa977f67e11b150464757a94cb29fdc67b0ee7c1af0d18dc3312064cec42bae686cd8f5b3b4d4f935bd8b988dc39b1a7a30ea08438dc4f0bcdcf7887358
|
7
|
+
data.tar.gz: 56b18b43da22b46d7115e35a98e07cd962391f60b0259f2e728df323c57129b3610d9957f9ca7ddf46598083002a0f8d46da068e4836bc808e6610b600001704
|
data/Gemfile.lock
CHANGED
data/lib/contact-data/link.rb
CHANGED
@@ -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
|
data/lib/contact-data/version.rb
CHANGED
@@ -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
|