ical2gcal 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/ical2gcal.gemspec +3 -3
  3. data/lib/google.rb +37 -2
  4. metadata +28 -88
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.3.3
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "ical2gcal"
8
- s.version = "0.3.2"
8
+ s.version = "0.3.3"
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 = "2013-01-27"
12
+ s.date = "2013-05-15"
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"]
@@ -42,7 +42,7 @@ Gem::Specification.new do |s|
42
42
  s.homepage = "http://github.com/wtnabe/ical2gcal"
43
43
  s.licenses = ["two-clause BSD"]
44
44
  s.require_paths = ["lib"]
45
- s.rubygems_version = "1.8.23"
45
+ s.rubygems_version = "1.8.11"
46
46
  s.summary = "sync ics(es) to google calendar"
47
47
 
48
48
  if s.respond_to? :specification_version then
@@ -73,9 +73,44 @@ module Ical2gcal
73
73
  end
74
74
 
75
75
  def remove_all_events
76
- calendar.events.each { |e|
76
+ events = calendar.events
77
+ max_retry = 3
78
+
79
+ omni_retry = max_retry
80
+
81
+ while events.size > 0 and omni_retry > 0
82
+ events.each { |e|
83
+ remove_one_event(e, max_retry)
84
+ }
85
+ omni_retry -= 1
86
+
87
+ sleep 1
88
+ end
89
+ end
90
+
91
+ #
92
+ # remove one event with retry
93
+ #
94
+ # [param] GoogleCalendar::Event
95
+ # [param] Fixnum
96
+ #
97
+ def remove_one_event(e, num_retry)
98
+ begin
77
99
  e.destroy!
78
- }
100
+ rescue => e
101
+ case e
102
+ when NoMethodError
103
+ ;
104
+ else
105
+ num_retry -= 1
106
+ if num_retry > 0
107
+ sleep 1 and retry
108
+ else
109
+ raise e
110
+ end
111
+ end
112
+ end
79
113
  end
114
+
80
115
  end
81
116
  end
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.3.2
4
+ version: 0.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-27 00:00:00.000000000 Z
12
+ date: 2013-05-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ri_cal
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &22217380 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,15 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '0'
24
+ version_requirements: *22217380
30
25
  - !ruby/object:Gem::Dependency
31
26
  name: gcalapi
32
- requirement: !ruby/object:Gem::Requirement
27
+ requirement: &22216260 !ruby/object:Gem::Requirement
33
28
  none: false
34
29
  requirements:
35
30
  - - ! '>='
@@ -37,15 +32,10 @@ dependencies:
37
32
  version: '0'
38
33
  type: :runtime
39
34
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
35
+ version_requirements: *22216260
46
36
  - !ruby/object:Gem::Dependency
47
37
  name: simple-rss
48
- requirement: !ruby/object:Gem::Requirement
38
+ requirement: &22215520 !ruby/object:Gem::Requirement
49
39
  none: false
50
40
  requirements:
51
41
  - - ! '>='
@@ -53,15 +43,10 @@ dependencies:
53
43
  version: '0'
54
44
  type: :runtime
55
45
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
46
+ version_requirements: *22215520
62
47
  - !ruby/object:Gem::Dependency
63
48
  name: pit
64
- requirement: !ruby/object:Gem::Requirement
49
+ requirement: &22214800 !ruby/object:Gem::Requirement
65
50
  none: false
66
51
  requirements:
67
52
  - - ! '>='
@@ -69,15 +54,10 @@ dependencies:
69
54
  version: '0'
70
55
  type: :runtime
71
56
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
57
+ version_requirements: *22214800
78
58
  - !ruby/object:Gem::Dependency
79
59
  name: rspec
80
- requirement: !ruby/object:Gem::Requirement
60
+ requirement: &22213800 !ruby/object:Gem::Requirement
81
61
  none: false
82
62
  requirements:
83
63
  - - ! '>='
@@ -85,15 +65,10 @@ dependencies:
85
65
  version: '0'
86
66
  type: :development
87
67
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '0'
68
+ version_requirements: *22213800
94
69
  - !ruby/object:Gem::Dependency
95
70
  name: bundler
96
- requirement: !ruby/object:Gem::Requirement
71
+ requirement: &22212800 !ruby/object:Gem::Requirement
97
72
  none: false
98
73
  requirements:
