google_calendar 0.4.4 → 0.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.
- checksums.yaml +7 -0
- data/Gemfile.lock +25 -55
- data/Guardfile +7 -7
- data/README.rdoc +3 -1
- data/VERSION +1 -1
- data/google_calendar.gemspec +7 -7
- data/lib/google/calendar.rb +26 -17
- data/lib/google/calendar_list.rb +43 -0
- data/lib/google/calendar_list_entry.rb +40 -0
- data/lib/google/connection.rb +26 -22
- data/lib/google/event.rb +142 -19
- data/lib/google/freebusy.rb +76 -0
- data/lib/google_calendar.rb +3 -0
- data/readme_code.rb +1 -0
- data/test/helper.rb +2 -2
- data/test/mocks/find_calendar_list.json +69 -0
- data/test/mocks/freebusy_query.json +22 -0
- data/test/mocks/query_events.json +2 -1
- data/test/test_google_calendar.rb +191 -13
- metadata +40 -73
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"timeMin": "2015-03-06T00:00:00.000Z",
|
|
3
|
+
"timeMax": "2015-03-06T23:59:59.000Z",
|
|
4
|
+
"calendars": {
|
|
5
|
+
"busy-calendar-id": {
|
|
6
|
+
"busy": [
|
|
7
|
+
{
|
|
8
|
+
"start": "2015-03-06T10:00:00Z",
|
|
9
|
+
"end": "2015-03-06T11:00:00Z"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"start": "2015-03-06T11:30:00Z",
|
|
13
|
+
"end": "2015-03-06T11:30:00Z"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"not-busy-calendar-id": {
|
|
18
|
+
"busy": [
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"htmlLink": "https://www.google.com/calendar/event?eid=dDAwam5wcWMwOHJjYWJpNnBhNTQ5dHRqbGsgZ3FlYjBpNnY3MzdrZnU1bWQwZjNldWtqbGdAZw",
|
|
19
19
|
"sequence": 1,
|
|
20
20
|
"updated": "2008-10-24T23:08:09.010Z",
|
|
21
|
-
"summary": "Test Event",
|
|
21
|
+
"summary": "Test Event",
|
|
22
|
+
"colorId": "3",
|
|
22
23
|
"start": {
|
|
23
24
|
"dateTime": "2008-09-24T10:30:00-07:00"
|
|
24
25
|
},
|
|
@@ -6,11 +6,7 @@ class TestGoogleCalendar < Minitest::Test
|
|
|
6
6
|
context "When connected" do
|
|
7
7
|
|
|
8
8
|
setup do
|
|
9
|
-
@client_mock =
|
|
10
|
-
@client_mock.stubs(:body).returns(get_mock_body('successful_login.json'))
|
|
11
|
-
@client_mock.stubs(:finish).returns('')
|
|
12
|
-
@client_mock.stubs(:status).returns(200)
|
|
13
|
-
Faraday::Response.stubs(:new).returns(@client_mock)
|
|
9
|
+
@client_mock = setup_mock_client
|
|
14
10
|
|
|
15
11
|
@client_id = "671053090364-ntifn8rauvhib9h3vnsegi6dhfglk9ue.apps.googleusercontent.com"
|
|
16
12
|
@client_secret = "roBgdbfEmJwPgrgi2mRbbO-f"
|
|
@@ -60,6 +56,15 @@ class TestGoogleCalendar < Minitest::Test
|
|
|
60
56
|
end
|
|
61
57
|
end
|
|
62
58
|
|
|
59
|
+
should "accept a connection to re-use" do
|
|
60
|
+
@client_mock.stubs(:body).returns( get_mock_body("events.json") )
|
|
61
|
+
reusable_connection = mock('Google::Connection')
|
|
62
|
+
reusable_connection.expects(:send).returns(@client_mock)
|
|
63
|
+
|
|
64
|
+
calendar = Calendar.new({:calendar => @calendar_id}, reusable_connection)
|
|
65
|
+
calendar.events
|
|
66
|
+
end
|
|
67
|
+
|
|
63
68
|
end # login context
|
|
64
69
|
|
|
65
70
|
context "and logged in" do
|
|
@@ -84,7 +89,7 @@ class TestGoogleCalendar < Minitest::Test
|
|
|
84
89
|
start_min = now
|
|
85
90
|
start_max = (now + 60*60*24)
|
|
86
91
|
@calendar.expects(:event_lookup).with("?timeMin=#{start_min.strftime("%FT%TZ")}&timeMax=#{start_max.strftime("%FT%TZ")}&orderBy=startTime&maxResults=25&singleEvents=true")
|
|
87
|
-
|
|
92
|
+
@calendar.find_events_in_range(start_min, start_max)
|
|
88
93
|
end
|
|
89
94
|
|
|
90
95
|
should "find future events" do
|
|
@@ -92,7 +97,7 @@ class TestGoogleCalendar < Minitest::Test
|
|
|
92
97
|
Time.stubs(:now).returns(now)
|
|
93
98
|
formatted_time = now.strftime("%FT%TZ")
|
|
94
99
|
@calendar.expects(:event_lookup).with("?timeMin=#{formatted_time}&orderBy=startTime&maxResults=25&singleEvents=true")
|
|
95
|
-
|
|
100
|
+
@calendar.find_future_events()
|
|
96
101
|
end
|
|
97
102
|
|
|
98
103
|
should "return multiple events in range as array" do
|
|
@@ -100,13 +105,13 @@ class TestGoogleCalendar < Minitest::Test
|
|
|
100
105
|
events = @calendar.events
|
|
101
106
|
assert_equal events.class.to_s, "Array"
|
|
102
107
|
end
|
|
103
|
-
|
|
108
|
+
|
|
104
109
|
should "return one event in range as array" do
|
|
105
110
|
@client_mock.stubs(:body).returns( get_mock_body("query_events.json") )
|
|
106
111
|
events = @calendar.events
|
|
107
112
|
assert_equal events.class.to_s, "Array"
|
|
108
113
|
end
|
|
109
|
-
|
|
114
|
+
|
|
110
115
|
should "return response of no events in range as array" do
|
|
111
116
|
@client_mock.stubs(:body).returns( get_mock_body("empty_events.json") )
|
|
112
117
|
events = @calendar.events
|
|
@@ -190,7 +195,7 @@ class TestGoogleCalendar < Minitest::Test
|
|
|
190
195
|
@client_mock.stubs(:body).returns( get_mock_body("query_events.json") )
|
|
191
196
|
event = @calendar.find_events('Test')
|
|
192
197
|
e = event[0]
|
|
193
|
-
assert_equal e.to_s, "Event Id '#{e.id}'\n\tStatus: #{e.status}\n\tTitle: #{e.title}\n\tStarts: #{e.start_time}\n\tEnds: #{e.end_time}\n\tLocation: #{e.location}\n\tDescription: #{e.description}\n\n"
|
|
198
|
+
assert_equal e.to_s, "Event Id '#{e.id}'\n\tStatus: #{e.status}\n\tTitle: #{e.title}\n\tStarts: #{e.start_time}\n\tEnds: #{e.end_time}\n\tLocation: #{e.location}\n\tDescription: #{e.description}\n\tColor: #{e.color_id}\n\n"
|
|
194
199
|
end
|
|
195
200
|
|
|
196
201
|
should "update an event by id" do
|
|
@@ -223,7 +228,7 @@ class TestGoogleCalendar < Minitest::Test
|
|
|
223
228
|
@calendar.events
|
|
224
229
|
end
|
|
225
230
|
end
|
|
226
|
-
|
|
231
|
+
|
|
227
232
|
should "create event when id is NIL" do
|
|
228
233
|
@client_mock.stubs(:body).returns( get_mock_body("find_event_by_id.json") )
|
|
229
234
|
|
|
@@ -234,6 +239,12 @@ class TestGoogleCalendar < Minitest::Test
|
|
|
234
239
|
assert_equal event.title, 'New Event Update when id is NIL'
|
|
235
240
|
end
|
|
236
241
|
|
|
242
|
+
should "provide the calendar summary" do
|
|
243
|
+
@client_mock.stubs(:body).returns( get_mock_body("events.json") )
|
|
244
|
+
@calendar.events
|
|
245
|
+
assert_equal 'My Events Calendar', @calendar.summary
|
|
246
|
+
end
|
|
247
|
+
|
|
237
248
|
end # Logged on context
|
|
238
249
|
|
|
239
250
|
end # Connected context
|
|
@@ -284,6 +295,13 @@ class TestGoogleCalendar < Minitest::Test
|
|
|
284
295
|
end
|
|
285
296
|
end
|
|
286
297
|
|
|
298
|
+
context "#creator_name" do
|
|
299
|
+
should "include name" do
|
|
300
|
+
event = Event.new :creator => {'displayName' => 'Someone', 'email' => 'someone@example.com'}
|
|
301
|
+
assert_equal 'Someone', event.creator_name
|
|
302
|
+
end
|
|
303
|
+
end
|
|
304
|
+
|
|
287
305
|
context "transparency" do
|
|
288
306
|
should "be transparent" do
|
|
289
307
|
@event = Event.new(:transparency => true)
|
|
@@ -312,8 +330,20 @@ class TestGoogleCalendar < Minitest::Test
|
|
|
312
330
|
{'email' => 'some.b.one@gmail.com', 'displayName' => 'Some B One', 'responseStatus' => 'tentative'}
|
|
313
331
|
]
|
|
314
332
|
|
|
315
|
-
|
|
316
|
-
|
|
333
|
+
expected_structure = {
|
|
334
|
+
"summary" => "Go Swimming",
|
|
335
|
+
"visibility"=>"default",
|
|
336
|
+
"description" => "The polar bear plunge",
|
|
337
|
+
"location" => "In the arctic ocean",
|
|
338
|
+
"start" => {"dateTime" => "#{@event.start_time}"},
|
|
339
|
+
"end" => {"dateTime" => "#{@event.end_time}"},
|
|
340
|
+
"attendees" => [
|
|
341
|
+
{"displayName" => "Some A One", "email" => "some.a.one@gmail.com", "responseStatus" => "tentative"},
|
|
342
|
+
{"displayName" => "Some B One", "email" => "some.b.one@gmail.com", "responseStatus" => "tentative"}
|
|
343
|
+
],
|
|
344
|
+
"reminders" => {"useDefault" => false, "overrides" => [{"method" => "popup", "minutes" => 10}]}
|
|
345
|
+
}
|
|
346
|
+
assert_equal JSON.parse(@event.to_json), expected_structure
|
|
317
347
|
end
|
|
318
348
|
end
|
|
319
349
|
|
|
@@ -336,6 +366,144 @@ class TestGoogleCalendar < Minitest::Test
|
|
|
336
366
|
end
|
|
337
367
|
end
|
|
338
368
|
end
|
|
369
|
+
|
|
370
|
+
context "at recurring events" do
|
|
371
|
+
should "create json in correct format" do
|
|
372
|
+
now = Time.now
|
|
373
|
+
@event = Event.new
|
|
374
|
+
@event.start_time = now
|
|
375
|
+
@event.end_time = now + (60 * 60)
|
|
376
|
+
@event.title = "Go Swimming"
|
|
377
|
+
@event.description = "The polar bear plunge"
|
|
378
|
+
@event.location = "In the arctic ocean"
|
|
379
|
+
@event.transparency = "opaque"
|
|
380
|
+
@event.reminders = { 'useDefault' => false, 'overrides' => ['minutes' => 10, 'method' => "popup"]}
|
|
381
|
+
@event.attendees = [
|
|
382
|
+
{'email' => 'some.a.one@gmail.com', 'displayName' => 'Some A One', 'responseStatus' => 'tentative'},
|
|
383
|
+
{'email' => 'some.b.one@gmail.com', 'displayName' => 'Some B One', 'responseStatus' => 'tentative'}
|
|
384
|
+
]
|
|
385
|
+
@event.recurrence = {freq: "monthly", count: "5", interval: "2"}
|
|
386
|
+
expected_structure = {
|
|
387
|
+
"summary" => "Go Swimming",
|
|
388
|
+
"visibility"=>"default",
|
|
389
|
+
"description" => "The polar bear plunge",
|
|
390
|
+
"location" => "In the arctic ocean",
|
|
391
|
+
"start" => {"dateTime" => "#{@event.start_time}", "timeZone" => "#{Time.now.getlocal.zone}"},
|
|
392
|
+
"end" => {"dateTime" => "#{@event.end_time}", "timeZone" => "#{Time.now.getlocal.zone}"},
|
|
393
|
+
"recurrence" => ["RRULE:FREQ=MONTHLY;COUNT=5;INTERVAL=2"],
|
|
394
|
+
"attendees" => [
|
|
395
|
+
{"displayName" => "Some A One", "email" => "some.a.one@gmail.com", "responseStatus" => "tentative"},
|
|
396
|
+
{"displayName" => "Some B One", "email" => "some.b.one@gmail.com", "responseStatus" => "tentative"}
|
|
397
|
+
],
|
|
398
|
+
"reminders" => {"useDefault" => false, "overrides" => [{"method" => "popup", "minutes"=>10}]}
|
|
399
|
+
}
|
|
400
|
+
assert_equal JSON.parse(@event.to_json), expected_structure
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
should "parse recurrence rule strings corectly" do
|
|
404
|
+
rrule = ["RRULE:FREQ=MONTHLY;INTERVAL=2;BYDAY=-1MO"]
|
|
405
|
+
correct_hash = {"freq" => "monthly", "interval" => "2", "byday" => "-1mo"}
|
|
406
|
+
assert_equal correct_hash.inspect, Event.parse_recurrence_rule(rrule).inspect
|
|
407
|
+
|
|
408
|
+
rrule = ["RRULE:FREQ=MONTHLY;UNTIL=20170629T080000Z;INTERVAL=6"]
|
|
409
|
+
correct_hash = {"freq" => "monthly", "until" => "20170629t080000z", "interval" => "6"}
|
|
410
|
+
assert_equal correct_hash.inspect, Event.parse_recurrence_rule(rrule).inspect
|
|
411
|
+
|
|
412
|
+
rrule = ["RRULE:FREQ=WEEKLY;BYDAY=MO,TH"]
|
|
413
|
+
correct_hash = {"freq" => "weekly", "byday" => "mo,th"}
|
|
414
|
+
assert_equal correct_hash.inspect, Event.parse_recurrence_rule(rrule).inspect
|
|
415
|
+
end
|
|
416
|
+
end
|
|
417
|
+
end
|
|
418
|
+
|
|
419
|
+
context "a calendar list" do
|
|
420
|
+
|
|
421
|
+
setup do
|
|
422
|
+
@client_mock = setup_mock_client
|
|
423
|
+
|
|
424
|
+
@client_id = "671053090364-ntifn8rauvhib9h3vnsegi6dhfglk9ue.apps.googleusercontent.com"
|
|
425
|
+
@client_secret = "roBgdbfEmJwPgrgi2mRbbO-f"
|
|
426
|
+
@refresh_token = "1/eiqBWx8aj-BsdhwvlzDMFOUN1IN_HyThvYTujyksO4c"
|
|
427
|
+
|
|
428
|
+
@calendar_list = Google::CalendarList.new(
|
|
429
|
+
:client_id => @client_id,
|
|
430
|
+
:client_secret => @client_secret,
|
|
431
|
+
:redirect_url => "urn:ietf:wg:oauth:2.0:oob",
|
|
432
|
+
:refresh_token => @refresh_token
|
|
433
|
+
)
|
|
434
|
+
|
|
435
|
+
@client_mock.stubs(:body).returns(get_mock_body("find_calendar_list.json"))
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
should "find all calendars" do
|
|
439
|
+
entries = @calendar_list.fetch_entries
|
|
440
|
+
assert_equal entries.length, 3
|
|
441
|
+
assert_equal entries.map(&:class).uniq, [CalendarListEntry]
|
|
442
|
+
assert_equal entries.map(&:id), ["initech.com_ed493d0a9b46ea46c3a0d48611ce@resource.calendar.google.com", "initech.com_db18a4e59c230a5cc5d2b069a30f@resource.calendar.google.com", "bob@initech.com"]
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
should "set the calendar list entry parameters" do
|
|
446
|
+
entry = @calendar_list.fetch_entries.find {|list_entry| list_entry.id == "bob@initech.com" }
|
|
447
|
+
|
|
448
|
+
assert_equal entry.summary, "Bob's Calendar"
|
|
449
|
+
assert_equal entry.time_zone, "Europe/London"
|
|
450
|
+
assert_equal entry.access_role, "owner"
|
|
451
|
+
assert_equal entry.primary?, true
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
should "accept a connection to re-use" do
|
|
455
|
+
reusable_connection = mock('Google::Connection')
|
|
456
|
+
reusable_connection.expects(:send).returns(@client_mock)
|
|
457
|
+
|
|
458
|
+
calendar_list = CalendarList.new({}, reusable_connection)
|
|
459
|
+
calendar_list.fetch_entries
|
|
460
|
+
end
|
|
461
|
+
|
|
462
|
+
should "return entries which can create calendars" do
|
|
463
|
+
entry = @calendar_list.fetch_entries.first
|
|
464
|
+
calendar = entry.to_calendar
|
|
465
|
+
|
|
466
|
+
assert_equal calendar.class, Calendar
|
|
467
|
+
assert_equal calendar.id, entry.id
|
|
468
|
+
assert_equal calendar.connection, @calendar_list.connection
|
|
469
|
+
end
|
|
470
|
+
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
context "a freebusy query" do
|
|
474
|
+
|
|
475
|
+
setup do
|
|
476
|
+
@client_mock = setup_mock_client
|
|
477
|
+
|
|
478
|
+
@client_id = "671053090364-ntifn8rauvhib9h3vnsegi6dhfglk9ue.apps.googleusercontent.com"
|
|
479
|
+
@client_secret = "roBgdbfEmJwPgrgi2mRbbO-f"
|
|
480
|
+
@refresh_token = "1/eiqBWx8aj-BsdhwvlzDMFOUN1IN_HyThvYTujyksO4c"
|
|
481
|
+
|
|
482
|
+
@freebusy = Google::Freebusy.new(
|
|
483
|
+
:client_id => @client_id,
|
|
484
|
+
:client_secret => @client_secret,
|
|
485
|
+
:redirect_url => "urn:ietf:wg:oauth:2.0:oob",
|
|
486
|
+
:refresh_token => @refresh_token
|
|
487
|
+
)
|
|
488
|
+
|
|
489
|
+
@client_mock.stubs(:body).returns(get_mock_body("freebusy_query.json"))
|
|
490
|
+
|
|
491
|
+
@calendar_ids = ['busy-calendar-id', 'not-busy-calendar-id']
|
|
492
|
+
@start_time = Time.new(2015, 3, 6, 0, 0, 0)
|
|
493
|
+
@end_time = Time.new(2015, 3, 6, 23, 59, 59)
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
should "return a hash with keys of the supplied calendar ids" do
|
|
497
|
+
assert_equal ['busy-calendar-id', 'not-busy-calendar-id'], @freebusy.query(@calendar_ids, @start_time, @end_time).keys
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
should "returns the busy times for each calendar supplied" do
|
|
501
|
+
freebusy_result = @freebusy.query(@calendar_ids, @start_time, @end_time)
|
|
502
|
+
|
|
503
|
+
assert_equal ({'start' => '2015-03-06T10:00:00Z', 'end' => '2015-03-06T11:00:00Z' }), freebusy_result['busy-calendar-id'].first
|
|
504
|
+
assert_equal ({'start' => '2015-03-06T11:30:00Z', 'end' => '2015-03-06T11:30:00Z' }), freebusy_result['busy-calendar-id'].last
|
|
505
|
+
assert_equal [], freebusy_result['not-busy-calendar-id']
|
|
506
|
+
end
|
|
339
507
|
end
|
|
340
508
|
|
|
341
509
|
protected
|
|
@@ -344,4 +512,14 @@ class TestGoogleCalendar < Minitest::Test
|
|
|
344
512
|
File.open(@@mock_path + '/' + name).read
|
|
345
513
|
end
|
|
346
514
|
|
|
515
|
+
def setup_mock_client
|
|
516
|
+
client = mock('Faraday::Response')
|
|
517
|
+
client.stubs(:finish).returns('')
|
|
518
|
+
client.stubs(:status).returns(200)
|
|
519
|
+
client.stubs(:headers).returns({'content-type' => 'application/json; charset=utf-8'})
|
|
520
|
+
client.stubs(:body).returns(get_mock_body('successful_login.json'))
|
|
521
|
+
Faraday::Response.stubs(:new).returns(client)
|
|
522
|
+
client
|
|
523
|
+
end
|
|
524
|
+
|
|
347
525
|
end
|
metadata
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google_calendar
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
5
|
-
prerelease:
|
|
4
|
+
version: '0.5'
|
|
6
5
|
platform: ruby
|
|
7
6
|
authors:
|
|
8
7
|
- Steve Zich
|
|
@@ -14,193 +13,155 @@ dependencies:
|
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: signet
|
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
|
17
|
-
none: false
|
|
18
16
|
requirements:
|
|
19
|
-
- - ~>
|
|
17
|
+
- - "~>"
|
|
20
18
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: '0.
|
|
19
|
+
version: '0.6'
|
|
22
20
|
type: :runtime
|
|
23
21
|
prerelease: false
|
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
-
none: false
|
|
26
23
|
requirements:
|
|
27
|
-
- - ~>
|
|
24
|
+
- - "~>"
|
|
28
25
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: '0.
|
|
26
|
+
version: '0.6'
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
|
31
28
|
name: json
|
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
|
33
|
-
none: false
|
|
34
30
|
requirements:
|
|
35
|
-
- - ~>
|
|
31
|
+
- - "~>"
|
|
36
32
|
- !ruby/object:Gem::Version
|
|
37
33
|
version: '1.8'
|
|
38
34
|
type: :runtime
|
|
39
35
|
prerelease: false
|
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
41
|
-
none: false
|
|
42
37
|
requirements:
|
|
43
|
-
- - ~>
|
|
38
|
+
- - "~>"
|
|
44
39
|
- !ruby/object:Gem::Version
|
|
45
40
|
version: '1.8'
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
|
47
42
|
name: terminal-notifier-guard
|
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
|
49
|
-
none: false
|
|
50
44
|
requirements:
|
|
51
|
-
- - ~>
|
|
45
|
+
- - "~>"
|
|
52
46
|
- !ruby/object:Gem::Version
|
|
53
47
|
version: '1.6'
|
|
54
48
|
type: :development
|
|
55
49
|
prerelease: false
|
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
-
none: false
|
|
58
51
|
requirements:
|
|
59
|
-
- - ~>
|
|
52
|
+
- - "~>"
|
|
60
53
|
- !ruby/object:Gem::Version
|
|
61
54
|
version: '1.6'
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
|
63
56
|
name: rb-fsevent
|
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
|
65
|
-
none: false
|
|
66
58
|
requirements:
|
|
67
|
-
- - ~>
|
|
59
|
+
- - "~>"
|
|
68
60
|
- !ruby/object:Gem::Version
|
|
69
61
|
version: '0.9'
|
|
70
62
|
type: :development
|
|
71
63
|
prerelease: false
|
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
73
|
-
none: false
|
|
74
65
|
requirements:
|
|
75
|
-
- - ~>
|
|
66
|
+
- - "~>"
|
|
76
67
|
- !ruby/object:Gem::Version
|
|
77
68
|
version: '0.9'
|
|
78
|
-
- !ruby/object:Gem::Dependency
|
|
79
|
-
name: guard-minitest
|
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
|
81
|
-
none: false
|
|
82
|
-
requirements:
|
|
83
|
-
- - ~>
|
|
84
|
-
- !ruby/object:Gem::Version
|
|
85
|
-
version: '2.3'
|
|
86
|
-
type: :development
|
|
87
|
-
prerelease: false
|
|
88
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
89
|
-
none: false
|
|
90
|
-
requirements:
|
|
91
|
-
- - ~>
|
|
92
|
-
- !ruby/object:Gem::Version
|
|
93
|
-
version: '2.3'
|
|
94
69
|
- !ruby/object:Gem::Dependency
|
|
95
70
|
name: minitest
|
|
96
71
|
requirement: !ruby/object:Gem::Requirement
|
|
97
|
-
none: false
|
|
98
72
|
requirements:
|
|
99
|
-
- - ~>
|
|
73
|
+
- - "~>"
|
|
100
74
|
- !ruby/object:Gem::Version
|
|
101
75
|
version: '5.1'
|
|
102
76
|
type: :development
|
|
103
77
|
prerelease: false
|
|
104
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
105
|
-
none: false
|
|
106
79
|
requirements:
|
|
107
|
-
- - ~>
|
|
80
|
+
- - "~>"
|
|
108
81
|
- !ruby/object:Gem::Version
|
|
109
82
|
version: '5.1'
|
|
110
83
|
- !ruby/object:Gem::Dependency
|
|
111
84
|
name: minitest-reporters
|
|
112
85
|
requirement: !ruby/object:Gem::Requirement
|
|
113
|
-
none: false
|
|
114
86
|
requirements:
|
|
115
|
-
- - ~>
|
|
87
|
+
- - "~>"
|
|
116
88
|
- !ruby/object:Gem::Version
|
|
117
89
|
version: '1.0'
|
|
118
90
|
type: :development
|
|
119
91
|
prerelease: false
|
|
120
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
-
none: false
|
|
122
93
|
requirements:
|
|
123
|
-
- - ~>
|
|
94
|
+
- - "~>"
|
|
124
95
|
- !ruby/object:Gem::Version
|
|
125
96
|
version: '1.0'
|
|
126
97
|
- !ruby/object:Gem::Dependency
|
|
127
98
|
name: shoulda-context
|
|
128
99
|
requirement: !ruby/object:Gem::Requirement
|
|
129
|
-
none: false
|
|
130
100
|
requirements:
|
|
131
|
-
- - ~>
|
|
101
|
+
- - "~>"
|
|
132
102
|
- !ruby/object:Gem::Version
|
|
133
103
|
version: '1.2'
|
|
134
104
|
type: :development
|
|
135
105
|
prerelease: false
|
|
136
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
137
|
-
none: false
|
|
138
107
|
requirements:
|
|
139
|
-
- - ~>
|
|
108
|
+
- - "~>"
|
|
140
109
|
- !ruby/object:Gem::Version
|
|
141
110
|
version: '1.2'
|
|
142
111
|
- !ruby/object:Gem::Dependency
|
|
143
112
|
name: bundler
|
|
144
113
|
requirement: !ruby/object:Gem::Requirement
|
|
145
|
-
none: false
|
|
146
114
|
requirements:
|
|
147
|
-
- -
|
|
115
|
+
- - ">="
|
|
148
116
|
- !ruby/object:Gem::Version
|
|
149
117
|
version: '1.2'
|
|
150
118
|
type: :development
|
|
151
119
|
prerelease: false
|
|
152
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
153
|
-
none: false
|
|
154
121
|
requirements:
|
|
155
|
-
- -
|
|
122
|
+
- - ">="
|
|
156
123
|
- !ruby/object:Gem::Version
|
|
157
124
|
version: '1.2'
|
|
158
125
|
- !ruby/object:Gem::Dependency
|
|
159
126
|
name: mocha
|
|
160
127
|
requirement: !ruby/object:Gem::Requirement
|
|
161
|
-
none: false
|
|
162
128
|
requirements:
|
|
163
|
-
- - ~>
|
|
129
|
+
- - "~>"
|
|
164
130
|
- !ruby/object:Gem::Version
|
|
165
131
|
version: '1.1'
|
|
166
132
|
type: :development
|
|
167
133
|
prerelease: false
|
|
168
134
|
version_requirements: !ruby/object:Gem::Requirement
|
|
169
|
-
none: false
|
|
170
135
|
requirements:
|
|
171
|
-
- - ~>
|
|
136
|
+
- - "~>"
|
|
172
137
|
- !ruby/object:Gem::Version
|
|
173
138
|
version: '1.1'
|
|
174
139
|
- !ruby/object:Gem::Dependency
|
|
175
140
|
name: rake
|
|
176
141
|
requirement: !ruby/object:Gem::Requirement
|
|
177
|
-
none: false
|
|
178
142
|
requirements:
|
|
179
|
-
- - ~>
|
|
143
|
+
- - "~>"
|
|
180
144
|
- !ruby/object:Gem::Version
|
|
181
145
|
version: '10'
|
|
182
146
|
type: :development
|
|
183
147
|
prerelease: false
|
|
184
148
|
version_requirements: !ruby/object:Gem::Requirement
|
|
185
|
-
none: false
|
|
186
149
|
requirements:
|
|
187
|
-
- - ~>
|
|
150
|
+
- - "~>"
|
|
188
151
|
- !ruby/object:Gem::Version
|
|
189
152
|
version: '10'
|
|
190
153
|
- !ruby/object:Gem::Dependency
|
|
191
154
|
name: rdoc
|
|
192
155
|
requirement: !ruby/object:Gem::Requirement
|
|
193
|
-
none: false
|
|
194
156
|
requirements:
|
|
195
|
-
- - ~>
|
|
157
|
+
- - "~>"
|
|
196
158
|
- !ruby/object:Gem::Version
|
|
197
159
|
version: '4.1'
|
|
198
160
|
type: :development
|
|
199
161
|
prerelease: false
|
|
200
162
|
version_requirements: !ruby/object:Gem::Requirement
|
|
201
|
-
none: false
|
|
202
163
|
requirements:
|
|
203
|
-
- - ~>
|
|
164
|
+
- - "~>"
|
|
204
165
|
- !ruby/object:Gem::Version
|
|
205
166
|
version: '4.1'
|
|
206
167
|
description: A minimal wrapper around the google calendar API
|
|
@@ -211,9 +172,9 @@ extra_rdoc_files:
|
|
|
211
172
|
- LICENSE.txt
|
|
212
173
|
- README.rdoc
|
|
213
174
|
files:
|
|
214
|
-
- .document
|
|
215
|
-
- .gitignore
|
|
216
|
-
- .travis.yml
|
|
175
|
+
- ".document"
|
|
176
|
+
- ".gitignore"
|
|
177
|
+
- ".travis.yml"
|
|
217
178
|
- Gemfile
|
|
218
179
|
- Gemfile.lock
|
|
219
180
|
- Guardfile
|
|
@@ -223,9 +184,12 @@ files:
|
|
|
223
184
|
- VERSION
|
|
224
185
|
- google_calendar.gemspec
|
|
225
186
|
- lib/google/calendar.rb
|
|
187
|
+
- lib/google/calendar_list.rb
|
|
188
|
+
- lib/google/calendar_list_entry.rb
|
|
226
189
|
- lib/google/connection.rb
|
|
227
190
|
- lib/google/errors.rb
|
|
228
191
|
- lib/google/event.rb
|
|
192
|
+
- lib/google/freebusy.rb
|
|
229
193
|
- lib/google_calendar.rb
|
|
230
194
|
- readme_code.rb
|
|
231
195
|
- test/helper.rb
|
|
@@ -237,7 +201,9 @@ files:
|
|
|
237
201
|
- test/mocks/empty_events.json
|
|
238
202
|
- test/mocks/events.json
|
|
239
203
|
- test/mocks/find__all_day_event_by_id.json
|
|
204
|
+
- test/mocks/find_calendar_list.json
|
|
240
205
|
- test/mocks/find_event_by_id.json
|
|
206
|
+
- test/mocks/freebusy_query.json
|
|
241
207
|
- test/mocks/login_with_auth_code_fail.json
|
|
242
208
|
- test/mocks/login_with_auth_code_success.json
|
|
243
209
|
- test/mocks/login_with_refresh_token_success.json
|
|
@@ -249,27 +215,26 @@ files:
|
|
|
249
215
|
homepage: http://northworld.github.io/google_calendar/
|
|
250
216
|
licenses:
|
|
251
217
|
- MIT
|
|
218
|
+
metadata: {}
|
|
252
219
|
post_install_message:
|
|
253
220
|
rdoc_options: []
|
|
254
221
|
require_paths:
|
|
255
222
|
- lib
|
|
256
223
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
257
|
-
none: false
|
|
258
224
|
requirements:
|
|
259
|
-
- -
|
|
225
|
+
- - ">="
|
|
260
226
|
- !ruby/object:Gem::Version
|
|
261
227
|
version: '0'
|
|
262
228
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
263
|
-
none: false
|
|
264
229
|
requirements:
|
|
265
|
-
- -
|
|
230
|
+
- - ">="
|
|
266
231
|
- !ruby/object:Gem::Version
|
|
267
232
|
version: '0'
|
|
268
233
|
requirements: []
|
|
269
234
|
rubyforge_project:
|
|
270
|
-
rubygems_version:
|
|
235
|
+
rubygems_version: 2.4.3
|
|
271
236
|
signing_key:
|
|
272
|
-
specification_version:
|
|
237
|
+
specification_version: 4
|
|
273
238
|
summary: A lightweight Google Calendar API wrapper
|
|
274
239
|
test_files:
|
|
275
240
|
- test/helper.rb
|
|
@@ -281,7 +246,9 @@ test_files:
|
|
|
281
246
|
- test/mocks/empty_events.json
|
|
282
247
|
- test/mocks/events.json
|
|
283
248
|
- test/mocks/find__all_day_event_by_id.json
|
|
249
|
+
- test/mocks/find_calendar_list.json
|
|
284
250
|
- test/mocks/find_event_by_id.json
|
|
251
|
+
- test/mocks/freebusy_query.json
|
|
285
252
|
- test/mocks/login_with_auth_code_fail.json
|
|
286
253
|
- test/mocks/login_with_auth_code_success.json
|
|
287
254
|
- test/mocks/login_with_refresh_token_success.json
|