google_calendar 0.2.4 → 0.2.5
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/VERSION +1 -1
- data/google_calendar.gemspec +2 -2
- data/lib/google/event.rb +6 -6
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.5
|
data/google_calendar.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "google_calendar"
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Steve Zich"]
|
12
|
-
s.date = "2012-12-
|
12
|
+
s.date = "2012-12-16"
|
13
13
|
s.description = "A minimal wrapper around the google calendar API, which uses nokogiri for fast parsing."
|
14
14
|
s.email = "steve.zich@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/google/event.rb
CHANGED
@@ -51,7 +51,7 @@ module Google
|
|
51
51
|
#
|
52
52
|
def start_time=(time)
|
53
53
|
raise ArgumentError, "Start Time must be either Time or String" unless (time.is_a?(String) || time.is_a?(Time))
|
54
|
-
@start_time = (time.is_a? String) ? Time.parse(time) : time
|
54
|
+
@start_time = (time.is_a? String) ? Time.parse(time) : time.dup.utc
|
55
55
|
end
|
56
56
|
|
57
57
|
# Get the start_time of the event.
|
@@ -59,8 +59,8 @@ module Google
|
|
59
59
|
# If no time is set (i.e. new event) it defaults to the current time.
|
60
60
|
#
|
61
61
|
def start_time
|
62
|
-
@start_time ||= Time.now
|
63
|
-
(@start_time.is_a? String) ? @start_time : @start_time.
|
62
|
+
@start_time ||= Time.now.utc
|
63
|
+
(@start_time.is_a? String) ? @start_time : @start_time.xmlschema
|
64
64
|
end
|
65
65
|
|
66
66
|
# Get the end_time of the event.
|
@@ -68,15 +68,15 @@ module Google
|
|
68
68
|
# If no time is set (i.e. new event) it defaults to one hour in the future.
|
69
69
|
#
|
70
70
|
def end_time
|
71
|
-
@end_time ||= Time.now + (60 * 60) # seconds * min
|
72
|
-
(@end_time.is_a? String) ? @end_time : @end_time.
|
71
|
+
@end_time ||= Time.now.utc + (60 * 60) # seconds * min
|
72
|
+
(@end_time.is_a? String) ? @end_time : @end_time.xmlschema
|
73
73
|
end
|
74
74
|
|
75
75
|
# Sets the end time of the Event. Must be a Time object or a parsable string representation of a time.
|
76
76
|
#
|
77
77
|
def end_time=(time)
|
78
78
|
raise ArgumentError, "End Time must be either Time or String" unless (time.is_a?(String) || time.is_a?(Time))
|
79
|
-
@end_time = (
|
79
|
+
@end_time = (time.is_a? String) ? Time.parse(time) : time.dup.utc
|
80
80
|
end
|
81
81
|
|
82
82
|
# Returns whether the Event is an all-day event, based on whether the event starts at the beginning and ends at the end of the day.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google_calendar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -170,7 +170,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
170
170
|
version: '0'
|
171
171
|
segments:
|
172
172
|
- 0
|
173
|
-
hash:
|
173
|
+
hash: -1138597728287147901
|
174
174
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
175
|
none: false
|
176
176
|
requirements:
|