ical2gcal 0.5.0 → 0.5.2
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/ical2gcal.gemspec +3 -3
- data/lib/google.rb +8 -7
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.2
|
data/ical2gcal.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "ical2gcal"
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["wtnabe"]
|
12
|
-
s.date = "2014-12-
|
12
|
+
s.date = "2014-12-08"
|
13
13
|
s.description = "You can sync local and remote ics file(s) to google calendar"
|
14
14
|
s.email = "wtnabe@gmail.com"
|
15
15
|
s.executables = ["ical2gcal"]
|
@@ -43,7 +43,7 @@ Gem::Specification.new do |s|
|
|
43
43
|
s.homepage = "http://github.com/wtnabe/ical2gcal"
|
44
44
|
s.licenses = ["two-clause BSD"]
|
45
45
|
s.require_paths = ["lib"]
|
46
|
-
s.rubygems_version = "1.8.23"
|
46
|
+
s.rubygems_version = "1.8.23.2"
|
47
47
|
s.summary = "sync ics(es) to google calendar"
|
48
48
|
|
49
49
|
if s.respond_to? :specification_version then
|
data/lib/google.rb
CHANGED
@@ -59,16 +59,17 @@ module Ical2gcal
|
|
59
59
|
# [return] String
|
60
60
|
#
|
61
61
|
def create_event( event )
|
62
|
-
body = {
|
63
|
-
|
64
|
-
|
65
|
-
:location => event.location
|
66
|
-
}
|
62
|
+
body = {:summary => event.summary.force_encoding('UTF-8')}
|
63
|
+
body.merge!(:description => event.description.force_encoding('UTF-8')) if event.description
|
64
|
+
body.merge!(:location => event.location.force_encoding('UTF-8')) if event.location
|
67
65
|
|
68
66
|
if all_day?(event)
|
67
|
+
start_date = event.dtstart.to_s
|
68
|
+
end_date = event.dtend.to_s
|
69
|
+
|
69
70
|
body.merge!(
|
70
|
-
:start => {:date =>
|
71
|
-
:end => {:date =>
|
71
|
+
:start => {:date => start_date},
|
72
|
+
:end => {:date => end_date.size > 0 ? end_date : (Date.parse(start_date) + 1).to_s})
|
72
73
|
else
|
73
74
|
body.merge!(
|
74
75
|
:start => {:dateTime => localtime(event.start_time)},
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ical2gcal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
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: 2014-12-
|
12
|
+
date: 2014-12-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ri_cal
|
@@ -200,7 +200,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
200
200
|
version: '0'
|
201
201
|
segments:
|
202
202
|
- 0
|
203
|
-
hash:
|
203
|
+
hash: 2105286359183255494
|
204
204
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
205
|
none: false
|
206
206
|
requirements:
|
@@ -209,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
209
|
version: '0'
|
210
210
|
requirements: []
|
211
211
|
rubyforge_project:
|
212
|
-
rubygems_version: 1.8.23
|
212
|
+
rubygems_version: 1.8.23.2
|
213
213
|
signing_key:
|
214
214
|
specification_version: 3
|
215
215
|
summary: sync ics(es) to google calendar
|