calendar-assistant 0.6.0 → 0.7.0
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.
- checksums.yaml +4 -4
- data/README.md +152 -67
- data/Rakefile +13 -3
- data/bin/calendar-assistant +3 -1
- data/lib/calendar_assistant.rb +0 -1
- data/lib/calendar_assistant/calendar_assistant.rb +16 -14
- data/lib/calendar_assistant/cli.rb +9 -233
- data/lib/calendar_assistant/cli/authorizer.rb +88 -0
- data/lib/calendar_assistant/cli/commands.rb +284 -0
- data/lib/calendar_assistant/cli/config.rb +51 -0
- data/lib/calendar_assistant/cli/event_presenter.rb +71 -0
- data/lib/calendar_assistant/cli/event_set_presenter.rb +69 -0
- data/lib/calendar_assistant/cli/helpers.rb +54 -0
- data/lib/calendar_assistant/cli/linter_event_presenter.rb +56 -0
- data/lib/calendar_assistant/cli/linter_event_set_presenter.rb +23 -0
- data/lib/calendar_assistant/cli/printer.rb +90 -0
- data/lib/calendar_assistant/config.rb +21 -45
- data/lib/calendar_assistant/event.rb +16 -12
- data/lib/calendar_assistant/event_repository.rb +18 -9
- data/lib/calendar_assistant/event_repository_factory.rb +2 -2
- data/lib/calendar_assistant/version.rb +1 -1
- metadata +78 -38
- data/lib/calendar_assistant/authorizer.rb +0 -86
- data/lib/calendar_assistant/cli_helpers.rb +0 -228
@@ -27,11 +27,6 @@ class CalendarAssistant
|
|
27
27
|
PRIVATE = "private"
|
28
28
|
end
|
29
29
|
|
30
|
-
#
|
31
|
-
# constants describing behavior
|
32
|
-
#
|
33
|
-
LOCATION_EVENT_REGEX = /^#{CalendarAssistant::EMOJI_WORLDMAP}/
|
34
|
-
|
35
30
|
#
|
36
31
|
# class methods
|
37
32
|
#
|
@@ -42,13 +37,23 @@ class CalendarAssistant
|
|
42
37
|
#
|
43
38
|
# instance methods
|
44
39
|
#
|
40
|
+
attr_reader :location_event_regex
|
41
|
+
|
42
|
+
def initialize(obj, config: CalendarAssistant::Config.new)
|
43
|
+
|
44
|
+
super(obj)
|
45
|
+
@location_icons = config[CalendarAssistant::Config::Keys::Settings::LOCATION_ICONS]
|
46
|
+
|
47
|
+
@location_event_regex = /^#{@location_icons.join("|")}/
|
48
|
+
end
|
49
|
+
|
45
50
|
def update **args
|
46
51
|
update!(**args)
|
47
52
|
self
|
48
53
|
end
|
49
54
|
|
50
55
|
def location_event?
|
51
|
-
!! (summary =~
|
56
|
+
!! (summary =~ location_event_regex)
|
52
57
|
end
|
53
58
|
|
54
59
|
def all_day?
|
@@ -176,12 +181,6 @@ class CalendarAssistant
|
|
176
181
|
end
|
177
182
|
end
|
178
183
|
|
179
|
-
def view_summary
|
180
|
-
return "(private)" if private? && (summary.nil? || summary.blank?)
|
181
|
-
return "(no title)" if summary.nil? || summary.blank?
|
182
|
-
summary
|
183
|
-
end
|
184
|
-
|
185
184
|
def duration
|
186
185
|
if all_day?
|
187
186
|
days = (end_date - start_date).to_i
|
@@ -200,6 +199,11 @@ class CalendarAssistant
|
|
200
199
|
Event.duration_in_seconds start_time, end_time
|
201
200
|
end
|
202
201
|
|
202
|
+
def other_human_attendees
|
203
|
+
return nil if attendees.nil?
|
204
|
+
attendees.select { |a| ! a.resource && ! a.self }
|
205
|
+
end
|
206
|
+
|
203
207
|
def human_attendees
|
204
208
|
return nil if attendees.nil?
|
205
209
|
attendees.select { |a| ! a.resource }
|
@@ -1,11 +1,15 @@
|
|
1
1
|
class CalendarAssistant
|
2
2
|
class EventRepository
|
3
|
-
attr_reader :calendar, :calendar_id
|
3
|
+
attr_reader :calendar, :calendar_id, :config
|
4
4
|
|
5
|
-
def initialize(service, calendar_id)
|
5
|
+
def initialize(service, calendar_id, config: CalendarAssistant::Config.new)
|
6
6
|
@service = service
|
7
|
+
@config = config
|
7
8
|
@calendar_id = calendar_id
|
8
9
|
@calendar = @service.get_calendar @calendar_id
|
10
|
+
rescue Google::Apis::ClientError => e
|
11
|
+
raise BaseException, "Calendar for #{@calendar_id} not found" if e.status_code == 404
|
12
|
+
raise
|
9
13
|
end
|
10
14
|
|
11
15
|
def in_tz &block
|
@@ -14,7 +18,7 @@ class CalendarAssistant
|
|
14
18
|
end
|
15
19
|
end
|
16
20
|
|
17
|
-
def find time_range
|
21
|
+
def find time_range, predicates: {}
|
18
22
|
events = @service.list_events(@calendar_id,
|
19
23
|
time_min: time_range.first.iso8601,
|
20
24
|
time_max: time_range.last.iso8601,
|
@@ -22,15 +26,20 @@ class CalendarAssistant
|
|
22
26
|
single_events: true,
|
23
27
|
max_results: 2000,
|
24
28
|
)
|
25
|
-
|
26
|
-
|
29
|
+
events = events.items.map { |e| CalendarAssistant::Event.new(e, config: config) }
|
30
|
+
|
31
|
+
unless predicates.empty?
|
32
|
+
events = events.select do |event|
|
33
|
+
predicates.all? { |predicate, value| event.public_send(predicate) == value }
|
34
|
+
end
|
27
35
|
end
|
28
|
-
|
36
|
+
|
37
|
+
CalendarAssistant::EventSet.new self, events
|
29
38
|
end
|
30
39
|
|
31
40
|
def new event_attributes
|
32
41
|
event = Google::Apis::CalendarV3::Event.new DateHelpers.cast_dates(event_attributes)
|
33
|
-
CalendarAssistant::Event.new(event)
|
42
|
+
CalendarAssistant::Event.new(event, config: config)
|
34
43
|
end
|
35
44
|
|
36
45
|
def create event_attributes
|
@@ -46,7 +55,7 @@ class CalendarAssistant
|
|
46
55
|
def update(event, attributes)
|
47
56
|
event.update! DateHelpers.cast_dates(attributes)
|
48
57
|
updated_event = @service.update_event @calendar_id, event.id, event
|
49
|
-
CalendarAssistant::Event.new(updated_event)
|
58
|
+
CalendarAssistant::Event.new(updated_event, config: config)
|
50
59
|
end
|
51
60
|
|
52
61
|
def available_block start_time, end_time
|
@@ -55,7 +64,7 @@ class CalendarAssistant
|
|
55
64
|
end: Google::Apis::CalendarV3::EventDateTime.new(date_time: end_time.in_time_zone(calendar.time_zone).to_datetime),
|
56
65
|
summary: "available"
|
57
66
|
)
|
58
|
-
CalendarAssistant::Event.new e
|
67
|
+
CalendarAssistant::Event.new e, config: config
|
59
68
|
end
|
60
69
|
end
|
61
70
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class CalendarAssistant
|
2
2
|
class EventRepositoryFactory
|
3
|
-
def self.new_event_repository service, calendar_id
|
4
|
-
EventRepository.new service, calendar_id
|
3
|
+
def self.new_event_repository service, calendar_id, config: CalendarAssistant::Config.new
|
4
|
+
EventRepository.new service, calendar_id, config: config
|
5
5
|
end
|
6
6
|
end
|
7
7
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calendar-assistant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Dalessio
|
@@ -9,22 +9,36 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-01-
|
12
|
+
date: 2019-01-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: activesupport
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 5.2.1
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 5.2.1
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: business_time
|
16
30
|
requirement: !ruby/object:Gem::Requirement
|
17
31
|
requirements:
|
18
32
|
- - "~>"
|
19
33
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.
|
34
|
+
version: 0.9.0
|
21
35
|
type: :runtime
|
22
36
|
prerelease: false
|
23
37
|
version_requirements: !ruby/object:Gem::Requirement
|
24
38
|
requirements:
|
25
39
|
- - "~>"
|
26
40
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.
|
41
|
+
version: 0.9.0
|
28
42
|
- !ruby/object:Gem::Dependency
|
29
43
|
name: chronic
|
30
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -54,33 +68,39 @@ dependencies:
|
|
54
68
|
- !ruby/object:Gem::Version
|
55
69
|
version: 0.10.0
|
56
70
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
71
|
+
name: google-api-client
|
58
72
|
requirement: !ruby/object:Gem::Requirement
|
59
73
|
requirements:
|
60
|
-
- - "
|
74
|
+
- - ">="
|
61
75
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0.
|
76
|
+
version: '0.24'
|
77
|
+
- - "<"
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0.28'
|
63
80
|
type: :runtime
|
64
81
|
prerelease: false
|
65
82
|
version_requirements: !ruby/object:Gem::Requirement
|
66
83
|
requirements:
|
67
|
-
- - "
|
84
|
+
- - ">="
|
68
85
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.
|
86
|
+
version: '0.24'
|
87
|
+
- - "<"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.28'
|
70
90
|
- !ruby/object:Gem::Dependency
|
71
|
-
name:
|
91
|
+
name: launchy
|
72
92
|
requirement: !ruby/object:Gem::Requirement
|
73
93
|
requirements:
|
74
94
|
- - "~>"
|
75
95
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
96
|
+
version: '2.4'
|
77
97
|
type: :runtime
|
78
98
|
prerelease: false
|
79
99
|
version_requirements: !ruby/object:Gem::Requirement
|
80
100
|
requirements:
|
81
101
|
- - "~>"
|
82
102
|
- !ruby/object:Gem::Version
|
83
|
-
version:
|
103
|
+
version: '2.4'
|
84
104
|
- !ruby/object:Gem::Dependency
|
85
105
|
name: rainbow
|
86
106
|
requirement: !ruby/object:Gem::Requirement
|
@@ -96,19 +116,19 @@ dependencies:
|
|
96
116
|
- !ruby/object:Gem::Version
|
97
117
|
version: '3.0'
|
98
118
|
- !ruby/object:Gem::Dependency
|
99
|
-
name:
|
119
|
+
name: thor
|
100
120
|
requirement: !ruby/object:Gem::Requirement
|
101
121
|
requirements:
|
102
122
|
- - "~>"
|
103
123
|
- !ruby/object:Gem::Version
|
104
|
-
version:
|
124
|
+
version: 0.20.0
|
105
125
|
type: :runtime
|
106
126
|
prerelease: false
|
107
127
|
version_requirements: !ruby/object:Gem::Requirement
|
108
128
|
requirements:
|
109
129
|
- - "~>"
|
110
130
|
- !ruby/object:Gem::Version
|
111
|
-
version:
|
131
|
+
version: 0.20.0
|
112
132
|
- !ruby/object:Gem::Dependency
|
113
133
|
name: toml
|
114
134
|
requirement: !ruby/object:Gem::Requirement
|
@@ -124,19 +144,33 @@ dependencies:
|
|
124
144
|
- !ruby/object:Gem::Version
|
125
145
|
version: 0.2.0
|
126
146
|
- !ruby/object:Gem::Dependency
|
127
|
-
name:
|
147
|
+
name: aruba
|
128
148
|
requirement: !ruby/object:Gem::Requirement
|
129
149
|
requirements:
|
130
150
|
- - "~>"
|
131
151
|
- !ruby/object:Gem::Version
|
132
|
-
version:
|
133
|
-
type: :
|
152
|
+
version: '0.14'
|
153
|
+
type: :development
|
134
154
|
prerelease: false
|
135
155
|
version_requirements: !ruby/object:Gem::Requirement
|
136
156
|
requirements:
|
137
157
|
- - "~>"
|
138
158
|
- !ruby/object:Gem::Version
|
139
|
-
version:
|
159
|
+
version: '0.14'
|
160
|
+
- !ruby/object:Gem::Dependency
|
161
|
+
name: bundler
|
162
|
+
requirement: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '1.16'
|
167
|
+
type: :development
|
168
|
+
prerelease: false
|
169
|
+
version_requirements: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '1.16'
|
140
174
|
- !ruby/object:Gem::Dependency
|
141
175
|
name: concourse
|
142
176
|
requirement: !ruby/object:Gem::Requirement
|
@@ -152,47 +186,47 @@ dependencies:
|
|
152
186
|
- !ruby/object:Gem::Version
|
153
187
|
version: '0'
|
154
188
|
- !ruby/object:Gem::Dependency
|
155
|
-
name:
|
189
|
+
name: faker
|
156
190
|
requirement: !ruby/object:Gem::Requirement
|
157
191
|
requirements:
|
158
192
|
- - "~>"
|
159
193
|
- !ruby/object:Gem::Version
|
160
|
-
version: '1.
|
194
|
+
version: '1.9'
|
161
195
|
type: :development
|
162
196
|
prerelease: false
|
163
197
|
version_requirements: !ruby/object:Gem::Requirement
|
164
198
|
requirements:
|
165
199
|
- - "~>"
|
166
200
|
- !ruby/object:Gem::Version
|
167
|
-
version: '1.
|
201
|
+
version: '1.9'
|
168
202
|
- !ruby/object:Gem::Dependency
|
169
|
-
name:
|
203
|
+
name: license_finder
|
170
204
|
requirement: !ruby/object:Gem::Requirement
|
171
205
|
requirements:
|
172
206
|
- - "~>"
|
173
207
|
- !ruby/object:Gem::Version
|
174
|
-
version: '
|
208
|
+
version: '5.5'
|
175
209
|
type: :development
|
176
210
|
prerelease: false
|
177
211
|
version_requirements: !ruby/object:Gem::Requirement
|
178
212
|
requirements:
|
179
213
|
- - "~>"
|
180
214
|
- !ruby/object:Gem::Version
|
181
|
-
version: '
|
215
|
+
version: '5.5'
|
182
216
|
- !ruby/object:Gem::Dependency
|
183
|
-
name:
|
217
|
+
name: rake
|
184
218
|
requirement: !ruby/object:Gem::Requirement
|
185
219
|
requirements:
|
186
220
|
- - "~>"
|
187
221
|
- !ruby/object:Gem::Version
|
188
|
-
version:
|
222
|
+
version: '12.3'
|
189
223
|
type: :development
|
190
224
|
prerelease: false
|
191
225
|
version_requirements: !ruby/object:Gem::Requirement
|
192
226
|
requirements:
|
193
227
|
- - "~>"
|
194
228
|
- !ruby/object:Gem::Version
|
195
|
-
version:
|
229
|
+
version: '12.3'
|
196
230
|
- !ruby/object:Gem::Dependency
|
197
231
|
name: rspec
|
198
232
|
requirement: !ruby/object:Gem::Requirement
|
@@ -213,28 +247,28 @@ dependencies:
|
|
213
247
|
requirements:
|
214
248
|
- - "~>"
|
215
249
|
- !ruby/object:Gem::Version
|
216
|
-
version: 0.9
|
250
|
+
version: '0.9'
|
217
251
|
type: :development
|
218
252
|
prerelease: false
|
219
253
|
version_requirements: !ruby/object:Gem::Requirement
|
220
254
|
requirements:
|
221
255
|
- - "~>"
|
222
256
|
- !ruby/object:Gem::Version
|
223
|
-
version: 0.9
|
257
|
+
version: '0.9'
|
224
258
|
- !ruby/object:Gem::Dependency
|
225
|
-
name:
|
259
|
+
name: simplecov
|
226
260
|
requirement: !ruby/object:Gem::Requirement
|
227
261
|
requirements:
|
228
262
|
- - "~>"
|
229
263
|
- !ruby/object:Gem::Version
|
230
|
-
version:
|
264
|
+
version: '0.16'
|
231
265
|
type: :development
|
232
266
|
prerelease: false
|
233
267
|
version_requirements: !ruby/object:Gem::Requirement
|
234
268
|
requirements:
|
235
269
|
- - "~>"
|
236
270
|
- !ruby/object:Gem::Version
|
237
|
-
version:
|
271
|
+
version: '0.16'
|
238
272
|
description: A command-line tool to help manage your Google Calendar.
|
239
273
|
email:
|
240
274
|
- mike.dalessio@gmail.com
|
@@ -251,10 +285,17 @@ files:
|
|
251
285
|
- Rakefile
|
252
286
|
- bin/calendar-assistant
|
253
287
|
- lib/calendar_assistant.rb
|
254
|
-
- lib/calendar_assistant/authorizer.rb
|
255
288
|
- lib/calendar_assistant/calendar_assistant.rb
|
256
289
|
- lib/calendar_assistant/cli.rb
|
257
|
-
- lib/calendar_assistant/
|
290
|
+
- lib/calendar_assistant/cli/authorizer.rb
|
291
|
+
- lib/calendar_assistant/cli/commands.rb
|
292
|
+
- lib/calendar_assistant/cli/config.rb
|
293
|
+
- lib/calendar_assistant/cli/event_presenter.rb
|
294
|
+
- lib/calendar_assistant/cli/event_set_presenter.rb
|
295
|
+
- lib/calendar_assistant/cli/helpers.rb
|
296
|
+
- lib/calendar_assistant/cli/linter_event_presenter.rb
|
297
|
+
- lib/calendar_assistant/cli/linter_event_set_presenter.rb
|
298
|
+
- lib/calendar_assistant/cli/printer.rb
|
258
299
|
- lib/calendar_assistant/config.rb
|
259
300
|
- lib/calendar_assistant/config/token_store.rb
|
260
301
|
- lib/calendar_assistant/date_helpers.rb
|
@@ -287,8 +328,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
287
328
|
- !ruby/object:Gem::Version
|
288
329
|
version: '0'
|
289
330
|
requirements: []
|
290
|
-
|
291
|
-
rubygems_version: 2.7.8
|
331
|
+
rubygems_version: 3.0.1
|
292
332
|
signing_key:
|
293
333
|
specification_version: 4
|
294
334
|
summary: A command-line tool to help manage your Google Calendar.
|
@@ -1,86 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# code in this file is inspired by
|
3
|
-
#
|
4
|
-
# https://github.com/gsuitedevs/ruby-samples/blob/master/calendar/quickstart/quickstart.rb
|
5
|
-
#
|
6
|
-
# Copyright 2018 Google LLC
|
7
|
-
#
|
8
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
-
# you may not use this file except in compliance with the License.
|
10
|
-
# You may obtain a copy of the License at
|
11
|
-
#
|
12
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
13
|
-
#
|
14
|
-
# Unless required by applicable law or agreed to in writing, software
|
15
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
-
# See the License for the specific language governing permissions and
|
18
|
-
# limitations under the License.
|
19
|
-
|
20
|
-
class CalendarAssistant
|
21
|
-
class Authorizer
|
22
|
-
class NoCredentials < CalendarAssistant::BaseException ; end
|
23
|
-
class UnauthorizedError < CalendarAssistant::BaseException ; end
|
24
|
-
|
25
|
-
OOB_URI = 'urn:ietf:wg:oauth:2.0:oob'.freeze
|
26
|
-
APPLICATION_NAME = "Flavorjones Calendar Assistant".freeze
|
27
|
-
CREDENTIALS_PATH = File.join ENV["HOME"], ".calendar-assistant.client"
|
28
|
-
SCOPE = Google::Apis::CalendarV3::AUTH_CALENDAR
|
29
|
-
|
30
|
-
attr_reader :profile_name, :config_token_store
|
31
|
-
|
32
|
-
def initialize profile_name, config_token_store
|
33
|
-
@profile_name = profile_name
|
34
|
-
@config_token_store = config_token_store
|
35
|
-
end
|
36
|
-
|
37
|
-
def authorize
|
38
|
-
credentials || prompt_user_for_authorization
|
39
|
-
end
|
40
|
-
|
41
|
-
def service
|
42
|
-
if credentials.nil?
|
43
|
-
raise UnauthorizedError, "Not authorized. Please run `calendar-assistant authorize #{profile_name}`"
|
44
|
-
end
|
45
|
-
|
46
|
-
Google::Apis::CalendarV3::CalendarService.new.tap do |service|
|
47
|
-
service.client_options.application_name = APPLICATION_NAME
|
48
|
-
service.authorization = credentials
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
private
|
53
|
-
|
54
|
-
def credentials
|
55
|
-
@credentials ||= authorizer.get_credentials profile_name
|
56
|
-
end
|
57
|
-
|
58
|
-
def prompt_user_for_authorization
|
59
|
-
url = authorizer.get_authorization_url(base_url: OOB_URI)
|
60
|
-
|
61
|
-
puts Rainbow("Please open this URL in your browser:").bold
|
62
|
-
puts
|
63
|
-
puts " " + url
|
64
|
-
puts
|
65
|
-
|
66
|
-
puts Rainbow("Then authorize '#{APPLICATION_NAME}' to manage your calendar and copy/paste the resulting code here:").bold
|
67
|
-
puts
|
68
|
-
print "> "
|
69
|
-
code = STDIN.gets
|
70
|
-
|
71
|
-
authorizer.get_and_store_credentials_from_code(user_id: profile_name, code: code, base_url: OOB_URI)
|
72
|
-
end
|
73
|
-
|
74
|
-
def authorizer
|
75
|
-
@authorizer ||= begin
|
76
|
-
if ! File.exists?(CREDENTIALS_PATH)
|
77
|
-
raise NoCredentials, "No credentials found. Please run `calendar-assistant help setup` for instructions"
|
78
|
-
end
|
79
|
-
|
80
|
-
FileUtils.chmod 0600, CREDENTIALS_PATH
|
81
|
-
client_id = Google::Auth::ClientId.from_file(CREDENTIALS_PATH)
|
82
|
-
Google::Auth::UserAuthorizer.new(client_id, SCOPE, config_token_store)
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|