evri_rpx 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +5 -0
- data/CHANGELOG.markdown +10 -0
- data/LICENSE +21 -0
- data/README.markdown +144 -0
- data/Rakefile +73 -0
- data/VERSION +1 -0
- data/certs/cacert.pem +3154 -0
- data/evri_rpx.gemspec +82 -0
- data/lib/evri/rpx.rb +4 -0
- data/lib/evri/rpx/contact.rb +18 -0
- data/lib/evri/rpx/contact_list.rb +27 -0
- data/lib/evri/rpx/credentials.rb +65 -0
- data/lib/evri/rpx/mappings.rb +19 -0
- data/lib/evri/rpx/session.rb +161 -0
- data/lib/evri/rpx/user.rb +105 -0
- data/lib/evri_rpx.rb +13 -0
- data/spec/evri/rpx/contact_list_spec.rb +39 -0
- data/spec/evri/rpx/contact_spec.rb +19 -0
- data/spec/evri/rpx/credentials_spec.rb +98 -0
- data/spec/evri/rpx/mappings_spec.rb +21 -0
- data/spec/evri/rpx/session_spec.rb +154 -0
- data/spec/evri/rpx/user_spec.rb +336 -0
- data/spec/fixtures/contacts/bob_johnson.json +9 -0
- data/spec/fixtures/credentials/dbalatero_facebook.json +32 -0
- data/spec/fixtures/credentials/dbalatero_twitter.json +19 -0
- data/spec/fixtures/credentials/dbalatero_windowslive.json +15 -0
- data/spec/fixtures/mappings/identifiers.json +7 -0
- data/spec/fixtures/session/all_mappings.json +12 -0
- data/spec/fixtures/session/get_contacts.json +63 -0
- data/spec/fixtures/session/map.json +3 -0
- data/spec/fixtures/session/normal_error.json +7 -0
- data/spec/fixtures/session/service_down_error.json +7 -0
- data/spec/fixtures/session/unmap.json +3 -0
- data/spec/fixtures/user/dbalatero_facebook.json +31 -0
- data/spec/fixtures/user/dbalatero_gmail.json +20 -0
- data/spec/fixtures/user/dbalatero_twitter.json +19 -0
- data/spec/fixtures/user/dbalatero_windows_live.json +15 -0
- data/spec/fixtures/user/dbalatero_yahoo.json +17 -0
- data/spec/spec_helper.rb +20 -0
- metadata +101 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
{
|
2
|
+
"profile": {
|
3
|
+
"name": {
|
4
|
+
"givenName": "David",
|
5
|
+
"familyName": "Balatero",
|
6
|
+
"formatted": "David Balatero"
|
7
|
+
},
|
8
|
+
"address": {
|
9
|
+
"region": "Washington",
|
10
|
+
"country": "United States",
|
11
|
+
"postalCode": "98115",
|
12
|
+
"locality": "Seattle"
|
13
|
+
},
|
14
|
+
"photo": "http:\/\/profile.ak.facebook.com\/v230\/745\/68\/n10701789_1299.jpg",
|
15
|
+
"displayName": "David Balatero",
|
16
|
+
"preferredUsername": "DavidBalatero",
|
17
|
+
"url": "http:\/\/www.facebook.com\/profile.php?id=10701789",
|
18
|
+
"utcOffset": "-07:00",
|
19
|
+
"gender": "male",
|
20
|
+
"birthday": "1986-08-31",
|
21
|
+
"providerName": "Facebook",
|
22
|
+
"primaryKey": "dbalatero",
|
23
|
+
"identifier": "http:\/\/www.facebook.com\/profile.php?id=10701789"
|
24
|
+
},
|
25
|
+
"accessCredentials": {
|
26
|
+
"expires": "1245196800",
|
27
|
+
"uid": "10701789",
|
28
|
+
"type": "Facebook",
|
29
|
+
"sessionKey": "2.7kr3H8W-snip"
|
30
|
+
},
|
31
|
+
"stat": "ok"
|
32
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
{
|
2
|
+
"profile": {
|
3
|
+
"name": {
|
4
|
+
"formatted": "David Balatero"
|
5
|
+
},
|
6
|
+
"photo": "http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/196887137\/n10704766_41523711_7282_normal.jpg",
|
7
|
+
"displayName": "David Balatero",
|
8
|
+
"preferredUsername": "dbalatero",
|
9
|
+
"url": "http:\/\/twitter.com\/dbalatero",
|
10
|
+
"providerName": "Twitter",
|
11
|
+
"identifier": "http:\/\/twitter.com\/account\/profile?user_id=35834683"
|
12
|
+
},
|
13
|
+
"accessCredentials": {
|
14
|
+
"oauthToken": "35834683-jBU3o-snip",
|
15
|
+
"type": "OAuth",
|
16
|
+
"oauthTokenSecret": "2GjoAgV5-snip"
|
17
|
+
},
|
18
|
+
"stat": "ok"
|
19
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"profile": {
|
3
|
+
"displayName": "hit me with that motown funk",
|
4
|
+
"preferredUsername": "hit me with that motown funk",
|
5
|
+
"url": "http:\/\/cid-f032362d64442690.spaces.live.com\/",
|
6
|
+
"providerName": "Windows Live",
|
7
|
+
"identifier": "http:\/\/cid-f032362d64442690.spaces.live.com\/",
|
8
|
+
"email": "dbalatero16@hotmail.com"
|
9
|
+
},
|
10
|
+
"accessCredentials": {
|
11
|
+
"eact": "eact%3DJvtJUb4%252Bx1InXqjglTBWX-snip",
|
12
|
+
"type": "WindowsLive"
|
13
|
+
},
|
14
|
+
"stat": "ok"
|
15
|
+
}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
{
|
2
|
+
"response": {
|
3
|
+
"totalResults": 5,
|
4
|
+
"startIndex": 1,
|
5
|
+
"entry": [
|
6
|
+
{
|
7
|
+
"displayName": "Bob Johnson",
|
8
|
+
"emails": [
|
9
|
+
{
|
10
|
+
"type": "other",
|
11
|
+
"value": "bob@example.com"
|
12
|
+
}
|
13
|
+
]
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"displayName": "Cindy Smith",
|
17
|
+
"emails": [
|
18
|
+
{
|
19
|
+
"type": "other",
|
20
|
+
"value": "cindy.smith@example.com"
|
21
|
+
}
|
22
|
+
]
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"displayName": "Fred Williams",
|
26
|
+
"emails": [
|
27
|
+
{
|
28
|
+
"type": "other",
|
29
|
+
"value": "fred.williams@example.com"
|
30
|
+
}
|
31
|
+
]
|
32
|
+
},
|
33
|
+
{
|
34
|
+
"emails": [
|
35
|
+
{
|
36
|
+
"type": "other",
|
37
|
+
"value": "j.lewis@example.com"
|
38
|
+
}
|
39
|
+
]
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"displayName": "Mary Jones",
|
43
|
+
"emails": [
|
44
|
+
{
|
45
|
+
"type": "other",
|
46
|
+
"value": "mary.jones@example.com"
|
47
|
+
}
|
48
|
+
]
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"displayName": "Patricia Green",
|
52
|
+
"emails": [
|
53
|
+
{
|
54
|
+
"type": "other",
|
55
|
+
"value": "p.green@example.com"
|
56
|
+
}
|
57
|
+
]
|
58
|
+
}
|
59
|
+
],
|
60
|
+
"itemsPerPage": 5
|
61
|
+
},
|
62
|
+
"stat": "ok"
|
63
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
{
|
2
|
+
"profile": {
|
3
|
+
"name": {
|
4
|
+
"givenName": "David",
|
5
|
+
"familyName": "Balatero",
|
6
|
+
"formatted": "David Balatero"
|
7
|
+
},
|
8
|
+
"address": {
|
9
|
+
"region": "Washington",
|
10
|
+
"country": "United States",
|
11
|
+
"postalCode": "98115",
|
12
|
+
"locality": "Seattle"
|
13
|
+
},
|
14
|
+
"photo": "http:\/\/profile.ak.facebook.com\/v230\/745\/68\/n10701789_1299.jpg",
|
15
|
+
"displayName": "David Balatero",
|
16
|
+
"preferredUsername": "DavidBalatero",
|
17
|
+
"url": "http:\/\/www.facebook.com\/profile.php?id=10701789",
|
18
|
+
"utcOffset": "-07:00",
|
19
|
+
"gender": "male",
|
20
|
+
"birthday": "1986-08-31",
|
21
|
+
"providerName": "Facebook",
|
22
|
+
"identifier": "http:\/\/www.facebook.com\/profile.php?id=10701789"
|
23
|
+
},
|
24
|
+
"accessCredentials": {
|
25
|
+
"expires": "1244930400",
|
26
|
+
"uid": "10701789",
|
27
|
+
"type": "Facebook",
|
28
|
+
"sessionKey": "--------snip---------"
|
29
|
+
},
|
30
|
+
"stat": "ok"
|
31
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"profile": {
|
3
|
+
"verifiedEmail": "dbalatero@gmail.com",
|
4
|
+
"name": {
|
5
|
+
"givenName": "David",
|
6
|
+
"familyName": "Balatero",
|
7
|
+
"formatted": "David Balatero"
|
8
|
+
},
|
9
|
+
"address": {
|
10
|
+
"country": "United States"
|
11
|
+
},
|
12
|
+
"displayName": "dbalatero",
|
13
|
+
"preferredUsername": "dbalatero",
|
14
|
+
"providerName": "Google",
|
15
|
+
"primaryKey": "DavidBalateroTestRPXX",
|
16
|
+
"identifier": "https:\/\/www.google.com\/accounts\/o8\/id?id=AItOawm4ssnouvp4V-snip",
|
17
|
+
"email": "dbalatero@gmail.com"
|
18
|
+
},
|
19
|
+
"stat": "ok"
|
20
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
{
|
2
|
+
"profile": {
|
3
|
+
"name": {
|
4
|
+
"formatted": "David Balatero"
|
5
|
+
},
|
6
|
+
"photo": "http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/196887137\/n10704766_41523711_7282_normal.jpg",
|
7
|
+
"displayName": "David Balatero",
|
8
|
+
"preferredUsername": "dbalatero",
|
9
|
+
"url": "http:\/\/twitter.com\/dbalatero",
|
10
|
+
"providerName": "Twitter",
|
11
|
+
"identifier": "http:\/\/twitter.com\/account\/profile?user_id=35834683"
|
12
|
+
},
|
13
|
+
"accessCredentials": {
|
14
|
+
"oauthToken": "snip-Wd0QIbFJ34wDunsyB0H7t-snip",
|
15
|
+
"type": "OAuth",
|
16
|
+
"oauthTokenSecret": "snip-uJ6WOmJMuPRXZx-snip"
|
17
|
+
},
|
18
|
+
"stat": "ok"
|
19
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"profile": {
|
3
|
+
"displayName": "hit me with that motown funk",
|
4
|
+
"preferredUsername": "hit me with that motown funk",
|
5
|
+
"url": "http:\/\/cid-f032362d64442690.spaces.live.com\/",
|
6
|
+
"providerName": "Windows Live",
|
7
|
+
"identifier": "http:\/\/cid-f032362d64442690.spaces.live.com\/",
|
8
|
+
"email": "dbalatero16@hotmail.com"
|
9
|
+
},
|
10
|
+
"accessCredentials": {
|
11
|
+
"eact": "--snip--",
|
12
|
+
"type": "WindowsLive"
|
13
|
+
},
|
14
|
+
"stat": "ok"
|
15
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"profile": {
|
3
|
+
"verifiedEmail": "dbalatero@yahoo.com",
|
4
|
+
"name": {
|
5
|
+
"formatted": "David Balatero"
|
6
|
+
},
|
7
|
+
"displayName": "David Balatero",
|
8
|
+
"preferredUsername": "David",
|
9
|
+
"utcOffset": "-08:00",
|
10
|
+
"gender": "male",
|
11
|
+
"providerName": "Yahoo!",
|
12
|
+
"primaryKey": "David",
|
13
|
+
"identifier": "https:\/\/me.yahoo.com\/a\/fkoI_0kArtImhTBCf4HkPq7r42jX5w--#84c57",
|
14
|
+
"email": "dbalatero@yahoo.com"
|
15
|
+
},
|
16
|
+
"stat": "ok"
|
17
|
+
}
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spec'
|
2
|
+
|
3
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
4
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
5
|
+
require 'evri_rpx'
|
6
|
+
|
7
|
+
Spec::Runner.configure do |config|
|
8
|
+
|
9
|
+
end
|
10
|
+
|
11
|
+
require 'fakeweb'
|
12
|
+
FakeWeb.allow_net_connect = false
|
13
|
+
|
14
|
+
def json_fixture(path)
|
15
|
+
JSON.parse(File.read(fixture_path(path)))
|
16
|
+
end
|
17
|
+
|
18
|
+
def fixture_path(path)
|
19
|
+
File.expand_path(File.join(File.dirname(__FILE__), 'fixtures', path))
|
20
|
+
end
|
metadata
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: evri_rpx
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- David Balatero
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-06-17 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description:
|
17
|
+
email: dbalatero@evri.com
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- LICENSE
|
24
|
+
- README.markdown
|
25
|
+
files:
|
26
|
+
- .document
|
27
|
+
- .gitignore
|
28
|
+
- CHANGELOG.markdown
|
29
|
+
- LICENSE
|
30
|
+
- README.markdown
|
31
|
+
- Rakefile
|
32
|
+
- VERSION
|
33
|
+
- certs/cacert.pem
|
34
|
+
- evri_rpx.gemspec
|
35
|
+
- lib/evri/rpx.rb
|
36
|
+
- lib/evri/rpx/contact.rb
|
37
|
+
- lib/evri/rpx/contact_list.rb
|
38
|
+
- lib/evri/rpx/credentials.rb
|
39
|
+
- lib/evri/rpx/mappings.rb
|
40
|
+
- lib/evri/rpx/session.rb
|
41
|
+
- lib/evri/rpx/user.rb
|
42
|
+
- lib/evri_rpx.rb
|
43
|
+
- spec/evri/rpx/contact_list_spec.rb
|
44
|
+
- spec/evri/rpx/contact_spec.rb
|
45
|
+
- spec/evri/rpx/credentials_spec.rb
|
46
|
+
- spec/evri/rpx/mappings_spec.rb
|
47
|
+
- spec/evri/rpx/session_spec.rb
|
48
|
+
- spec/evri/rpx/user_spec.rb
|
49
|
+
- spec/fixtures/contacts/bob_johnson.json
|
50
|
+
- spec/fixtures/credentials/dbalatero_facebook.json
|
51
|
+
- spec/fixtures/credentials/dbalatero_twitter.json
|
52
|
+
- spec/fixtures/credentials/dbalatero_windowslive.json
|
53
|
+
- spec/fixtures/mappings/identifiers.json
|
54
|
+
- spec/fixtures/session/all_mappings.json
|
55
|
+
- spec/fixtures/session/get_contacts.json
|
56
|
+
- spec/fixtures/session/map.json
|
57
|
+
- spec/fixtures/session/normal_error.json
|
58
|
+
- spec/fixtures/session/service_down_error.json
|
59
|
+
- spec/fixtures/session/unmap.json
|
60
|
+
- spec/fixtures/user/dbalatero_facebook.json
|
61
|
+
- spec/fixtures/user/dbalatero_gmail.json
|
62
|
+
- spec/fixtures/user/dbalatero_twitter.json
|
63
|
+
- spec/fixtures/user/dbalatero_windows_live.json
|
64
|
+
- spec/fixtures/user/dbalatero_yahoo.json
|
65
|
+
- spec/spec_helper.rb
|
66
|
+
has_rdoc: true
|
67
|
+
homepage: http://github.com/dbalatero/evri_rpx
|
68
|
+
licenses: []
|
69
|
+
|
70
|
+
post_install_message:
|
71
|
+
rdoc_options:
|
72
|
+
- --charset=UTF-8
|
73
|
+
require_paths:
|
74
|
+
- lib
|
75
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: "0"
|
80
|
+
version:
|
81
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: "0"
|
86
|
+
version:
|
87
|
+
requirements: []
|
88
|
+
|
89
|
+
rubyforge_project: evrigems
|
90
|
+
rubygems_version: 1.3.4
|
91
|
+
signing_key:
|
92
|
+
specification_version: 3
|
93
|
+
summary: An API wrapper for the RPXNow.com login service.
|
94
|
+
test_files:
|
95
|
+
- spec/evri/rpx/contact_list_spec.rb
|
96
|
+
- spec/evri/rpx/contact_spec.rb
|
97
|
+
- spec/evri/rpx/credentials_spec.rb
|
98
|
+
- spec/evri/rpx/mappings_spec.rb
|
99
|
+
- spec/evri/rpx/session_spec.rb
|
100
|
+
- spec/evri/rpx/user_spec.rb
|
101
|
+
- spec/spec_helper.rb
|