cloudsponge 0.9.12 → 0.9.13
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.
- checksums.yaml +7 -0
- data/Gemfile.lock +2 -3
- data/cloudsponge.gemspec +2 -1
- data/lib/cloudsponge/contact_importer.rb +2 -1
- data/lib/cloudsponge/utility.rb +1 -2
- data/lib/cloudsponge/version.rb +1 -1
- data/test/test_contact_importer.rb +21 -15
- data/test/test_helper.rb +11 -1
- data/test/test_utility.rb +1 -1
- metadata +41 -52
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 7e56bc323a8bf54a660af8749c900d462789a4ef
|
|
4
|
+
data.tar.gz: 0b22bcc9fd676d2f5210875529bf905a38910b28
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 56cccbb44346a4f8d5397c8590d9a7c6cee13a1451f8c7a32bce262e87bd70261bb68d264a74eea0e68251f6f8d83ca5520cba5adf29aedfc58888752d3d7bae
|
|
7
|
+
data.tar.gz: cdbb9f9fe62f0fc33f98b27f24c25c49191d16d2d249f4304470a9813c3f8d536feb41b0cbcf8ff3455640c2bcd0d16ac6747d4a545fa7aea7aad08edfea2ba6
|
data/Gemfile.lock
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
cloudsponge (0.9.
|
|
4
|
+
cloudsponge (0.9.13)
|
|
5
5
|
json (>= 1.6.1)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
json (1.
|
|
10
|
+
json (1.8.1)
|
|
11
11
|
|
|
12
12
|
PLATFORMS
|
|
13
13
|
ruby
|
|
14
14
|
|
|
15
15
|
DEPENDENCIES
|
|
16
16
|
cloudsponge!
|
|
17
|
-
json (>= 1.6.1)
|
data/cloudsponge.gemspec
CHANGED
|
@@ -4,6 +4,7 @@ require File.expand_path("../lib/cloudsponge/version", __FILE__)
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = "cloudsponge"
|
|
6
6
|
s.version = Cloudsponge::VERSION
|
|
7
|
+
s.licenses = ['MIT']
|
|
7
8
|
s.platform = Gem::Platform::RUBY
|
|
8
9
|
s.authors = ["Graeme Rouse"]
|
|
9
10
|
s.email = ["graeme@cloudsponge.com"]
|
|
@@ -12,7 +13,7 @@ Gem::Specification.new do |s|
|
|
|
12
13
|
s.description = "CloudSponge is the tool that you need to go viral. Create an account at http://www.cloudsponge.com and integrate with this library. In a few lines of code you'll have access to your users' contact lists."
|
|
13
14
|
|
|
14
15
|
s.required_rubygems_version = ">= 1.3.6"
|
|
15
|
-
s.
|
|
16
|
+
s.add_runtime_dependency 'json', '~> 1.6', '>= 1.6.1'
|
|
16
17
|
|
|
17
18
|
s.files = `git ls-files`.split("\n")
|
|
18
19
|
s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
|
|
@@ -189,8 +189,9 @@ module Cloudsponge
|
|
|
189
189
|
end
|
|
190
190
|
|
|
191
191
|
def generate_poll_url(path, import_id)
|
|
192
|
+
_nonce = Time.now.to_i
|
|
192
193
|
# get the query_string with authentication params and assemble the full url
|
|
193
|
-
"#{URL_BASE}#{path}#{import_id}
|
|
194
|
+
"#{URL_BASE}#{path}#{import_id}?_=#{_nonce}&#{authenticated_query}"
|
|
194
195
|
end
|
|
195
196
|
|
|
196
197
|
end
|
data/lib/cloudsponge/utility.rb
CHANGED
data/lib/cloudsponge/version.rb
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
require '
|
|
1
|
+
require 'test_helper'
|
|
2
2
|
|
|
3
3
|
class TestContactImporter < Test::Unit::TestCase
|
|
4
4
|
def test_version_exists
|
|
5
5
|
assert Cloudsponge::VERSION
|
|
6
6
|
end
|
|
7
|
-
|
|
8
|
-
DOMAIN_KEY = "Domain Key"
|
|
9
|
-
DOMAIN_PASSWORD = "Domain Password"
|
|
10
|
-
|
|
7
|
+
|
|
11
8
|
def test_u_p_import
|
|
12
9
|
importer = Cloudsponge::ContactImporter.new(DOMAIN_KEY, DOMAIN_PASSWORD)
|
|
13
|
-
importer.begin_import('PLAXO',
|
|
10
|
+
importer.begin_import('PLAXO', PLAXO[:user], PLAXO[:password])
|
|
14
11
|
contacts = events_wait(importer)
|
|
15
12
|
assert contacts
|
|
16
13
|
end
|
|
17
14
|
|
|
18
15
|
def test_aol_import
|
|
19
16
|
importer = Cloudsponge::ContactImporter.new(DOMAIN_KEY, DOMAIN_PASSWORD)
|
|
20
|
-
resp = importer.begin_import('AOL'
|
|
21
|
-
|
|
17
|
+
resp = importer.begin_import('AOL')
|
|
18
|
+
if resp[:consent_url]
|
|
19
|
+
puts "Navigate to #{resp[:consent_url]} and complete the authentication process."
|
|
20
|
+
`open '#{resp[:consent_url]}'`
|
|
21
|
+
end
|
|
22
22
|
contacts = events_wait(importer)
|
|
23
23
|
assert contacts
|
|
24
24
|
end
|
|
@@ -26,29 +26,35 @@ class TestContactImporter < Test::Unit::TestCase
|
|
|
26
26
|
def test_wl_import
|
|
27
27
|
importer = Cloudsponge::ContactImporter.new(DOMAIN_KEY, DOMAIN_PASSWORD)
|
|
28
28
|
resp = importer.begin_import('WINDOWSLIVE')
|
|
29
|
-
|
|
29
|
+
if resp[:consent_url]
|
|
30
|
+
puts "Navigate to #{resp[:consent_url]} and complete the authentication process."
|
|
31
|
+
`open '#{resp[:consent_url]}'`
|
|
32
|
+
end
|
|
30
33
|
contacts = events_wait(importer)
|
|
31
34
|
assert contacts
|
|
32
35
|
end
|
|
33
|
-
|
|
36
|
+
|
|
34
37
|
def test_auth_import
|
|
35
38
|
importer = Cloudsponge::ContactImporter.new(DOMAIN_KEY, DOMAIN_PASSWORD)
|
|
36
39
|
resp = importer.begin_import('YAHOO')
|
|
37
|
-
|
|
40
|
+
if resp[:consent_url]
|
|
41
|
+
puts "Navigate to #{resp[:consent_url]} and complete the authentication process."
|
|
42
|
+
`open '#{resp[:consent_url]}'`
|
|
43
|
+
end
|
|
38
44
|
contacts = events_wait(importer)
|
|
39
45
|
assert contacts
|
|
40
46
|
end
|
|
41
|
-
|
|
47
|
+
|
|
42
48
|
def test_contacts_with_mailing_addresses
|
|
43
49
|
importer = Cloudsponge::ContactImporter.new(DOMAIN_KEY, DOMAIN_PASSWORD, nil, {"include" => "mailing_address"})
|
|
44
|
-
importer.begin_import('PLAXO',
|
|
50
|
+
importer.begin_import('PLAXO', PLAXO[:user], PLAXO[:password])
|
|
45
51
|
contacts = events_wait(importer)
|
|
46
52
|
assert contacts
|
|
47
53
|
assert contacts[0].detect{ |contact| contact.addresses.any? }
|
|
48
54
|
end
|
|
49
|
-
|
|
55
|
+
|
|
50
56
|
private
|
|
51
|
-
|
|
57
|
+
|
|
52
58
|
def events_wait(importer)
|
|
53
59
|
loop do
|
|
54
60
|
events = importer.get_events
|
data/test/test_helper.rb
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
require 'test/unit'
|
|
2
|
-
require 'cloudsponge'
|
|
2
|
+
require 'cloudsponge'
|
|
3
|
+
|
|
4
|
+
DOMAIN_KEY = "DOMAIN_KEY"
|
|
5
|
+
DOMAIN_PASSWORD = "DOMAIN_PASSWORD"
|
|
6
|
+
|
|
7
|
+
PLAXO = {:user => 'u', :password => 'p'}
|
|
8
|
+
|
|
9
|
+
DOMAIN_KEY = "CLOUDSPONGE_DEMO_DOMAIN_KEY"
|
|
10
|
+
DOMAIN_PASSWORD = "1234"
|
|
11
|
+
|
|
12
|
+
PLAXO = {:user => 'cloudsponge@live.com', :password => 'transplant'}
|
data/test/test_utility.rb
CHANGED
metadata
CHANGED
|
@@ -1,47 +1,45 @@
|
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cloudsponge
|
|
3
|
-
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
5
|
-
segments:
|
|
6
|
-
- 0
|
|
7
|
-
- 9
|
|
8
|
-
- 12
|
|
9
|
-
version: 0.9.12
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.9.13
|
|
10
5
|
platform: ruby
|
|
11
|
-
authors:
|
|
6
|
+
authors:
|
|
12
7
|
- Graeme Rouse
|
|
13
8
|
autorequire:
|
|
14
9
|
bindir: bin
|
|
15
10
|
cert_chain: []
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
dependencies:
|
|
20
|
-
- !ruby/object:Gem::Dependency
|
|
11
|
+
date: 2014-11-25 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
21
14
|
name: json
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '1.6'
|
|
25
20
|
- - ">="
|
|
26
|
-
- !ruby/object:Gem::Version
|
|
27
|
-
segments:
|
|
28
|
-
- 1
|
|
29
|
-
- 6
|
|
30
|
-
- 1
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
31
22
|
version: 1.6.1
|
|
32
23
|
type: :runtime
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
prerelease: false
|
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
26
|
+
requirements:
|
|
27
|
+
- - "~>"
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: '1.6'
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: 1.6.1
|
|
33
|
+
description: CloudSponge is the tool that you need to go viral. Create an account
|
|
34
|
+
at http://www.cloudsponge.com and integrate with this library. In a few lines of
|
|
35
|
+
code you'll have access to your users' contact lists.
|
|
36
|
+
email:
|
|
36
37
|
- graeme@cloudsponge.com
|
|
37
38
|
executables: []
|
|
38
|
-
|
|
39
39
|
extensions: []
|
|
40
|
-
|
|
41
40
|
extra_rdoc_files: []
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
- .gitignore
|
|
41
|
+
files:
|
|
42
|
+
- ".gitignore"
|
|
45
43
|
- Gemfile
|
|
46
44
|
- Gemfile.lock
|
|
47
45
|
- HISTORY
|
|
@@ -62,37 +60,28 @@ files:
|
|
|
62
60
|
- test/test_cs_exception.rb
|
|
63
61
|
- test/test_helper.rb
|
|
64
62
|
- test/test_utility.rb
|
|
65
|
-
has_rdoc: true
|
|
66
63
|
homepage: http://www.cloudsponge.com
|
|
67
|
-
licenses:
|
|
68
|
-
|
|
64
|
+
licenses:
|
|
65
|
+
- MIT
|
|
66
|
+
metadata: {}
|
|
69
67
|
post_install_message:
|
|
70
68
|
rdoc_options: []
|
|
71
|
-
|
|
72
|
-
require_paths:
|
|
69
|
+
require_paths:
|
|
73
70
|
- lib
|
|
74
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
|
75
|
-
requirements:
|
|
71
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
76
73
|
- - ">="
|
|
77
|
-
- !ruby/object:Gem::Version
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
|
-
requirements:
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '0'
|
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
|
+
requirements:
|
|
83
78
|
- - ">="
|
|
84
|
-
- !ruby/object:Gem::Version
|
|
85
|
-
segments:
|
|
86
|
-
- 1
|
|
87
|
-
- 3
|
|
88
|
-
- 6
|
|
79
|
+
- !ruby/object:Gem::Version
|
|
89
80
|
version: 1.3.6
|
|
90
81
|
requirements: []
|
|
91
|
-
|
|
92
82
|
rubyforge_project:
|
|
93
|
-
rubygems_version:
|
|
83
|
+
rubygems_version: 2.2.1
|
|
94
84
|
signing_key:
|
|
95
|
-
specification_version:
|
|
85
|
+
specification_version: 4
|
|
96
86
|
summary: CloudSponge integration library for Ruby
|
|
97
87
|
test_files: []
|
|
98
|
-
|