memotoo 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +20 -5
- data/VERSION +1 -1
- data/lib/memotoo/bookmark/bookmark.rb +72 -0
- data/lib/memotoo/connect.rb +3 -0
- data/lib/memotoo/contact/contact.rb +0 -1
- data/lib/memotoo/contact/contact_group.rb +0 -1
- data/memotoo.gemspec +12 -5
- data/test/helper.rb +10 -1
- data/test/test_bookmark.rb +85 -0
- data/test/test_contact.rb +78 -0
- data/test/test_contact_group.rb +78 -0
- data/test/test_memotoo.rb +16 -168
- metadata +50 -41
data/README.rdoc
CHANGED
@@ -21,7 +21,7 @@ else put it in your <b>environment.rb</b> and run
|
|
21
21
|
|
22
22
|
==Use
|
23
23
|
|
24
|
-
give a first try in
|
24
|
+
give a first try in ./script/console
|
25
25
|
|
26
26
|
@connect=Memotoo::Connect.new("myusername","mypassword")
|
27
27
|
|
@@ -45,7 +45,7 @@ get contact modified after a date
|
|
45
45
|
|
46
46
|
@response = @connect.getContactSync("2011-01-01 10:00:00")
|
47
47
|
|
48
|
-
|
48
|
+
contactgroups:
|
49
49
|
|
50
50
|
@connect.addContactGroup({:name=>"Testgroup"})
|
51
51
|
|
@@ -57,6 +57,19 @@ playing with contactgroups
|
|
57
57
|
|
58
58
|
@connect.deleteContactGroup(12345)
|
59
59
|
|
60
|
+
bookmarks:
|
61
|
+
|
62
|
+
@connect.addBookmark({:name=>"Testgroup"})
|
63
|
+
|
64
|
+
@connect.searchBookmark({:search=>"ka", :limit_nb=>50})
|
65
|
+
|
66
|
+
@connect.getBookmark(12345)
|
67
|
+
|
68
|
+
@connect.getBookmarkSync("2010-02-23 10:00:00")
|
69
|
+
|
70
|
+
@connect.modifyBookmark({:id=>response[:id], :url=>"www.google.com", :description => "nice"})
|
71
|
+
|
72
|
+
@connect.deleteBookmark(12345)
|
60
73
|
|
61
74
|
==Testing
|
62
75
|
|
@@ -67,7 +80,9 @@ I also added support for {http://test.rubygems.org}[http://test.rubygems.org]
|
|
67
80
|
|
68
81
|
You can now use the gem rubygems-test for easy testing this gem.
|
69
82
|
|
70
|
-
|
83
|
+
gem test memotoo
|
84
|
+
|
85
|
+
See my testresult here: http://test.rubygems.org/gems/memotoo/v/1.0.6/test_results/1655
|
71
86
|
|
72
87
|
==Documentation
|
73
88
|
|
@@ -75,8 +90,8 @@ see rdoc
|
|
75
90
|
|
76
91
|
==To-Dos
|
77
92
|
|
78
|
-
1. Exception handling should be done - fetched
|
79
|
-
2. I only implemented contacts
|
93
|
+
1. Exception handling should be done - fetched problems are written to console
|
94
|
+
2. I only implemented contacts, contact's group and bookmark - these soap-objects are missing: bookmark's folder, event, holiday, task, note
|
80
95
|
|
81
96
|
It would be nice if *someone* could help me with the missing parts .
|
82
97
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.6
|
@@ -0,0 +1,72 @@
|
|
1
|
+
|
2
|
+
module Memotoo
|
3
|
+
|
4
|
+
class Connect
|
5
|
+
|
6
|
+
# required: url
|
7
|
+
#
|
8
|
+
# optional:
|
9
|
+
# description
|
10
|
+
# tags
|
11
|
+
# rank
|
12
|
+
# id_bookmarkfolder
|
13
|
+
# {:name=>groupname}
|
14
|
+
# #e.g. @connect.addBookmark({:name=>"Testgroup"})
|
15
|
+
def addBookmark(details)
|
16
|
+
if has_needed_fields(details, :url)
|
17
|
+
format_result(addApiCall({:bookmark => details}), :id)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
#[searchparameter:]
|
22
|
+
# {:search=>"something", :limit_start=>0, :limit_nb=>100}
|
23
|
+
#* required:
|
24
|
+
# search
|
25
|
+
#* optional:
|
26
|
+
# limit_start
|
27
|
+
# limit_nb
|
28
|
+
#e.g. @connect.searchBookmark({:search=>"ka", :limit_nb=>50})
|
29
|
+
#
|
30
|
+
# returns nil or a hash of one contactgroup or an array of contactgroups
|
31
|
+
#
|
32
|
+
def searchBookmark(searchparameter={})
|
33
|
+
if has_needed_search_parameter(searchparameter)
|
34
|
+
format_result(searchApiCall(searchparameter), :return, :bookmark)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# id = integer
|
39
|
+
# e.g. @connect.getBookmark(12345)
|
40
|
+
#
|
41
|
+
# returns the contactgroup or nil
|
42
|
+
#
|
43
|
+
def getBookmark(id)
|
44
|
+
format_result(getApiCall(id), :return, :bookmark)
|
45
|
+
end
|
46
|
+
|
47
|
+
# get modified contactgroups since date
|
48
|
+
# datetime = "2010-02-23 10:00:00" or just "2010-02-23"
|
49
|
+
# e.g. @connect.getBookmarkSync("2010-02-23 10:00:00")
|
50
|
+
def getBookmarkSync(datetime)
|
51
|
+
format_result(getSyncApiCall(datetime), :return, :bookmark)
|
52
|
+
end
|
53
|
+
|
54
|
+
# required: name and id
|
55
|
+
# note: you can only change the name
|
56
|
+
# return true if the changed happened
|
57
|
+
def modifyBookmark(details={})
|
58
|
+
if has_needed_fields(details, :id)
|
59
|
+
format_result(modifyApiCall({:bookmark => details}), :ok)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
# id = integer
|
64
|
+
# e.g. @connect.deleteBookmark(12345)
|
65
|
+
# return true when contactgroup is deleted
|
66
|
+
def deleteBookmark(id)
|
67
|
+
format_result(deleteApiCall(id), :ok)
|
68
|
+
end
|
69
|
+
|
70
|
+
end # class
|
71
|
+
|
72
|
+
end # module
|
data/lib/memotoo/connect.rb
CHANGED
data/memotoo.gemspec
CHANGED
@@ -5,10 +5,10 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{memotoo}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = [
|
11
|
+
s.authors = ["Karsten Redmer"]
|
12
12
|
s.date = %q{2011-06-08}
|
13
13
|
s.description = %q{Unofficial gem for connecting to memotoo.com with their soap-api and handle your contact needs. Memotoo lets your synchronize all your contacts, events and tasks with yahoo, gmail, facebook, xing, outlook, your mobile-phone and more. You can also get your e-mails in one place.}
|
14
14
|
s.email = %q{k.redmer@yahoo.de}
|
@@ -27,6 +27,7 @@ Gem::Specification.new do |s|
|
|
27
27
|
"Rakefile",
|
28
28
|
"VERSION",
|
29
29
|
"lib/memotoo.rb",
|
30
|
+
"lib/memotoo/bookmark/bookmark.rb",
|
30
31
|
"lib/memotoo/connect.rb",
|
31
32
|
"lib/memotoo/contact/contact.rb",
|
32
33
|
"lib/memotoo/contact/contact_group.rb",
|
@@ -36,15 +37,21 @@ Gem::Specification.new do |s|
|
|
36
37
|
"lib/memotoo/wsdl/https.xml",
|
37
38
|
"memotoo.gemspec",
|
38
39
|
"test/helper.rb",
|
40
|
+
"test/test_bookmark.rb",
|
41
|
+
"test/test_contact.rb",
|
42
|
+
"test/test_contact_group.rb",
|
39
43
|
"test/test_memotoo.rb"
|
40
44
|
]
|
41
45
|
s.homepage = %q{http://github.com/kredmer/memotoo}
|
42
|
-
s.licenses = [
|
43
|
-
s.require_paths = [
|
44
|
-
s.rubygems_version = %q{1.
|
46
|
+
s.licenses = ["MIT"]
|
47
|
+
s.require_paths = ["lib"]
|
48
|
+
s.rubygems_version = %q{1.6.2}
|
45
49
|
s.summary = %q{Unofficial gem for connecting to memotoo.com with their given soap-api}
|
46
50
|
s.test_files = [
|
47
51
|
"test/helper.rb",
|
52
|
+
"test/test_bookmark.rb",
|
53
|
+
"test/test_contact.rb",
|
54
|
+
"test/test_contact_group.rb",
|
48
55
|
"test/test_memotoo.rb"
|
49
56
|
]
|
50
57
|
|
data/test/helper.rb
CHANGED
@@ -14,7 +14,16 @@ require 'shoulda'
|
|
14
14
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
15
15
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
16
16
|
|
17
|
-
|
17
|
+
require 'savon'
|
18
|
+
require File.dirname(__FILE__) + "/../lib/memotoo"
|
18
19
|
|
19
20
|
class Test::Unit::TestCase
|
21
|
+
|
22
|
+
# put your own credentials here
|
23
|
+
MEMOTOO_USERNAME = "memotoo-tester"
|
24
|
+
MEMOTOO_PASSWORD = "memotoo-tester"
|
25
|
+
|
26
|
+
TESTSEARCHDEFAULTS = {:search=>" ", :limit_start => '0', :limit_nb => '1'}
|
27
|
+
|
20
28
|
end
|
29
|
+
|
@@ -0,0 +1,85 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestBookmark < Test::Unit::TestCase
|
4
|
+
|
5
|
+
TESTBOOKMARK="www.testbookmark.de"
|
6
|
+
TESTBOOKMARKSEARCH = {:search=>TESTBOOKMARK}
|
7
|
+
|
8
|
+
context "what we could do with bookmarks" do
|
9
|
+
|
10
|
+
setup do
|
11
|
+
@connect=Memotoo::Connect.new(MEMOTOO_USERNAME,MEMOTOO_PASSWORD)
|
12
|
+
#puts "testing bookmarks...."
|
13
|
+
end
|
14
|
+
|
15
|
+
context "Adding and finding bookmarks" do
|
16
|
+
|
17
|
+
should "add a new testbookmark" do
|
18
|
+
response = @connect.addBookmark({:url => TESTBOOKMARK})
|
19
|
+
assert_not_nil response
|
20
|
+
end
|
21
|
+
|
22
|
+
should "add a new testbookmark (and look for needed params)" do
|
23
|
+
response = @connect.addBookmark({})
|
24
|
+
assert_nil response
|
25
|
+
end
|
26
|
+
|
27
|
+
should "find the testbookmark" do
|
28
|
+
response = @connect.searchBookmark(TESTBOOKMARKSEARCH)
|
29
|
+
assert_not_nil response
|
30
|
+
end
|
31
|
+
|
32
|
+
should "not find a non existent contact" do
|
33
|
+
response = @connect.searchBookmark(
|
34
|
+
{:search=>"Testbookmark1234567890"})
|
35
|
+
assert_nil response
|
36
|
+
end
|
37
|
+
|
38
|
+
should "look for a search parameter in search" do
|
39
|
+
response = @connect.searchBookmark({})
|
40
|
+
assert !response
|
41
|
+
end
|
42
|
+
|
43
|
+
should "get the testbookmark" do
|
44
|
+
response = @connect.searchBookmark(TESTBOOKMARKSEARCH)
|
45
|
+
contact = @connect.getBookmark(response[:id])
|
46
|
+
assert_not_nil contact
|
47
|
+
end
|
48
|
+
|
49
|
+
should "get the bookmarks changed since 2011-01-01" do
|
50
|
+
response = @connect.getBookmarkSync("2011-01-01 00:00:00")
|
51
|
+
assert_not_nil response
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
|
56
|
+
context "B Modifying bookmarks" do
|
57
|
+
|
58
|
+
should "modify the testbookmark" do
|
59
|
+
response = @connect.searchBookmark(TESTBOOKMARKSEARCH)
|
60
|
+
contact = @connect.modifyBookmark(
|
61
|
+
{:id=>response[:id],
|
62
|
+
:url=>TESTBOOKMARK,
|
63
|
+
:description => "nice"})
|
64
|
+
assert contact
|
65
|
+
end
|
66
|
+
|
67
|
+
should "modify the testbookmark (and look for needed params)" do
|
68
|
+
response = @connect.searchBookmark(TESTBOOKMARKSEARCH)
|
69
|
+
contact = @connect.modifyBookmark({})
|
70
|
+
assert !contact
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
|
75
|
+
context "Deleting bookmarks" do
|
76
|
+
|
77
|
+
should "delete the testbookmark" do
|
78
|
+
response = @connect.searchBookmark(TESTBOOKMARKSEARCH)
|
79
|
+
contact = @connect.deleteBookmark(response[:id])
|
80
|
+
assert contact
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestMemotoo < Test::Unit::TestCase
|
4
|
+
|
5
|
+
context "what we could do with contacts" do
|
6
|
+
|
7
|
+
setup do
|
8
|
+
@connect=Memotoo::Connect.new(MEMOTOO_USERNAME,MEMOTOO_PASSWORD)
|
9
|
+
#puts "testing contacts...."
|
10
|
+
end
|
11
|
+
|
12
|
+
context "Adding and finding contacts" do
|
13
|
+
|
14
|
+
should "add a new testcontact" do
|
15
|
+
response = @connect.addContact({:lastname => "Testcontact123456"})
|
16
|
+
assert_not_nil response
|
17
|
+
end
|
18
|
+
|
19
|
+
should "add a new testcontact (and look for needed params)" do
|
20
|
+
response = @connect.addContact({})
|
21
|
+
assert_nil response
|
22
|
+
end
|
23
|
+
|
24
|
+
should "find the testcontact" do
|
25
|
+
response = @connect.searchContact({:search=>"Testcontact123456"})
|
26
|
+
assert_not_nil response
|
27
|
+
end
|
28
|
+
|
29
|
+
should "not find a non existent contact" do
|
30
|
+
response = @connect.searchContact({:search=>"Testcontact1234567890"})
|
31
|
+
assert_nil response
|
32
|
+
end
|
33
|
+
|
34
|
+
should "look for a search parameter in search" do
|
35
|
+
response = @connect.searchContact({})
|
36
|
+
assert !response
|
37
|
+
end
|
38
|
+
|
39
|
+
should "get the testcontact" do
|
40
|
+
response = @connect.searchContact({:search=>"Testcontact123456"})
|
41
|
+
contact = @connect.getContact(response[:id])
|
42
|
+
assert_not_nil contact
|
43
|
+
end
|
44
|
+
|
45
|
+
should "get the contacts changed since 2011-01-01" do
|
46
|
+
response = @connect.getContactSync("2011-01-01 00:00:00")
|
47
|
+
assert_not_nil response
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
|
52
|
+
context "B Modifying contacts" do
|
53
|
+
|
54
|
+
should "modify the testcontact" do
|
55
|
+
response = @connect.searchContact({:search=>"Testcontact123456"})
|
56
|
+
contact = @connect.modifyContact({:id=>response[:id], :lastname=>"Testcontact123456", :firstname=>"test"})
|
57
|
+
assert contact
|
58
|
+
end
|
59
|
+
|
60
|
+
should "modify the testcontact (and look for needed params)" do
|
61
|
+
response = @connect.searchContact({:search=>"Testcontact123456"})
|
62
|
+
contact = @connect.modifyContact({})
|
63
|
+
assert !contact
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
|
68
|
+
context "Deleting contacts" do
|
69
|
+
|
70
|
+
should "delete the testcontact" do
|
71
|
+
response = @connect.searchContact({:search=>"Testcontact123456"})
|
72
|
+
contact = @connect.deleteContact(response[:id])
|
73
|
+
assert contact
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestMemotoo < Test::Unit::TestCase
|
4
|
+
|
5
|
+
context "what we could do with contactgroups" do
|
6
|
+
|
7
|
+
setup do
|
8
|
+
@connect=Memotoo::Connect.new(MEMOTOO_USERNAME,MEMOTOO_PASSWORD)
|
9
|
+
end
|
10
|
+
|
11
|
+
context "Adding and finding contactgroups" do
|
12
|
+
|
13
|
+
should "add a new testcontactgroup" do
|
14
|
+
response = @connect.addContactGroup({:name=>"TestcontactGroup123456"})
|
15
|
+
assert_not_nil response
|
16
|
+
end
|
17
|
+
|
18
|
+
should "add a new testcontactgroup (and look for needed params)" do
|
19
|
+
response = @connect.addContactGroup({})
|
20
|
+
assert_nil response
|
21
|
+
end
|
22
|
+
|
23
|
+
should "find the testcontactgroup" do
|
24
|
+
response = @connect.searchContactGroup({:search=>"TestcontactGroup123456"})
|
25
|
+
assert_not_nil response
|
26
|
+
end
|
27
|
+
|
28
|
+
should "not find a non existent contactgroup" do
|
29
|
+
response = @connect.searchContactGroup({:search=>"TestcontactGroup1234567890"})
|
30
|
+
assert_nil response
|
31
|
+
end
|
32
|
+
|
33
|
+
should "look for a search parameter in search" do
|
34
|
+
response = @connect.searchContactGroup({})
|
35
|
+
assert !response
|
36
|
+
end
|
37
|
+
|
38
|
+
should "get the testcontactgroup" do
|
39
|
+
response = @connect.searchContactGroup({:search=>"TestcontactGroup123456"})
|
40
|
+
contactgroup = @connect.getContactGroup(response[:id])
|
41
|
+
assert_not_nil contactgroup
|
42
|
+
end
|
43
|
+
|
44
|
+
should "get the contactgroups changed since 2011-01-01" do
|
45
|
+
response = @connect.getContactGroupSync("2011-01-01 00:00:00")
|
46
|
+
assert_not_nil response
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
|
51
|
+
context "B Modifying contactgroups" do
|
52
|
+
|
53
|
+
should "modify the testcontactgroup" do
|
54
|
+
response = @connect.searchContactGroup({:search=>"TestcontactGroup123456"})
|
55
|
+
#puts "response:::"+response.to_s
|
56
|
+
contactgroup = @connect.modifyContactGroup({:id=>response[:id], :name=>"TestcontactGroup1234567"})
|
57
|
+
assert contactgroup
|
58
|
+
end
|
59
|
+
|
60
|
+
should "modify the testcontactgroup (and look for needed params)" do
|
61
|
+
response = @connect.searchContactGroup({:search=>"TestcontactGroup123456"})
|
62
|
+
contact = @connect.modifyContactGroup({})
|
63
|
+
assert !contact
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
|
68
|
+
context "Deleting contactgroups" do
|
69
|
+
|
70
|
+
should "delete the testcontactgroup" do
|
71
|
+
response = @connect.searchContactGroup({:search=>"TestcontactGroup1234567"})
|
72
|
+
contactgroup = @connect.deleteContactGroup(response[:id])
|
73
|
+
assert contactgroup
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
78
|
+
end
|
data/test/test_memotoo.rb
CHANGED
@@ -1,16 +1,9 @@
|
|
1
1
|
require 'helper'
|
2
|
-
require 'savon'
|
3
|
-
require File.dirname(__FILE__) + "/../lib/memotoo"
|
4
2
|
|
5
3
|
|
6
4
|
class TestMemotoo < Test::Unit::TestCase
|
7
|
-
|
8
|
-
# put your own credentials here
|
9
|
-
|
10
|
-
MEMOTOO_USERNAME = "memotoo-tester"
|
11
|
-
MEMOTOO_PASSWORD = "memotoo-tester"
|
12
5
|
|
13
|
-
context "Memotoo-Soap Api
|
6
|
+
context "Memotoo-Soap Api basic tests" do
|
14
7
|
|
15
8
|
setup do
|
16
9
|
@connect=Memotoo::Connect.new(MEMOTOO_USERNAME,MEMOTOO_PASSWORD)
|
@@ -22,176 +15,29 @@ class TestMemotoo < Test::Unit::TestCase
|
|
22
15
|
|
23
16
|
should "write a message if username/password is not correct" do
|
24
17
|
@connect=Memotoo::Connect.new(MEMOTOO_USERNAME,"wrongpasswd")
|
25
|
-
response = @connect.searchContact(
|
18
|
+
response = @connect.searchContact(TESTSEARCHDEFAULTS)
|
26
19
|
assert_raise RuntimeError do
|
27
20
|
raise 'Boom!!!'
|
28
21
|
end
|
29
22
|
end
|
30
23
|
|
31
24
|
should "have valid username and password and get search results" do
|
32
|
-
response = @connect.searchContact(
|
25
|
+
response = @connect.searchContact(TESTSEARCHDEFAULTS)
|
33
26
|
assert_not_nil response
|
34
27
|
end
|
35
28
|
|
36
29
|
|
37
30
|
should "also use http request instead of https" do
|
38
|
-
|
39
|
-
response = @connect.searchContact(
|
31
|
+
@connect=Memotoo::Connect.new(MEMOTOO_USERNAME,MEMOTOO_PASSWORD, false)
|
32
|
+
response = @connect.searchContact(TESTSEARCHDEFAULTS)
|
40
33
|
assert_not_nil response
|
41
34
|
end
|
42
35
|
|
43
|
-
|
44
|
-
|
45
|
-
context "Adding and finding contacts" do
|
46
|
-
|
47
|
-
should "add a new testcontact" do
|
48
|
-
response = @connect.addContact({:lastname => "Testcontact123456"})
|
49
|
-
assert_not_nil response
|
50
|
-
end
|
51
|
-
|
52
|
-
should "add a new testcontact (and look for needed params)" do
|
53
|
-
response = @connect.addContact({})
|
54
|
-
assert_nil response
|
55
|
-
end
|
56
|
-
|
57
|
-
|
58
|
-
should "find the testcontact" do
|
59
|
-
response = @connect.searchContact({:search=>"Testcontact123456"})
|
60
|
-
assert_not_nil response
|
61
|
-
end
|
62
|
-
|
63
|
-
should "not find a non existent contact" do
|
64
|
-
response = @connect.searchContact({:search=>"Testcontact1234567890"})
|
65
|
-
assert_nil response
|
66
|
-
end
|
67
|
-
|
68
|
-
should "look for a search parameter in search" do
|
69
|
-
response = @connect.searchContact({})
|
70
|
-
assert !response
|
71
|
-
end
|
72
|
-
|
73
|
-
|
74
|
-
should "get the testcontact" do
|
75
|
-
response = @connect.searchContact({:search=>"Testcontact123456"})
|
76
|
-
contact = @connect.getContact(response[:id])
|
77
|
-
assert_not_nil contact
|
78
|
-
end
|
79
|
-
|
80
|
-
should "get the contacts changed since 2011-01-01" do
|
81
|
-
response = @connect.getContactSync("2011-01-01 00:00:00")
|
82
|
-
assert_not_nil response
|
83
|
-
end
|
84
|
-
|
85
|
-
end
|
86
|
-
|
87
|
-
|
88
|
-
context "B Modifying contacts" do
|
89
|
-
|
90
|
-
should "modify the testcontact" do
|
91
|
-
response = @connect.searchContact({:search=>"Testcontact123456"})
|
92
|
-
contact = @connect.modifyContact({:id=>response[:id], :lastname=>"Testcontact123456", :firstname=>"test"})
|
93
|
-
assert contact
|
94
|
-
end
|
95
|
-
|
96
|
-
should "modify the testcontact (and look for needed params)" do
|
97
|
-
response = @connect.searchContact({:search=>"Testcontact123456"})
|
98
|
-
contact = @connect.modifyContact({})
|
99
|
-
assert !contact
|
100
|
-
end
|
101
|
-
|
102
|
-
|
103
|
-
end
|
104
|
-
|
105
|
-
|
106
|
-
context "Deleting contacts" do
|
107
|
-
|
108
|
-
should "delete the testcontact" do
|
109
|
-
response = @connect.searchContact({:search=>"Testcontact123456"})
|
110
|
-
contact = @connect.deleteContact(response[:id])
|
111
|
-
assert contact
|
112
|
-
end
|
113
|
-
|
114
|
-
end
|
115
|
-
|
116
|
-
|
117
|
-
context "Adding and finding contactgroups" do
|
118
|
-
|
119
|
-
should "add a new testcontactgroup" do
|
120
|
-
response = @connect.addContactGroup({:name=>"TestcontactGroup123456"})
|
121
|
-
assert_not_nil response
|
122
|
-
end
|
123
|
-
|
124
|
-
should "add a new testcontactgroup (and look for needed params)" do
|
125
|
-
response = @connect.addContactGroup({})
|
126
|
-
assert_nil response
|
127
|
-
end
|
128
|
-
|
129
|
-
|
130
|
-
should "find the testcontactgroup" do
|
131
|
-
response = @connect.searchContactGroup({:search=>"TestcontactGroup123456"})
|
132
|
-
assert_not_nil response
|
133
|
-
end
|
134
|
-
|
135
|
-
should "not find a non existent contactgroup" do
|
136
|
-
response = @connect.searchContactGroup({:search=>"TestcontactGroup1234567890"})
|
137
|
-
assert_nil response
|
138
|
-
end
|
139
|
-
|
140
|
-
should "look for a search parameter in search" do
|
141
|
-
response = @connect.searchContactGroup({})
|
142
|
-
assert !response
|
143
|
-
end
|
144
|
-
|
145
|
-
|
146
|
-
should "get the testcontactgroup" do
|
147
|
-
response = @connect.searchContactGroup({:search=>"TestcontactGroup123456"})
|
148
|
-
contactgroup = @connect.getContactGroup(response[:id])
|
149
|
-
assert_not_nil contactgroup
|
150
|
-
end
|
151
|
-
|
152
|
-
should "get the contactgroups changed since 2011-01-01" do
|
153
|
-
response = @connect.getContactGroupSync("2011-01-01 00:00:00")
|
154
|
-
assert_not_nil response
|
155
|
-
end
|
156
|
-
|
157
|
-
end
|
158
|
-
|
159
|
-
|
160
|
-
context "B Modifying contactgroups" do
|
161
|
-
|
162
|
-
should "modify the testcontactgroup" do
|
163
|
-
response = @connect.searchContactGroup({:search=>"TestcontactGroup123456"})
|
164
|
-
#puts "response:::"+response.to_s
|
165
|
-
contactgroup = @connect.modifyContactGroup({:id=>response[:id], :name=>"TestcontactGroup1234567"})
|
166
|
-
assert contactgroup
|
167
|
-
end
|
168
|
-
|
169
|
-
should "modify the testcontactgroup (and look for needed params)" do
|
170
|
-
response = @connect.searchContactGroup({:search=>"TestcontactGroup123456"})
|
171
|
-
contact = @connect.modifyContactGroup({})
|
172
|
-
assert !contact
|
173
|
-
end
|
174
|
-
|
175
|
-
end
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
context "Deleting contactgroups" do
|
180
|
-
|
181
|
-
should "delete the testcontactgroup" do
|
182
|
-
response = @connect.searchContactGroup({:search=>"TestcontactGroup1234567"})
|
183
|
-
contactgroup = @connect.deleteContactGroup(response[:id])
|
184
|
-
assert contactgroup
|
185
|
-
end
|
186
|
-
|
187
|
-
end
|
188
|
-
|
189
|
-
|
190
|
-
|
191
36
|
end
|
192
37
|
|
193
38
|
end
|
194
39
|
|
40
|
+
|
195
41
|
# uncomment this if you want to see everything in log what happens...it's a lot
|
196
42
|
#module Savon
|
197
43
|
# module Global
|
@@ -214,24 +60,26 @@ end
|
|
214
60
|
|
215
61
|
################## rcov-result ######################
|
216
62
|
|
217
|
-
#Generated on Wed Jun 08
|
63
|
+
#Generated on Wed Jun 08 22:39:46 +0200 2011 with rcov 0.9.8
|
218
64
|
|
219
|
-
#Finished in
|
65
|
+
#Finished in 33.501191 seconds.
|
220
66
|
|
221
|
-
#
|
67
|
+
#34 tests, 34 assertions, 0 failures, 0 errors
|
222
68
|
#+----------------------------------------------------+-------+-------+--------+
|
223
69
|
#| File | Lines | LOC | COV |
|
224
70
|
#+----------------------------------------------------+-------+-------+--------+
|
225
71
|
#|lib/memotoo.rb | 8 | 5 | 100.0% |
|
226
|
-
#|lib/memotoo/
|
227
|
-
#|lib/memotoo/
|
228
|
-
#|lib/memotoo/contact/
|
72
|
+
#|lib/memotoo/bookmark/bookmark.rb | 72 | 28 | 100.0% |
|
73
|
+
#|lib/memotoo/connect.rb | 244 | 98 | 100.0% |
|
74
|
+
#|lib/memotoo/contact/contact.rb | 162 | 28 | 100.0% |
|
75
|
+
#|lib/memotoo/contact/contact_group.rb | 69 | 31 | 100.0% |
|
229
76
|
#|lib/memotoo/core-ext/hash.rb | 41 | 25 | 100.0% |
|
230
77
|
#|lib/memotoo/core-ext/kernel.rb | 10 | 6 | 100.0% |
|
231
78
|
#+----------------------------------------------------+-------+-------+--------+
|
232
|
-
#|Total |
|
79
|
+
#|Total | 606 | 221 | 100.0% |
|
233
80
|
#+----------------------------------------------------+-------+-------+--------+
|
234
|
-
#100.0%
|
81
|
+
#100.0% 7 file(s) 606 Lines 221 LOC
|
82
|
+
|
235
83
|
|
236
84
|
|
237
85
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: memotoo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 6
|
10
|
+
version: 1.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Karsten Redmer
|
@@ -15,10 +15,12 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-06-08 00:00:00
|
18
|
+
date: 2011-06-08 00:00:00 +02:00
|
19
|
+
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
|
-
|
22
|
+
type: :runtime
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
22
24
|
none: false
|
23
25
|
requirements:
|
24
26
|
- - ">="
|
@@ -27,12 +29,12 @@ dependencies:
|
|
27
29
|
segments:
|
28
30
|
- 0
|
29
31
|
version: "0"
|
30
|
-
type: :runtime
|
31
|
-
requirement: *id001
|
32
|
-
prerelease: false
|
33
32
|
name: i18n
|
33
|
+
version_requirements: *id001
|
34
|
+
prerelease: false
|
34
35
|
- !ruby/object:Gem::Dependency
|
35
|
-
|
36
|
+
type: :runtime
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
36
38
|
none: false
|
37
39
|
requirements:
|
38
40
|
- - ">="
|
@@ -43,12 +45,12 @@ dependencies:
|
|
43
45
|
- 3
|
44
46
|
- 5
|
45
47
|
version: 2.3.5
|
46
|
-
type: :runtime
|
47
|
-
requirement: *id002
|
48
|
-
prerelease: false
|
49
48
|
name: activesupport
|
49
|
+
version_requirements: *id002
|
50
|
+
prerelease: false
|
50
51
|
- !ruby/object:Gem::Dependency
|
51
|
-
|
52
|
+
type: :runtime
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
54
|
none: false
|
53
55
|
requirements:
|
54
56
|
- - ~>
|
@@ -59,12 +61,12 @@ dependencies:
|
|
59
61
|
- 9
|
60
62
|
- 2
|
61
63
|
version: 0.9.2
|
62
|
-
type: :runtime
|
63
|
-
requirement: *id003
|
64
|
-
prerelease: false
|
65
64
|
name: savon
|
65
|
+
version_requirements: *id003
|
66
|
+
prerelease: false
|
66
67
|
- !ruby/object:Gem::Dependency
|
67
|
-
|
68
|
+
type: :development
|
69
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
68
70
|
none: false
|
69
71
|
requirements:
|
70
72
|
- - ~>
|
@@ -75,12 +77,12 @@ dependencies:
|
|
75
77
|
- 1
|
76
78
|
- 2
|
77
79
|
version: 1.1.2
|
78
|
-
type: :development
|
79
|
-
requirement: *id004
|
80
|
-
prerelease: false
|
81
80
|
name: rack
|
81
|
+
version_requirements: *id004
|
82
|
+
prerelease: false
|
82
83
|
- !ruby/object:Gem::Dependency
|
83
|
-
|
84
|
+
type: :development
|
85
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
84
86
|
none: false
|
85
87
|
requirements:
|
86
88
|
- - ">="
|
@@ -89,12 +91,12 @@ dependencies:
|
|
89
91
|
segments:
|
90
92
|
- 0
|
91
93
|
version: "0"
|
92
|
-
type: :development
|
93
|
-
requirement: *id005
|
94
|
-
prerelease: false
|
95
94
|
name: shoulda
|
95
|
+
version_requirements: *id005
|
96
|
+
prerelease: false
|
96
97
|
- !ruby/object:Gem::Dependency
|
97
|
-
|
98
|
+
type: :development
|
99
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
98
100
|
none: false
|
99
101
|
requirements:
|
100
102
|
- - ~>
|
@@ -105,12 +107,12 @@ dependencies:
|
|
105
107
|
- 0
|
106
108
|
- 0
|
107
109
|
version: 1.0.0
|
108
|
-
type: :development
|
109
|
-
requirement: *id006
|
110
|
-
prerelease: false
|
111
110
|
name: bundler
|
111
|
+
version_requirements: *id006
|
112
|
+
prerelease: false
|
112
113
|
- !ruby/object:Gem::Dependency
|
113
|
-
|
114
|
+
type: :development
|
115
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
114
116
|
none: false
|
115
117
|
requirements:
|
116
118
|
- - ~>
|
@@ -121,12 +123,12 @@ dependencies:
|
|
121
123
|
- 5
|
122
124
|
- 2
|
123
125
|
version: 1.5.2
|
124
|
-
type: :development
|
125
|
-
requirement: *id007
|
126
|
-
prerelease: false
|
127
126
|
name: jeweler
|
127
|
+
version_requirements: *id007
|
128
|
+
prerelease: false
|
128
129
|
- !ruby/object:Gem::Dependency
|
129
|
-
|
130
|
+
type: :development
|
131
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
130
132
|
none: false
|
131
133
|
requirements:
|
132
134
|
- - ">="
|
@@ -135,12 +137,12 @@ dependencies:
|
|
135
137
|
segments:
|
136
138
|
- 0
|
137
139
|
version: "0"
|
138
|
-
type: :development
|
139
|
-
requirement: *id008
|
140
|
-
prerelease: false
|
141
140
|
name: rcov
|
141
|
+
version_requirements: *id008
|
142
|
+
prerelease: false
|
142
143
|
- !ruby/object:Gem::Dependency
|
143
|
-
|
144
|
+
type: :runtime
|
145
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
144
146
|
none: false
|
145
147
|
requirements:
|
146
148
|
- - ">="
|
@@ -149,10 +151,9 @@ dependencies:
|
|
149
151
|
segments:
|
150
152
|
- 0
|
151
153
|
version: "0"
|
152
|
-
type: :runtime
|
153
|
-
requirement: *id009
|
154
|
-
prerelease: false
|
155
154
|
name: savon
|
155
|
+
version_requirements: *id009
|
156
|
+
prerelease: false
|
156
157
|
description: Unofficial gem for connecting to memotoo.com with their soap-api and handle your contact needs. Memotoo lets your synchronize all your contacts, events and tasks with yahoo, gmail, facebook, xing, outlook, your mobile-phone and more. You can also get your e-mails in one place.
|
157
158
|
email: k.redmer@yahoo.de
|
158
159
|
executables: []
|
@@ -173,6 +174,7 @@ files:
|
|
173
174
|
- Rakefile
|
174
175
|
- VERSION
|
175
176
|
- lib/memotoo.rb
|
177
|
+
- lib/memotoo/bookmark/bookmark.rb
|
176
178
|
- lib/memotoo/connect.rb
|
177
179
|
- lib/memotoo/contact/contact.rb
|
178
180
|
- lib/memotoo/contact/contact_group.rb
|
@@ -182,7 +184,11 @@ files:
|
|
182
184
|
- lib/memotoo/wsdl/https.xml
|
183
185
|
- memotoo.gemspec
|
184
186
|
- test/helper.rb
|
187
|
+
- test/test_bookmark.rb
|
188
|
+
- test/test_contact.rb
|
189
|
+
- test/test_contact_group.rb
|
185
190
|
- test/test_memotoo.rb
|
191
|
+
has_rdoc: true
|
186
192
|
homepage: http://github.com/kredmer/memotoo
|
187
193
|
licenses:
|
188
194
|
- MIT
|
@@ -212,10 +218,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
212
218
|
requirements: []
|
213
219
|
|
214
220
|
rubyforge_project:
|
215
|
-
rubygems_version: 1.
|
221
|
+
rubygems_version: 1.6.2
|
216
222
|
signing_key:
|
217
223
|
specification_version: 3
|
218
224
|
summary: Unofficial gem for connecting to memotoo.com with their given soap-api
|
219
225
|
test_files:
|
220
226
|
- test/helper.rb
|
227
|
+
- test/test_bookmark.rb
|
228
|
+
- test/test_contact.rb
|
229
|
+
- test/test_contact_group.rb
|
221
230
|
- test/test_memotoo.rb
|