memotoo 1.0.6 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +65 -11
- data/Rakefile +10 -1
- data/VERSION +1 -1
- data/lib/memotoo.rb +69 -2
- data/lib/memotoo/core-ext/hash.rb +2 -2
- data/lib/memotoo/core-ext/kernel.rb +1 -1
- data/lib/memotoo/main.rb +280 -0
- data/memotoo.gemspec +17 -18
- data/test/test_memotoo.rb +6 -8
- data/test/test_soapobjects.rb +123 -0
- metadata +19 -19
- data/.rvmrc-old +0 -1
- data/lib/memotoo/bookmark/bookmark.rb +0 -72
- data/lib/memotoo/connect.rb +0 -244
- data/lib/memotoo/contact/contact.rb +0 -162
- data/lib/memotoo/contact/contact_group.rb +0 -69
- data/lib/memotoo/wsdl/http.xml +0 -526
- data/lib/memotoo/wsdl/https.xml +0 -526
- data/test/test_bookmark.rb +0 -85
- data/test/test_contact.rb +0 -78
- data/test/test_contact_group.rb +0 -78
data/test/test_bookmark.rb
DELETED
@@ -1,85 +0,0 @@
|
|
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
|
data/test/test_contact.rb
DELETED
@@ -1,78 +0,0 @@
|
|
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
|
data/test/test_contact_group.rb
DELETED
@@ -1,78 +0,0 @@
|
|
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
|