cloudsponge 0.9.10 → 0.9.11
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +2 -11
- data/README.md +20 -13
- data/Rakefile +6 -1
- data/cloudsponge.gemspec +1 -5
- data/lib/cloudsponge/version.rb +1 -1
- data/test/test_contact_importer.rb +4 -5
- data/test/test_helper.rb +0 -5
- data/test/test_utility.rb +4 -4
- metadata +4 -4
data/Gemfile.lock
CHANGED
@@ -1,26 +1,17 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cloudsponge (0.9.
|
4
|
+
cloudsponge (0.9.10)
|
5
5
|
json (>= 1.6.1)
|
6
6
|
|
7
7
|
GEM
|
8
|
-
remote:
|
8
|
+
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
columnize (0.3.0)
|
11
10
|
json (1.6.1)
|
12
|
-
linecache (0.43)
|
13
|
-
ruby-debug (0.10.3)
|
14
|
-
columnize (>= 0.1)
|
15
|
-
ruby-debug-base (~> 0.10.3.0)
|
16
|
-
ruby-debug-base (0.10.3)
|
17
|
-
linecache (>= 0.3)
|
18
11
|
|
19
12
|
PLATFORMS
|
20
13
|
ruby
|
21
14
|
|
22
15
|
DEPENDENCIES
|
23
|
-
bundler (>= 1.0.0)
|
24
16
|
cloudsponge!
|
25
17
|
json (>= 1.6.1)
|
26
|
-
ruby-debug (>= 0.10.3)
|
data/README.md
CHANGED
@@ -1,26 +1,26 @@
|
|
1
|
-
= cs_import
|
2
|
-
|
3
1
|
http://www.cloudsponge.com
|
4
2
|
|
5
|
-
== DESCRIPTION:
|
6
|
-
|
7
3
|
Spread the word with an email invite. Import contacts from Yahoo, Hotmail, MSN, Gmail, AOL, Outlook and Mac Address Book.
|
8
4
|
|
9
|
-
|
5
|
+
Problem
|
6
|
+
=======
|
10
7
|
|
11
|
-
=== Problem
|
12
8
|
Websites looking to grow their customer base usually turn to traditional, paid methods of advertising like search engine keywords, media buys, and generic email lists. Though these methods can be effective at times, they are no match for the testimonial power your very own customers can bring. By encouraging your customers to promote your site to their family and friends, you have an inexpensive advertising channel to acquire customers. If one customer refers their friends, and their friends refer their friends, and so on, and so on, you now have a viral site!
|
13
9
|
|
14
|
-
|
10
|
+
Solution
|
11
|
+
========
|
12
|
+
|
15
13
|
CloudSponge.com is THE tool you need to go viral! Here's how it works:
|
16
14
|
* Ask your customers to invite all their friends and family to your site.
|
17
15
|
* Use CloudSponge.com to pull your customer's contact list with their permission.
|
18
16
|
* Send an email invite to all the contacts provided by CloudSponge.com.
|
19
17
|
* Sit back and watch your customer base grow virally!
|
20
18
|
|
21
|
-
== SYNOPSIS:
|
22
19
|
|
23
|
-
|
20
|
+
Usage:
|
21
|
+
-----
|
22
|
+
|
23
|
+
```ruby
|
24
24
|
contacts = nil
|
25
25
|
importer = Cloudsponge::ContactImporter.new(DOMAIN_KEY, DOMAIN_PASSWORD)
|
26
26
|
resp = importer.begin_import('YAHOO')
|
@@ -33,22 +33,29 @@ Websites looking to grow their customer base usually turn to traditional, paid m
|
|
33
33
|
break
|
34
34
|
end
|
35
35
|
end
|
36
|
+
```
|
37
|
+
|
36
38
|
|
37
|
-
|
39
|
+
REQUIREMENTS
|
40
|
+
------------
|
38
41
|
|
39
42
|
JSON decoding package, currently supported are ActiveSupport::JSON and the JSON gem.
|
40
43
|
Neither of these are required, but if you don't have either on your system, a runtime
|
41
44
|
error will be generated.
|
42
45
|
|
43
|
-
|
46
|
+
Install
|
47
|
+
-------
|
44
48
|
|
49
|
+
```bash
|
45
50
|
sudo gem install cloudsponge
|
51
|
+
```
|
46
52
|
|
47
|
-
|
53
|
+
License
|
54
|
+
=======
|
48
55
|
|
49
56
|
(The MIT License)
|
50
57
|
|
51
|
-
Copyright (c)
|
58
|
+
Copyright (c) 2013 Cloud Copy, Inc.
|
52
59
|
|
53
60
|
Permission is hereby granted, free of charge, to any person obtaining
|
54
61
|
a copy of this software and associated documentation files (the
|
data/Rakefile
CHANGED
data/cloudsponge.gemspec
CHANGED
@@ -7,15 +7,11 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
8
|
s.authors = ["Graeme Rouse"]
|
9
9
|
s.email = ["graeme@cloudsponge.com"]
|
10
|
-
s.homepage = "http://
|
10
|
+
s.homepage = "http://www.cloudsponge.com"
|
11
11
|
s.summary = "CloudSponge integration library for Ruby"
|
12
12
|
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
13
|
|
14
14
|
s.required_rubygems_version = ">= 1.3.6"
|
15
|
-
s.rubyforge_project = "cloudsponge"
|
16
|
-
|
17
|
-
# s.add_development_dependency "bundler", ">= 1.0.0"
|
18
|
-
# s.add_development_dependency "ruby-debug", ">= 0.10.3"
|
19
15
|
s.add_dependency "json", ">=1.6.1"
|
20
16
|
|
21
17
|
s.files = `git ls-files`.split("\n")
|
data/lib/cloudsponge/version.rb
CHANGED
@@ -10,7 +10,7 @@ class TestContactImporter < Test::Unit::TestCase
|
|
10
10
|
|
11
11
|
def test_u_p_import
|
12
12
|
importer = Cloudsponge::ContactImporter.new(DOMAIN_KEY, DOMAIN_PASSWORD)
|
13
|
-
importer.begin_import('
|
13
|
+
importer.begin_import('PLAXO', 'u', 'p')
|
14
14
|
contacts = events_wait(importer)
|
15
15
|
assert contacts
|
16
16
|
end
|
@@ -27,22 +27,21 @@ class TestContactImporter < Test::Unit::TestCase
|
|
27
27
|
importer = Cloudsponge::ContactImporter.new(DOMAIN_KEY, DOMAIN_PASSWORD, nil, {"include" => "mailing_address"})
|
28
28
|
importer.begin_import('PLAXO', 'u', 'p')
|
29
29
|
contacts = events_wait(importer)
|
30
|
+
assert contacts
|
30
31
|
assert contacts[0].detect{ |contact| contact.addresses.any? }
|
31
32
|
end
|
32
33
|
|
33
34
|
private
|
34
35
|
|
35
36
|
def events_wait(importer)
|
36
|
-
contacts = nil
|
37
37
|
loop do
|
38
38
|
events = importer.get_events
|
39
39
|
break unless events.select{ |e| e.is_error? }.empty?
|
40
40
|
unless events.select{ |e| e.is_complete? }.empty?
|
41
|
-
|
42
|
-
break
|
41
|
+
return importer.get_contacts
|
43
42
|
end
|
44
43
|
sleep 1
|
45
44
|
end
|
46
|
-
|
45
|
+
nil
|
47
46
|
end
|
48
47
|
end
|
data/test/test_helper.rb
CHANGED
data/test/test_utility.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
|
2
|
-
require "test/unit"
|
3
|
-
require "../lib/cloudsponge"
|
1
|
+
require 'test/test_helper'
|
4
2
|
|
5
3
|
class TestUtility < Test::Unit::TestCase
|
4
|
+
|
6
5
|
def test_decode_response
|
7
6
|
require "json"
|
8
7
|
object = {'key1' => 'value1', 'key2' => 'value2', 'integer_key' => 5}
|
9
|
-
assert_equal object, Cloudsponge::Utility.
|
8
|
+
assert_equal object, Cloudsponge::Utility.decode_response_body(JSON.generate(object), 'json')
|
10
9
|
end
|
10
|
+
|
11
11
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 9
|
8
|
-
-
|
9
|
-
version: 0.9.
|
8
|
+
- 11
|
9
|
+
version: 0.9.11
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Graeme Rouse
|
@@ -63,7 +63,7 @@ files:
|
|
63
63
|
- test/test_helper.rb
|
64
64
|
- test/test_utility.rb
|
65
65
|
has_rdoc: true
|
66
|
-
homepage: http://
|
66
|
+
homepage: http://www.cloudsponge.com
|
67
67
|
licenses: []
|
68
68
|
|
69
69
|
post_install_message:
|
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
89
|
version: 1.3.6
|
90
90
|
requirements: []
|
91
91
|
|
92
|
-
rubyforge_project:
|
92
|
+
rubyforge_project:
|
93
93
|
rubygems_version: 1.3.6
|
94
94
|
signing_key:
|
95
95
|
specification_version: 3
|