99
74
  - - ! '>='
@@ -101,15 +76,10 @@ dependencies:
101
76
  version: '0'
102
77
  type: :development
103
78
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
79
+ version_requirements: *22212800
110
80
  - !ruby/object:Gem::Dependency
111
81
  name: jeweler
112
- requirement: !ruby/object:Gem::Requirement
82
+ requirement: &22240760 !ruby/object:Gem::Requirement
113
83
  none: false
114
84
  requirements:
115
85
  - - ! '>='
@@ -117,15 +87,10 @@ dependencies:
117
87
  version: '0'
118
88
  type: :development
119
89
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ! '>='
124
- - !ruby/object:Gem::Version
125
- version: '0'
90
+ version_requirements: *22240760
126
91
  - !ruby/object:Gem::Dependency
127
92
  name: simplecov
128
- requirement: !ruby/object:Gem::Requirement
93
+ requirement: &22239900 !ruby/object:Gem::Requirement
129
94
  none: false
130
95
  requirements:
131
96
  - - ! '>='
@@ -133,15 +98,10 @@ dependencies:
133
98
  version: '0'
134
99
  type: :development
135
100
  prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
141
- version: '0'
101
+ version_requirements: *22239900
142
102
  - !ruby/object:Gem::Dependency
143
103
  name: ri_cal
144
- requirement: !ruby/object:Gem::Requirement
104
+ requirement: &22239140 !ruby/object:Gem::Requirement
145
105
  none: false
146
106
  requirements:
147
107
  - - ! '>='
@@ -149,15 +109,10 @@ dependencies:
149
109
  version: '0'
150
110
  type: :runtime
151
111
  prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
- requirements:
155
- - - ! '>='
156
- - !ruby/object:Gem::Version
157
- version: '0'
112
+ version_requirements: *22239140
158
113
  - !ruby/object:Gem::Dependency
159
114
  name: gcalapi
160
- requirement: !ruby/object:Gem::Requirement
115
+ requirement: &22238540 !ruby/object:Gem::Requirement
161
116
  none: false
162
117
  requirements:
163
118
  - - ! '>='
@@ -165,15 +120,10 @@ dependencies:
165
120
  version: '0'
166
121
  type: :runtime
167
122
  prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
- requirements:
171
- - - ! '>='
172
- - !ruby/object:Gem::Version
173
- version: '0'
123
+ version_requirements: *22238540
174
124
  - !ruby/object:Gem::Dependency
175
125
  name: simple-rss
176
- requirement: !ruby/object:Gem::Requirement
126
+ requirement: &22238060 !ruby/object:Gem::Requirement
177
127
  none: false
178
128
  requirements:
179
129
  - - ! '>='
@@ -181,15 +131,10 @@ dependencies:
181
131
  version: '0'
182
132
  type: :runtime
183
133
  prerelease: false
184
- version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
- requirements:
187
- - - ! '>='
188
- - !ruby/object:Gem::Version
189
- version: '0'
134
+ version_requirements: *22238060
190
135
  - !ruby/object:Gem::Dependency
191
136
  name: pit
192
- requirement: !ruby/object:Gem::Requirement
137
+ requirement: &22237380 !ruby/object:Gem::Requirement
193
138
  none: false
194
139
  requirements:
195
140
  - - ! '>='
@@ -197,12 +142,7 @@ dependencies:
197
142
  version: '0'
198
143
  type: :runtime
199
144
  prerelease: false
200
- version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
- requirements:
203
- - - ! '>='
204
- - !ruby/object:Gem::Version
205
- version: '0'
145
+ version_requirements: *22237380
206
146
  description: You can sync local and remote ics file(s) to google calendar
207
147
  email: wtnabe@gmail.com
208
148
  executables:
@@ -247,7 +187,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
247
187
  version: '0'
248
188
  segments:
249
189
  - 0
250
- hash: -839786046820986118
190
+ hash: -1845599836924657027
251
191
  required_rubygems_version: !ruby/object:Gem::Requirement
252
192
  none: false
253
193
  requirements:
@@ -256,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
256
196
  version: '0'
257
197
  requirements: []
258
198
  rubyforge_project:
259
- rubygems_version: 1.8.23
199
+ rubygems_version: 1.8.11
260
200
  signing_key:
261
201
  specification_version: 3
262
202
  summary: sync ics(es) to google calendar