email2face 0.0.5 → 0.0.6
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.
- data/README.md +5 -3
- data/VERSION +1 -1
- data/email2face.gemspec +1 -1
- data/lib/email2face.rb +3 -3
- metadata +2 -2
data/README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
# Email2Face
|
2
2
|
|
3
|
-
|
3
|
+
Email2Face is a simple library for getting the person's face behind an email address. At [Lockitron](https://lockitron.com), we wanted faces next to names. It's a lot easier to remember who someone is when you can see their face. But, that's difficult to implement when all you have is an email address and a name.
|
4
|
+
|
5
|
+
After thinking about it for a few days, we came up with a good solution. Facebook has lots of faces, so why not use that? But, Facebook does not have an API for searching for profile pictures by email. So, we made one.
|
4
6
|
|
5
7
|
## Dependencies & Warnings
|
6
8
|
|
7
|
-
It needs a Facebook account to work. I *do not* recommend using your own Facebook because
|
9
|
+
It needs a Facebook account to work. I *do not* recommend using your own Facebook because I'm not sure if this plays well with Facebook's TOS. So, make a fake Facebook for it. I've included a default one, but it'll probably be banned by the time you get to it.
|
8
10
|
|
9
11
|
### Before jumping in
|
10
12
|
|
@@ -41,7 +43,7 @@ Then, we just give Email2Face the email we want a face for:
|
|
41
43
|
|
42
44
|
```ruby
|
43
45
|
require 'email2face'
|
44
|
-
Email2Face.face("
|
46
|
+
Email2Face.face("jarred.sumner@facebook.com")
|
45
47
|
```
|
46
48
|
|
47
49
|
### Changing the Facebook Account
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.6
|
data/email2face.gemspec
CHANGED
data/lib/email2face.rb
CHANGED
@@ -9,6 +9,7 @@ class Email2Face
|
|
9
9
|
# This is why you should make a fake Facebook account.
|
10
10
|
@@username = FAKE_FACEBOOK_USERNAME
|
11
11
|
@@password = FAKE_FACEBOOK_PASSWORD
|
12
|
+
Email2Face.configure_capybara
|
12
13
|
|
13
14
|
def self.username
|
14
15
|
@@username
|
@@ -31,15 +32,14 @@ class Email2Face
|
|
31
32
|
no_login_details(email)
|
32
33
|
end
|
33
34
|
html = face_html(email)
|
34
|
-
|
35
|
+
get_face(html)
|
35
36
|
end
|
36
37
|
|
37
38
|
def self.no_login_details(email)
|
38
|
-
puts "You didn't specify a Facebook account, so I set you up with
|
39
|
+
puts "You didn't specify a Facebook account, so I set you up with the default fake Facebook account. It might not work for long."
|
39
40
|
end
|
40
41
|
|
41
42
|
def self.face_html(email)
|
42
|
-
configure_capybara
|
43
43
|
Headless.ly do
|
44
44
|
browser = Capybara::Session.new(:webkit, browser)
|
45
45
|
#self.driver.header("User-Agent", CHROME_USER_AGENT)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: email2face
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -176,7 +176,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
176
176
|
version: '0'
|
177
177
|
segments:
|
178
178
|
- 0
|
179
|
-
hash:
|
179
|
+
hash: -700513005
|
180
180
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
181
181
|
none: false
|
182
182
|
requirements:
|