google_calendar 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -10
- data/.travis.yml +1 -1
- data/Gemfile +2 -12
- data/Gemfile.lock +81 -24
- data/Guardfile +7 -0
- data/README.rdoc +60 -8
- data/VERSION +1 -1
- data/google_calendar.gemspec +19 -29
- data/lib/google/calendar.rb +149 -118
- data/lib/google/connection.rb +114 -79
- data/lib/google/errors.rb +2 -1
- data/lib/google/event.rb +191 -94
- data/lib/google_calendar.rb +5 -5
- data/readme_code.rb +72 -0
- data/test/helper.rb +12 -5
- data/test/mocks/401.json +15 -0
- data/test/mocks/403.json +12 -0
- data/test/mocks/404.json +13 -0
- data/test/mocks/create_event.json +31 -0
- data/test/mocks/create_quickadd_event.json +30 -0
- data/test/mocks/empty_events.json +12 -0
- data/test/mocks/events.json +117 -0
- data/test/mocks/find_event_by_id.json +31 -0
- data/test/mocks/login_with_auth_code_fail.json +4 -0
- data/test/mocks/login_with_auth_code_success.json +6 -0
- data/test/mocks/login_with_refresh_token_success.json +5 -0
- data/test/mocks/query_events.json +44 -0
- data/test/mocks/repeating_events.json +48 -0
- data/test/mocks/successful_login.json +6 -0
- data/test/test_google_calendar.rb +167 -139
- metadata +167 -53
- data/lib/google/net/https.rb +0 -19
- data/test/mocks/create_event.xml +0 -31
- data/test/mocks/create_quickadd_event.xml +0 -31
- data/test/mocks/events.xml +0 -119
- data/test/mocks/find_event_by_id.xml +0 -33
- data/test/mocks/list_calendars.xml +0 -89
- data/test/mocks/query_events.xml +0 -55
- data/test/mocks/successful_login.txt +0 -3
@@ -1,33 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:gCal="http://schemas.google.com/gCal/2005" xmlns:gd="http://schemas.google.com/g/2005">
|
3
|
-
<id>http://www.google.com/calendar/feeds/default/private/full/oj6fmpaulbvk9ouoj0lj4v6hio</id>
|
4
|
-
<published>2010-04-22T16:05:29.000Z</published>
|
5
|
-
<updated>2010-05-01T05:14:18.000Z</updated>
|
6
|
-
<category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/g/2005#event"/>
|
7
|
-
<title type="text">Test</title>
|
8
|
-
<content type="text"/>
|
9
|
-
<link rel="alternate" type="text/html" href="https://www.google.com/calendar/event?eid=b2o2Zm1wYXVsYnZrOW91b2owbGo0djZoaW8gc3RldmUuemljaEBt" title="alternate"/>
|
10
|
-
<link rel="self" type="application/atom+xml" href="https://www.google.com/calendar/feeds/default/private/full/oj6fmpaulbvk9ouoj0lj4v6hio"/>
|
11
|
-
<link rel="edit" type="application/atom+xml" href="https://www.google.com/calendar/feeds/default/private/full/oj6fmpaulbvk9ouoj0lj4v6hio/63408374058"/>
|
12
|
-
<author>
|
13
|
-
<name>Some Guy</name>
|
14
|
-
<email>some.guy@gmail.com</email>
|
15
|
-
</author>
|
16
|
-
<gd:comments>
|
17
|
-
<gd:feedLink href="https://www.google.com/calendar/feeds/default/private/full/oj6fmpaulbvk9ouoj0lj4v6hio/comments"/>
|
18
|
-
</gd:comments>
|
19
|
-
<gd:eventStatus value="http://schemas.google.com/g/2005#event.confirmed"/>
|
20
|
-
<gd:where valueString=""/>
|
21
|
-
<gd:who email="some.guy@gmail.com" rel="http://schemas.google.com/g/2005#event.organizer" valueString="some.guy@gmail.com"/>
|
22
|
-
<gd:when endTime="2010-04-09" startTime="2010-04-08">
|
23
|
-
<gd:reminder method="alert" minutes="10"/>
|
24
|
-
</gd:when>
|
25
|
-
<gd:transparency value="http://schemas.google.com/g/2005#event.transparent"/>
|
26
|
-
<gd:visibility value="http://schemas.google.com/g/2005#event.default"/>
|
27
|
-
<gCal:anyoneCanAddSelf value="false"/>
|
28
|
-
<gCal:guestsCanInviteOthers value="true"/>
|
29
|
-
<gCal:guestsCanModify value="false"/>
|
30
|
-
<gCal:guestsCanSeeGuests value="true"/>
|
31
|
-
<gCal:sequence value="0"/>
|
32
|
-
<gCal:uid value="oj6fmpaulbvk9ouoj0lj4v6hio@google.com"/>
|
33
|
-
</entry>
|
@@ -1,89 +0,0 @@
|
|
1
|
-
<?xml version='1.0' encoding='utf-8'?>
|
2
|
-
<feed xmlns='http://www.w3.org/2005/Atom'
|
3
|
-
xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/'
|
4
|
-
xmlns:gCal='http://schemas.google.com/gCal/2005'
|
5
|
-
xmlns:gd='http://schemas.google.com/g/2005'
|
6
|
-
gd:etag='W/"CkYFSHg-fyp7ImA9WxRVGUo."'>
|
7
|
-
<id>http://www.google.com/calendar/feeds/default/allcalendars/full</id>
|
8
|
-
<updated>2008-11-18T01:01:59.657Z</updated>
|
9
|
-
<title>Coach's Calendar List</title>
|
10
|
-
<link rel='alternate' type='text/html'
|
11
|
-
href='https://www.google.com/calendar/render' />
|
12
|
-
<link rel='http://schemas.google.com/g/2005#feed'
|
13
|
-
type='application/atom+xml'
|
14
|
-
href='https://www.google.com/calendar/feeds/default/allcalendars/full' />
|
15
|
-
<link rel='http://schemas.google.com/g/2005#post'
|
16
|
-
type='application/atom+xml'
|
17
|
-
href='https://www.google.com/calendar/feeds/default/allcalendars/full' />
|
18
|
-
<link rel='self' type='application/atom+xml'
|
19
|
-
href='https://www.google.com/calendar/feeds/default/allcalendars/full' />
|
20
|
-
<author>
|
21
|
-
<name>Coach</name>
|
22
|
-
<email>user@gmail.com</email>
|
23
|
-
</author>
|
24
|
-
<generator version='1.0' uri='http://www.google.com/calendar'>Google Calendar</generator>
|
25
|
-
<openSearch:startIndex>1</openSearch:startIndex>
|
26
|
-
<entry gd:etag='W/"DU4ERH47eCp7ImA9WxRVEkQ."'>
|
27
|
-
<id>http://www.google.com/calendar/feeds/default/allcalendars/full/user%40gmail.com</id>
|
28
|
-
<published>2007-07-11T22:10:30.257Z</published>
|
29
|
-
<updated>2007-07-11T21:46:35.000Z</updated>
|
30
|
-
<title>My Primary Calendar</title>
|
31
|
-
<summary type='text'>A primary calendar is created by default for each Google Calendar user.</summary>
|
32
|
-
<link rel='alternate' type='application/atom+xml' href='https://www.google.com/calendar/feeds/user%40gmail.com/private/full' />
|
33
|
-
<link rel='http://schemas.google.com/gCal/2005#eventFeed' type='application/atom+xml' href='https://www.google.com/calendar/feeds/user%40gmail.com/private/full' />
|
34
|
-
<link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://www.google.com/calendar/feeds/user%40gmail.com/acl/full' />
|
35
|
-
<link rel='self' type='application/atom+xml' href='https://www.google.com/calendar/feeds/default/allcalendars/full/user%40gmail.com' />
|
36
|
-
<link rel='edit' type='application/atom+xml' href='https://www.google.com/calendar/feeds/default/allcalendars/full/user%40gmail.com' />
|
37
|
-
<author>
|
38
|
-
<name>Coach</name>
|
39
|
-
<email>user@gmail.com</email>
|
40
|
-
</author>
|
41
|
-
<gCal:timezone value='America/Los_Angeles' />
|
42
|
-
<gCal:hidden value='false' />
|
43
|
-
<gCal:color value='#2952A3' />
|
44
|
-
<gCal:selected value='true' />
|
45
|
-
<gCal:accesslevel value='owner' />
|
46
|
-
<gd:where valueString='Mountain View' />
|
47
|
-
</entry>
|
48
|
-
<entry gd:etag='W/"Ck4GRH4-eSp7ImA9WxRVGUo."'>
|
49
|
-
<id>http://www.google.com/calendar/feeds/default/allcalendars/full/rf1c66uld6dgk2t5lh43svev6g%40group.calendar.google.com</id>
|
50
|
-
<published>2007-07-11T22:10:30.258Z</published>
|
51
|
-
<updated>2007-07-11T21:50:15.000Z</updated>
|
52
|
-
<title>Little Giants</title>
|
53
|
-
<summary type='text'>This calendar contains practice times and this season's Little League game schedule. Go Little Giants!</summary>
|
54
|
-
<link rel='alternate' type='application/atom+xml' href='https://www.google.com/calendar/feeds/rf1c66uld6dgk2t5lh43svev6g%40group.calendar.google.com/private/full'/>
|
55
|
-
<link rel='http://schemas.google.com/gCal/2005#eventFeed' type='application/atom+xml' href='https://www.google.com/calendar/feeds/rf1c66uld6dgk2t5lh43svev6g%40group.calendar.google.com/private/full'/>
|
56
|
-
<link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://www.google.com/calendar/feeds/rf1c66uld6dgk2t5lh43svev6g%40group.calendar.google.com/acl/full'/>
|
57
|
-
<link rel='self' type='application/atom+xml' href='https://www.google.com/calendar/feeds/default/allcalendars/full/rf1c66uld6dgk2t5lh43svev6g%40group.calendar.google.com'/>
|
58
|
-
<link rel='edit' type='application/atom+xml' href='https://www.google.com/calendar/feeds/default/allcalendars/full/rf1c66uld6dgk2t5lh43svev6g%40group.calendar.google.com'/>
|
59
|
-
<author>
|
60
|
-
<name>Little Giants</name>
|
61
|
-
</author>
|
62
|
-
<gCal:timezone value='America/Los_Angeles' />
|
63
|
-
<gCal:hidden value='false' />
|
64
|
-
<gCal:color value='#5A6986' />
|
65
|
-
<gCal:selected value='false' />
|
66
|
-
<gCal:accesslevel value='owner' />
|
67
|
-
<gd:where valueString='San Francisco' />
|
68
|
-
</entry>
|
69
|
-
<entry gd:etag='W/"C0cEQnkyeip7ImA9WxRVGUo."'>
|
70
|
-
<id>http://www.google.com/calendar/feeds/default/allcalendars/full/c4o4i7m2lbamc4k26sc2vokh5g%40group.calendar.google.com</id>
|
71
|
-
<published>2007-07-11T22:10:30.297Z</published>
|
72
|
-
<updated>2007-06-05T09:38:50.000Z</updated>
|
73
|
-
<title>Google Doodles</title>
|
74
|
-
<summary type='text'/>
|
75
|
-
<link rel='alternate' type='application/atom+xml' href='https://www.google.com/calendar/feeds/c4o4i7m2lbamc4k26sc2vokh5g%40group.calendar.google.com/private/full'/>
|
76
|
-
<link rel='http://schemas.google.com/gCal/2005#eventFeed' type='application/atom+xml' href='https://www.google.com/calendar/feeds/c4o4i7m2lbamc4k26sc2vokh5g%40group.calendar.google.com/private/full'/>
|
77
|
-
<link rel='self' type='application/atom+xml' href='https://www.google.com/calendar/feeds/default/allcalendars/full/c4o4i7m2lbamc4k26sc2vokh5g%40group.calendar.google.com'/>
|
78
|
-
<link rel='edit' type='application/atom+xml' href='https://www.google.com/calendar/feeds/default/allcalendars/full/c4o4i7m2lbamc4k26sc2vokh5g%40group.calendar.google.com'/>
|
79
|
-
<author>
|
80
|
-
<name>Google Doodles</name>
|
81
|
-
</author>
|
82
|
-
<gCal:timezone value='Etc/GMT' />
|
83
|
-
<gCal:hidden value='false' />
|
84
|
-
<gCal:color value='#5229A3' />
|
85
|
-
<gCal:selected value='false' />
|
86
|
-
<gCal:accesslevel value='read' />
|
87
|
-
<gd:where valueString='' />
|
88
|
-
</entry>
|
89
|
-
</feed>
|
data/test/mocks/query_events.xml
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:gCal="http://schemas.google.com/gCal/2005" xmlns:gd="http://schemas.google.com/g/2005">
|
3
|
-
<id>http://www.google.com/calendar/feeds/default/private/full</id>
|
4
|
-
<updated>2010-12-10T07:09:25.000Z</updated>
|
5
|
-
<category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/g/2005#event"/>
|
6
|
-
<title type="text">Some Guy</title>
|
7
|
-
<subtitle type="text">Some Guy</subtitle>
|
8
|
-
<link rel="alternate" type="text/html" href="https://www.google.com/calendar/embed?src=some.guy@gmail.com"/>
|
9
|
-
<link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="https://www.google.com/calendar/feeds/default/private/full"/>
|
10
|
-
<link rel="http://schemas.google.com/g/2005#post" type="application/atom+xml" href="https://www.google.com/calendar/feeds/default/private/full"/>
|
11
|
-
<link rel="http://schemas.google.com/g/2005#batch" type="application/atom+xml" href="https://www.google.com/calendar/feeds/default/private/full/batch"/>
|
12
|
-
<link rel="self" type="application/atom+xml" href="https://www.google.com/calendar/feeds/default/private/full?q=Test&max-results=25"/>
|
13
|
-
<author>
|
14
|
-
<name>Some Guy</name>
|
15
|
-
<email>some.guy@gmail.com</email>
|
16
|
-
</author>
|
17
|
-
<generator version="1.0" uri="http://www.google.com/calendar">Google Calendar</generator>
|
18
|
-
<openSearch:totalResults>1</openSearch:totalResults>
|
19
|
-
<openSearch:startIndex>1</openSearch:startIndex>
|
20
|
-
<openSearch:itemsPerPage>25</openSearch:itemsPerPage>
|
21
|
-
<gCal:timezone value="America/Los_Angeles"/>
|
22
|
-
<gCal:timesCleaned value="0"/>
|
23
|
-
<entry>
|
24
|
-
<id>http://www.google.com/calendar/feeds/default/private/full/oj6fmpaulbvk9ouoj0lj4v6hio</id>
|
25
|
-
<published>2010-04-22T16:05:29.000Z</published>
|
26
|
-
<updated>2010-05-01T05:14:18.000Z</updated>
|
27
|
-
<category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/g/2005#event"/>
|
28
|
-
<title type="text">Test</title>
|
29
|
-
<content type="text"/>
|
30
|
-
<link rel="alternate" type="text/html" href="https://www.google.com/calendar/event?eid=b2o2Zm1wYXVsYnZrOW91b2owbGo0djZoaW8gc3RldmUuemljaEBt" title="alternate"/>
|
31
|
-
<link rel="self" type="application/atom+xml" href="https://www.google.com/calendar/feeds/default/private/full/oj6fmpaulbvk9ouoj0lj4v6hio"/>
|
32
|
-
<link rel="edit" type="application/atom+xml" href="https://www.google.com/calendar/feeds/default/private/full/oj6fmpaulbvk9ouoj0lj4v6hio/63408374058"/>
|
33
|
-
<author>
|
34
|
-
<name>Some Guy</name>
|
35
|
-
<email>some.guy@gmail.com</email>
|
36
|
-
</author>
|
37
|
-
<gd:comments>
|
38
|
-
<gd:feedLink href="https://www.google.com/calendar/feeds/default/private/full/oj6fmpaulbvk9ouoj0lj4v6hio/comments"/>
|
39
|
-
</gd:comments>
|
40
|
-
<gd:eventStatus value="http://schemas.google.com/g/2005#event.confirmed"/>
|
41
|
-
<gd:where valueString="At School"/>
|
42
|
-
<gd:who email="some.guy@gmail.com" rel="http://schemas.google.com/g/2005#event.organizer" valueString="some.guy@gmail.com"/>
|
43
|
-
<gd:when endTime="2010-04-09" startTime="2010-04-08">
|
44
|
-
<gd:reminder method="alert" minutes="10"/>
|
45
|
-
</gd:when>
|
46
|
-
<gd:transparency value="http://schemas.google.com/g/2005#event.transparent"/>
|
47
|
-
<gd:visibility value="http://schemas.google.com/g/2005#event.default"/>
|
48
|
-
<gCal:anyoneCanAddSelf value="false"/>
|
49
|
-
<gCal:guestsCanInviteOthers value="true"/>
|
50
|
-
<gCal:guestsCanModify value="false"/>
|
51
|
-
<gCal:guestsCanSeeGuests value="true"/>
|
52
|
-
<gCal:sequence value="0"/>
|
53
|
-
<gCal:uid value="oj6fmpaulbvk9ouoj0lj4v6hio@google.com"/>
|
54
|
-
</entry>
|
55
|
-
</feed>
|
@@ -1,3 +0,0 @@
|
|
1
|
-
SID=DQAAANQAAADZMefRbeG9x_P2llJUjewWWasEqC2mubuTSSjH414IJY-TTJF9voB3ZS80C9wFF68jKlpeUwL-9Pss9bk0_yNPCYtvTcx54L6rANjU1Go58r1X0B8RFatiA3Ak7S1zKxaUhfAB48dYoh-swUthjv_Ts8b7uCGUzfmOcKRGdQDy0-7Bdpy6r7cwVP68FPbA3EadPUrQGKKW-M4GXcB8iqymYNAL8utiGlAPtNFIM6It6uVInOiO0-24_pSYM1VxVJ2gBXa3lZevcLGObFHMQkka9Djrs2-d5OCoryjQo7RRFcxBxzZJqmwE
|
2
|
-
LSID=DQAAANUAAACgKc7kL-UwiEIsHKB-Rfd3cTPzWCav_-SzJy6e5IviYfruIvtswkDXxzSJ-rv-YmCOC-J0YO3ngnkmQoTnCJUjewWWasBIiO4bnKkk4K8IZdO8pBOHxpGuXBnKER4jaC7DwcQuVlEypBSFddj-s1mil8EQRUIR5SyRsyTbjS2uiO2slQ4jWyxGlds-s4b7DC8c7oMHuVjxrTtE_E9tZeIu4qXOb8QE1dwJGsaNWii7ioH5HVNuKMe0BjkKS5m7rymv4HhMnlN7mw09NJp1AMU9sfeiJ6kH5QVQuVxoAaA7rqm579I0pdQ
|
3
|
-
Auth=DQAAANUAAACgKc7kL-UwiEIsHKB-Rfd3cTPzWCav_-SzJy6e5IviYfruIvtswkDXxzSJ-rv-YmCOC-J0YO3ngnkmQoTnCJUjewWWasBIiO4bnKkk4K8IZdO8pBOHxpGuXBnKER4jaC7DwcQuVlEycRu6P375BUUgR1HNa3cxom45s1clzRKy9h4M4PZ2bO9ejr1qn5IkIUBuMmzvOJuDgIzm1V6YCZ_tErZ4WGq3u0tIm_VdDMn-rWEosH8OPfAp8BYShvAQy9cFSKYY1co8M0WJBbuoNlb52DnFtnUxw1UXW9d0xJ8bnSRkIUiDiMA')
|