ical2gcal 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +6 -2
- data/VERSION +1 -1
- data/ical2gcal.gemspec +11 -11
- data/lib/ical2gcal.rb +17 -7
- metadata +31 -33
data/Gemfile
CHANGED
@@ -11,8 +11,12 @@ gem 'simple-rss'
|
|
11
11
|
gem 'pit'
|
12
12
|
|
13
13
|
group :development do
|
14
|
-
gem "rspec"
|
14
|
+
gem "rspec"
|
15
15
|
gem "bundler", "~> 1.0.0"
|
16
16
|
gem "jeweler", "~> 1.5.2"
|
17
|
-
|
17
|
+
if RUBY_VERSION < '1.9'
|
18
|
+
gem "rcov", ">= 0"
|
19
|
+
else
|
20
|
+
gem 'simplecov'
|
21
|
+
end
|
18
22
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
data/ical2gcal.gemspec
CHANGED
@@ -4,14 +4,14 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.3.
|
7
|
+
s.name = "ical2gcal"
|
8
|
+
s.version = "0.3.1"
|
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 =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
12
|
+
s.date = "2012-02-07"
|
13
|
+
s.description = "You can sync local and remote ics file(s) to google calendar"
|
14
|
+
s.email = "wtnabe@gmail.com"
|
15
15
|
s.executables = ["ical2gcal"]
|
16
16
|
s.extra_rdoc_files = [
|
17
17
|
"LICENSE.txt",
|
@@ -38,11 +38,11 @@ Gem::Specification.new do |s|
|
|
38
38
|
"spec/support/ics_list.txt",
|
39
39
|
"spec/support/japanese_holidays.ics"
|
40
40
|
]
|
41
|
-
s.homepage =
|
41
|
+
s.homepage = "http://github.com/wtnabe/ical2gcal"
|
42
42
|
s.licenses = ["two-clause BSD"]
|
43
43
|
s.require_paths = ["lib"]
|
44
|
-
s.rubygems_version =
|
45
|
-
s.summary =
|
44
|
+
s.rubygems_version = "1.8.10"
|
45
|
+
s.summary = "sync ics(es) to google calendar"
|
46
46
|
s.test_files = [
|
47
47
|
"spec/ics/events_spec.rb",
|
48
48
|
"spec/ics/list_spec.rb",
|
@@ -57,7 +57,7 @@ Gem::Specification.new do |s|
|
|
57
57
|
s.add_runtime_dependency(%q<gcalapi>, [">= 0"])
|
58
58
|
s.add_runtime_dependency(%q<simple-rss>, [">= 0"])
|
59
59
|
s.add_runtime_dependency(%q<pit>, [">= 0"])
|
60
|
-
s.add_development_dependency(%q<rspec>, ["
|
60
|
+
s.add_development_dependency(%q<rspec>, [">= 0"])
|
61
61
|
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
62
62
|
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
63
63
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
@@ -70,7 +70,7 @@ Gem::Specification.new do |s|
|
|
70
70
|
s.add_dependency(%q<gcalapi>, [">= 0"])
|
71
71
|
s.add_dependency(%q<simple-rss>, [">= 0"])
|
72
72
|
s.add_dependency(%q<pit>, [">= 0"])
|
73
|
-
s.add_dependency(%q<rspec>, ["
|
73
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
74
74
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
75
75
|
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
76
76
|
s.add_dependency(%q<rcov>, [">= 0"])
|
@@ -84,7 +84,7 @@ Gem::Specification.new do |s|
|
|
84
84
|
s.add_dependency(%q<gcalapi>, [">= 0"])
|
85
85
|
s.add_dependency(%q<simple-rss>, [">= 0"])
|
86
86
|
s.add_dependency(%q<pit>, [">= 0"])
|
87
|
-
s.add_dependency(%q<rspec>, ["
|
87
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
88
88
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
89
89
|
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
90
90
|
s.add_dependency(%q<rcov>, [">= 0"])
|
data/lib/ical2gcal.rb
CHANGED
@@ -17,15 +17,25 @@ module Ical2gcal
|
|
17
17
|
def run
|
18
18
|
opts.parse( ARGV )
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
g = Ical2gcal::Google.new(
|
20
|
+
conf = ::Pit.get('google')
|
21
|
+
conf.merge!( {'calendar' => {'name' => @target}} ) if @target
|
22
|
+
g = Ical2gcal::Google.new( conf )
|
23
23
|
g.remove_all_events
|
24
|
-
calendars
|
25
|
-
|
26
|
-
|
24
|
+
if calendars
|
25
|
+
cals = case calendars
|
26
|
+
when Array
|
27
|
+
calendars
|
28
|
+
else
|
29
|
+
[calendars]
|
30
|
+
end
|
31
|
+
cals.each { |c|
|
32
|
+
Ical2gcal::Ics::Events.new( c ).each { |e|
|
33
|
+
g.create_event( e )
|
34
|
+
}
|
27
35
|
}
|
28
|
-
|
36
|
+
else
|
37
|
+
puts opts
|
38
|
+
end
|
29
39
|
end
|
30
40
|
|
31
41
|
#
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ical2gcal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 1
|
10
|
+
version: 0.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- wtnabe
|
@@ -15,9 +15,10 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2012-02-07 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
|
+
name: ri_cal
|
21
22
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
22
23
|
none: false
|
23
24
|
requirements:
|
@@ -27,11 +28,11 @@ dependencies:
|
|
27
28
|
segments:
|
28
29
|
- 0
|
29
30
|
version: "0"
|
30
|
-
name: ri_cal
|
31
31
|
prerelease: false
|
32
|
-
type: :runtime
|
33
32
|
requirement: *id001
|
33
|
+
type: :runtime
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
|
+
name: gcalapi
|
35
36
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
36
37
|
none: false
|
37
38
|
requirements:
|
@@ -41,11 +42,11 @@ dependencies:
|
|
41
42
|
segments:
|
42
43
|
- 0
|
43
44
|
version: "0"
|
44
|
-
name: gcalapi
|
45
45
|
prerelease: false
|
46
|
-
type: :runtime
|
47
46
|
requirement: *id002
|
47
|
+
type: :runtime
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
|
+
name: simple-rss
|
49
50
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
50
51
|
none: false
|
51
52
|
requirements:
|
@@ -55,11 +56,11 @@ dependencies:
|
|
55
56
|
segments:
|
56
57
|
- 0
|
57
58
|
version: "0"
|
58
|
-
name: simple-rss
|
59
59
|
prerelease: false
|
60
|
-
type: :runtime
|
61
60
|
requirement: *id003
|
61
|
+
type: :runtime
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
|
+
name: pit
|
63
64
|
version_requirements: &id004 !ruby/object:Gem::Requirement
|
64
65
|
none: false
|
65
66
|
requirements:
|
@@ -69,27 +70,25 @@ dependencies:
|
|
69
70
|
segments:
|
70
71
|
- 0
|
71
72
|
version: "0"
|
72
|
-
name: pit
|
73
73
|
prerelease: false
|
74
|
-
type: :runtime
|
75
74
|
requirement: *id004
|
75
|
+
type: :runtime
|
76
76
|
- !ruby/object:Gem::Dependency
|
77
|
+
name: rspec
|
77
78
|
version_requirements: &id005 !ruby/object:Gem::Requirement
|
78
79
|
none: false
|
79
80
|
requirements:
|
80
|
-
- -
|
81
|
+
- - ">="
|
81
82
|
- !ruby/object:Gem::Version
|
82
83
|
hash: 3
|
83
84
|
segments:
|
84
|
-
- 2
|
85
|
-
- 3
|
86
85
|
- 0
|
87
|
-
version:
|
88
|
-
name: rspec
|
86
|
+
version: "0"
|
89
87
|
prerelease: false
|
90
|
-
type: :development
|
91
88
|
requirement: *id005
|
89
|
+
type: :development
|
92
90
|
- !ruby/object:Gem::Dependency
|
91
|
+
name: bundler
|
93
92
|
version_requirements: &id006 !ruby/object:Gem::Requirement
|
94
93
|
none: false
|
95
94
|
requirements:
|
@@ -101,11 +100,11 @@ dependencies:
|
|
101
100
|
- 0
|
102
101
|
- 0
|
103
102
|
version: 1.0.0
|
104
|
-
name: bundler
|
105
103
|
prerelease: false
|
106
|
-
type: :development
|
107
104
|
requirement: *id006
|
105
|
+
type: :development
|
108
106
|
- !ruby/object:Gem::Dependency
|
107
|
+
name: jeweler
|
109
108
|
version_requirements: &id007 !ruby/object:Gem::Requirement
|
110
109
|
none: false
|
111
110
|
requirements:
|
@@ -117,11 +116,11 @@ dependencies:
|
|
117
116
|
- 5
|
118
117
|
- 2
|
119
118
|
version: 1.5.2
|
120
|
-
name: jeweler
|
121
119
|
prerelease: false
|
122
|
-
type: :development
|
123
120
|
requirement: *id007
|
121
|
+
type: :development
|
124
122
|
- !ruby/object:Gem::Dependency
|
123
|
+
name: rcov
|
125
124
|
version_requirements: &id008 !ruby/object:Gem::Requirement
|
126
125
|
none: false
|
127
126
|
requirements:
|
@@ -131,11 +130,11 @@ dependencies:
|
|
131
130
|
segments:
|
132
131
|
- 0
|
133
132
|
version: "0"
|
134
|
-
name: rcov
|
135
133
|
prerelease: false
|
136
|
-
type: :development
|
137
134
|
requirement: *id008
|
135
|
+
type: :development
|
138
136
|
- !ruby/object:Gem::Dependency
|
137
|
+
name: ri_cal
|
139
138
|
version_requirements: &id009 !ruby/object:Gem::Requirement
|
140
139
|
none: false
|
141
140
|
requirements:
|
@@ -145,11 +144,11 @@ dependencies:
|
|
145
144
|
segments:
|
146
145
|
- 0
|
147
146
|
version: "0"
|
148
|
-
name: ri_cal
|
149
147
|
prerelease: false
|
150
|
-
type: :runtime
|
151
148
|
requirement: *id009
|
149
|
+
type: :runtime
|
152
150
|
- !ruby/object:Gem::Dependency
|
151
|
+
name: gcalapi
|
153
152
|
version_requirements: &id010 !ruby/object:Gem::Requirement
|
154
153
|
none: false
|
155
154
|
requirements:
|
@@ -159,11 +158,11 @@ dependencies:
|
|
159
158
|
segments:
|
160
159
|
- 0
|
161
160
|
version: "0"
|
162
|
-
name: gcalapi
|
163
161
|
prerelease: false
|
164
|
-
type: :runtime
|
165
162
|
requirement: *id010
|
163
|
+
type: :runtime
|
166
164
|
- !ruby/object:Gem::Dependency
|
165
|
+
name: simple-rss
|
167
166
|
version_requirements: &id011 !ruby/object:Gem::Requirement
|
168
167
|
none: false
|
169
168
|
requirements:
|
@@ -173,11 +172,11 @@ dependencies:
|
|
173
172
|
segments:
|
174
173
|
- 0
|
175
174
|
version: "0"
|
176
|
-
name: simple-rss
|
177
175
|
prerelease: false
|
178
|
-
type: :runtime
|
179
176
|
requirement: *id011
|
177
|
+
type: :runtime
|
180
178
|
- !ruby/object:Gem::Dependency
|
179
|
+
name: pit
|
181
180
|
version_requirements: &id012 !ruby/object:Gem::Requirement
|
182
181
|
none: false
|
183
182
|
requirements:
|
@@ -187,10 +186,9 @@ dependencies:
|
|
187
186
|
segments:
|
188
187
|
- 0
|
189
188
|
version: "0"
|
190
|
-
name: pit
|
191
189
|
prerelease: false
|
192
|
-
type: :runtime
|
193
190
|
requirement: *id012
|
191
|
+
type: :runtime
|
194
192
|
description: You can sync local and remote ics file(s) to google calendar
|
195
193
|
email: wtnabe@gmail.com
|
196
194
|
executables:
|
@@ -249,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
249
247
|
requirements: []
|
250
248
|
|
251
249
|
rubyforge_project:
|
252
|
-
rubygems_version: 1.
|
250
|
+
rubygems_version: 1.8.10
|
253
251
|
signing_key:
|
254
252
|
specification_version: 3
|
255
253
|
summary: sync ics(es) to google calendar
|