possible_email 0.0.2 → 0.0.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc5af4d8fea319c631c48a70eabb832ccab5e925
|
4
|
+
data.tar.gz: ab381913a95f1c02a7fb5b356301a82efad60c12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9473bfab7f5c60a28eb333988a5f08c90be350e8b7f088de7f39d2b3637aae8c69220a1b3c5cc181050f6c3b4a293cb0a3653ffc125be90a7c96d13c78c46d1c
|
7
|
+
data.tar.gz: 3bd64db4e1d5658c6c16f9305571f9b122816e0e6c3d131a0b3a1f1f539c2555a9b31167ed8849d318eeb7641acee4611c30c61b4bc4bbc88fd3c4a8e0530ea7
|
@@ -4,8 +4,6 @@ require 'possible_email/profile/image'
|
|
4
4
|
require 'possible_email/profile/phone'
|
5
5
|
|
6
6
|
module PossibleEmail
|
7
|
-
class NoDataError < ArgumentError; end
|
8
|
-
|
9
7
|
class Profile
|
10
8
|
attr_reader :data, :email, :name, :first_name, :last_name, :friendly_name,
|
11
9
|
:location, :headline, :success, :occupations, :memberships,
|
@@ -14,8 +12,6 @@ module PossibleEmail
|
|
14
12
|
def initialize(data)
|
15
13
|
@data = data
|
16
14
|
|
17
|
-
fail NoDataError, 'Data given was empty' if @data.empty?
|
18
|
-
|
19
15
|
retrieve_attribute
|
20
16
|
retrieve_attribute_collection
|
21
17
|
end
|
@@ -4,10 +4,6 @@ describe PossibleEmail::Profile do
|
|
4
4
|
let(:data) { JSON.parse(File.read(File.expand_path('spec/fixtures/rapportive_example_data.json'))) }
|
5
5
|
let(:profile) { PossibleEmail::Profile.new(data) }
|
6
6
|
|
7
|
-
it 'returns an error if no data is given' do
|
8
|
-
expect { PossibleEmail::Profile.new({}) }.to raise_error(PossibleEmail::NoDataError)
|
9
|
-
end
|
10
|
-
|
11
7
|
describe '#attributes' do
|
12
8
|
it 'returns a list of available' do
|
13
9
|
expect(profile.attributes).to eq(["email", "name", "first_name", "last_name", "friendly_name", "location", "headline", "success", "occupations", "memberships", "images", "phones"])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: possible_email
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Perey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpi
|