gcal-ruby 0.1.2 → 0.1.3
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.
- data/CHANGELOG +1 -0
- data/Rakefile +1 -1
- data/gcal-ruby.gemspec +1 -1
- data/lib/gcal/calendar.rb +4 -3
- data/lib/gcal/client.rb +6 -4
- metadata +7 -7
data/CHANGELOG
CHANGED
data/Rakefile
CHANGED
@@ -3,7 +3,7 @@ require 'rubygems'
|
|
3
3
|
require 'rake'
|
4
4
|
require 'echoe'
|
5
5
|
|
6
|
-
Echoe.new('gcal-ruby', '0.1.
|
6
|
+
Echoe.new('gcal-ruby', '0.1.3') do |p|
|
7
7
|
p.description = "Ruby library for Google Calendar API."
|
8
8
|
p.url = "http://github.com/23ninja/gcal-ruby"
|
9
9
|
p.author = "Iskander Haziev"
|
data/gcal-ruby.gemspec
CHANGED
data/lib/gcal/calendar.rb
CHANGED
@@ -17,12 +17,13 @@ module GCal
|
|
17
17
|
end
|
18
18
|
|
19
19
|
class << self
|
20
|
-
def parse(entry)
|
20
|
+
def parse(entry, path)
|
21
|
+
calendar_home_url = 'http://www.google.com/calendar/feeds'
|
21
22
|
parse_time = Time.respond_to?(:parse)
|
22
23
|
calendar = self.new
|
23
|
-
|
24
|
+
|
24
25
|
# common info
|
25
|
-
calendar.id = entry['id'][0].gsub(
|
26
|
+
calendar.id = entry['id'][0].gsub(calendar_home_url + path, '')
|
26
27
|
calendar.title = entry['title'][0]['content']
|
27
28
|
calendar.link = entry['link'][0]['href']
|
28
29
|
calendar.access_level = entry['accesslevel'][0]['value']
|
data/lib/gcal/client.rb
CHANGED
@@ -25,19 +25,21 @@ module GCal
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def all_calendars
|
28
|
-
|
28
|
+
path = "/default/allcalendars/full/"
|
29
|
+
xml = call(path)
|
29
30
|
calendars = []
|
30
31
|
xml['entry'].each do |entry|
|
31
|
-
calendars << GCal::Calendar.parse(entry)
|
32
|
+
calendars << GCal::Calendar.parse(entry, path)
|
32
33
|
end if xml['entry']
|
33
34
|
calendars
|
34
35
|
end
|
35
36
|
|
36
37
|
def own_calendars
|
37
|
-
|
38
|
+
path = "/default/owncalendars/full/"
|
39
|
+
xml = call(path)
|
38
40
|
calendars = []
|
39
41
|
xml['entry'].each do |entry|
|
40
|
-
calendars << GCal::Calendar.parse(entry)
|
42
|
+
calendars << GCal::Calendar.parse(entry, path)
|
41
43
|
end if xml['entry']
|
42
44
|
calendars
|
43
45
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gcal-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-10-06 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oauth
|
16
|
-
requirement: &
|
16
|
+
requirement: &2164822020 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2164822020
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: typhoeus
|
27
|
-
requirement: &
|
27
|
+
requirement: &2164820860 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2164820860
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: xml-simple
|
38
|
-
requirement: &
|
38
|
+
requirement: &2164819700 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2164819700
|
47
47
|
description: Ruby library for Google Calendar API.
|
48
48
|
email: gvalmon@gmail.com
|
49
49
|
executables: []
|