google_calendar 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +2 -5
- data/.env.default +6 -0
- data/.env.test +6 -0
- data/.gitignore +2 -0
- data/.travis.yml +7 -1
- data/Gemfile.lock +18 -15
- data/README.rdoc +11 -3
- data/Rakefile +10 -0
- data/google_calendar.gemspec +4 -3
- data/lib/google/calendar.rb +13 -7
- data/lib/google/connection.rb +2 -1
- data/lib/google/event.rb +41 -12
- data/test/helper.rb +2 -4
- data/test/test_google_calendar.rb +59 -8
- metadata +19 -3
checksums.yaml
CHANGED
@@ -1,7 +1,4 @@
|
|
1
1
|
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 2c17b12f3368a1500b481e98511d25a58e8822c5
|
4
|
-
data.tar.gz: 1deb46615f678e7e445765895cca36af94f284f4
|
5
2
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37b7d1c2914d9c4975ff8477a94a5c5ae18d5cb8dacf089bbadb1a16414984adc4b606a97a08f52b9baae9beb018344c6cf6616f65d1064d4c5499d7ddc494a9
|
4
|
+
data.tar.gz: be2f3af778d82be79cebfac47135c2441363eeeffeed43d7eab04a3935f192b287fcc79b9b55b3bd02ccb6beac58eaf33c75db9d2a947efe42aadf64e106a25b
|
data/.env.default
ADDED
data/.env.test
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
CLIENT_ID='671053090364-ntifn8rauvhib9h3vnsegi6dhfglk9ue.apps.googleusercontent.com'
|
2
|
+
CLIENT_SECRET='roBgdbfEmJwPgrgi2mRbbO-f'
|
3
|
+
REFRESH_TOKEN='1/eiqBWx8aj-BsdhwvlzDMFOUN1IN_HyThvYTujyksO4c'
|
4
|
+
CALENDAR_ID='klei8jnelo09nflqehnvfzipgs@group.calendar.google.com'
|
5
|
+
ACCESS_TOKEN='ya29.hYjPO0uHt63uWr5qmQtMEReZEvILcdGlPCOHDy6quKPyEQaQQvqaVAlLAVASaRm_O0a7vkZ91T8xyQ'
|
6
|
+
REDIRECT_URL='urn:ietf:wg:oauth:2.0:oob'
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -2,8 +2,14 @@ language: ruby
|
|
2
2
|
rvm:
|
3
3
|
- "2.1"
|
4
4
|
- "2.2"
|
5
|
-
- "2.3
|
5
|
+
- "2.3"
|
6
|
+
- "2.4"
|
6
7
|
before_install:
|
7
8
|
- gem install bundler
|
9
|
+
addons:
|
10
|
+
code_climate:
|
11
|
+
repo_token: 35bb9d218078742d37436a9c9a8b78199e8c7312d034081881de670e95b8dcad
|
12
|
+
after_success:
|
13
|
+
- bundle exec codeclimate-test-reporter
|
8
14
|
# uncomment this line if your project needs to run something other than `rake`:
|
9
15
|
# script: bundle exec rspec spec
|
data/Gemfile.lock
CHANGED
@@ -12,40 +12,42 @@ GEM
|
|
12
12
|
TimezoneParser (0.2.0)
|
13
13
|
insensitive_hash
|
14
14
|
tzinfo
|
15
|
-
addressable (2.
|
15
|
+
addressable (2.5.0)
|
16
|
+
public_suffix (~> 2.0, >= 2.0.2)
|
16
17
|
ansi (1.5.0)
|
17
|
-
builder (3.2.
|
18
|
-
codeclimate-test-reporter (0.
|
19
|
-
simplecov
|
18
|
+
builder (3.2.3)
|
19
|
+
codeclimate-test-reporter (1.0.5)
|
20
|
+
simplecov
|
20
21
|
docile (1.1.5)
|
21
|
-
|
22
|
+
dotenv (2.2.0)
|
23
|
+
faraday (0.11.0)
|
22
24
|
multipart-post (>= 1.2, < 3)
|
23
25
|
insensitive_hash (0.3.3)
|
24
|
-
json (
|
26
|
+
json (2.0.3)
|
25
27
|
jwt (1.5.6)
|
26
28
|
metaclass (0.0.4)
|
27
|
-
minitest (5.
|
28
|
-
minitest-reporters (1.1.
|
29
|
+
minitest (5.10.1)
|
30
|
+
minitest-reporters (1.1.14)
|
29
31
|
ansi
|
30
32
|
builder
|
31
33
|
minitest (>= 5.0)
|
32
34
|
ruby-progressbar
|
33
|
-
mocha (1.1
|
35
|
+
mocha (1.2.1)
|
34
36
|
metaclass (~> 0.0.1)
|
35
37
|
multi_json (1.12.1)
|
36
38
|
multipart-post (2.0.0)
|
39
|
+
public_suffix (2.0.5)
|
37
40
|
rake (11.3.0)
|
38
|
-
rb-fsevent (0.9.
|
39
|
-
rdoc (4.
|
40
|
-
json (~> 1.4)
|
41
|
+
rb-fsevent (0.9.8)
|
42
|
+
rdoc (4.3.0)
|
41
43
|
ruby-progressbar (1.8.1)
|
42
|
-
shoulda-context (1.2.
|
44
|
+
shoulda-context (1.2.2)
|
43
45
|
signet (0.7.3)
|
44
46
|
addressable (~> 2.3)
|
45
47
|
faraday (~> 0.9)
|
46
48
|
jwt (~> 1.5)
|
47
49
|
multi_json (~> 1.10)
|
48
|
-
simplecov (0.
|
50
|
+
simplecov (0.13.0)
|
49
51
|
docile (~> 1.1.0)
|
50
52
|
json (>= 1.8, < 3)
|
51
53
|
simplecov-html (~> 0.10.0)
|
@@ -61,6 +63,7 @@ PLATFORMS
|
|
61
63
|
DEPENDENCIES
|
62
64
|
bundler (>= 1.2)
|
63
65
|
codeclimate-test-reporter
|
66
|
+
dotenv (~> 2.1)
|
64
67
|
google_calendar!
|
65
68
|
minitest (~> 5.1)
|
66
69
|
minitest-reporters (~> 1.0)
|
@@ -72,4 +75,4 @@ DEPENDENCIES
|
|
72
75
|
terminal-notifier-guard (~> 1.6)
|
73
76
|
|
74
77
|
BUNDLED WITH
|
75
|
-
1.
|
78
|
+
1.14.4
|
data/README.rdoc
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
= Google Calendar
|
3
2
|
|
4
3
|
A fast lightweight and minimalist wrapper around the {Google Calendar}[https://www.google.com/calendar/] api.
|
@@ -7,7 +6,7 @@ A fast lightweight and minimalist wrapper around the {Google Calendar}[https://w
|
|
7
6
|
== Install
|
8
7
|
[sudo] gem install 'google_calendar'
|
9
8
|
|
10
|
-
== Setup
|
9
|
+
== Setup
|
11
10
|
|
12
11
|
<b>Obtain a Client ID and Secret</b>
|
13
12
|
|
@@ -32,7 +31,7 @@ A fast lightweight and minimalist wrapper around the {Google Calendar}[https://w
|
|
32
31
|
require 'google_calendar'
|
33
32
|
|
34
33
|
# Create an instance of the calendar.
|
35
|
-
cal = Google::Calendar.new(:client_id => YOUR_CLIENT_ID,
|
34
|
+
cal = Google::Calendar.new(:client_id => YOUR_CLIENT_ID,
|
36
35
|
:client_secret => YOUR_SECRET,
|
37
36
|
:calendar => YOUR_CALENDAR_ID,
|
38
37
|
:redirect_url => "urn:ietf:wg:oauth:2.0:oob" # this is what Google uses for 'applications'
|
@@ -106,6 +105,15 @@ The current google_calendar gem supports Ruby 2.1 and higher -- because of the j
|
|
106
105
|
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
107
106
|
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
108
107
|
|
108
|
+
== Running Tests
|
109
|
+
The first time you run +rake+ +test+ Rake will copy over +.env.test+
|
110
|
+
to +.env+ for use by Dotenv. You can also use +.env.default+ as your
|
111
|
+
own starting point, just remember to copy it over to +.env+ before
|
112
|
+
running tests.
|
113
|
+
|
114
|
+
You can modify +.env+ with your own credentials and not worry about
|
115
|
+
accidentally committing to the repo as +.env+ is in the +.gitignore+.
|
116
|
+
|
109
117
|
== Copyright
|
110
118
|
|
111
119
|
Copyright (c) 2010-2014 Steve Zich. See LICENSE.txt for further details.
|
data/Rakefile
CHANGED
@@ -27,3 +27,13 @@ Rake::RDocTask.new do |rdoc|
|
|
27
27
|
rdoc.rdoc_files.include('README*')
|
28
28
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
29
29
|
end
|
30
|
+
|
31
|
+
desc "Load environment settings from .env"
|
32
|
+
task :dotenv do
|
33
|
+
require "dotenv"
|
34
|
+
FileUtils.copy('.env.test', '.env') unless File.exist?('.env')
|
35
|
+
Dotenv.load
|
36
|
+
end
|
37
|
+
|
38
|
+
task :environment => :dotenv
|
39
|
+
task :test => :dotenv
|
data/google_calendar.gemspec
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "google_calendar"
|
5
|
-
s.version = "0.6.
|
6
|
-
s.date = "
|
5
|
+
s.version = "0.6.2"
|
6
|
+
s.date = "2017-02-17"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
9
9
|
|
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
|
|
24
24
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
25
25
|
|
26
26
|
s.require_paths = ["lib"]
|
27
|
-
s.rubygems_version = "2.
|
27
|
+
s.rubygems_version = "2.6.10"
|
28
28
|
|
29
29
|
s.add_runtime_dependency(%q<signet>, ["~> 0.7"])
|
30
30
|
s.add_runtime_dependency(%q<json>, [">= 1.8.3", "< 2.1"])
|
@@ -39,5 +39,6 @@ Gem::Specification.new do |s|
|
|
39
39
|
s.add_development_dependency(%q<mocha>, ["~> 1.1"])
|
40
40
|
s.add_development_dependency(%q<rake>, ["~> 11"])
|
41
41
|
s.add_development_dependency(%q<rdoc>, ["~> 4.1"])
|
42
|
+
s.add_development_dependency(%q<dotenv>, ["~> 2.1"])
|
42
43
|
|
43
44
|
end
|
data/lib/google/calendar.rb
CHANGED
@@ -270,10 +270,14 @@ module Google
|
|
270
270
|
# Works like the create_event method.
|
271
271
|
#
|
272
272
|
def find_or_create_event_by_id(id, &blk)
|
273
|
-
if id
|
274
|
-
setup_event(
|
273
|
+
if id && event = find_event_by_id(id)[0]
|
274
|
+
setup_event(event, &blk)
|
275
|
+
elsif id
|
276
|
+
event = Event.new(id: id, new_event_with_id_specified: true)
|
277
|
+
setup_event(event, &blk)
|
275
278
|
else
|
276
|
-
|
279
|
+
event = Event.new
|
280
|
+
setup_event(event, &blk)
|
277
281
|
end
|
278
282
|
end
|
279
283
|
|
@@ -284,12 +288,13 @@ module Google
|
|
284
288
|
def save_event(event)
|
285
289
|
method = event.new_event? ? :post : :put
|
286
290
|
body = event.use_quickadd? ? nil : event.to_json
|
291
|
+
notifications = "sendNotifications=#{event.send_notifications?}"
|
287
292
|
query_string = if event.use_quickadd?
|
288
|
-
"/quickAdd
|
293
|
+
"/quickAdd?#{notifications}&text=#{event.title}"
|
289
294
|
elsif event.new_event?
|
290
|
-
|
295
|
+
"?#{notifications}"
|
291
296
|
else # update existing event.
|
292
|
-
"/#{event.id}"
|
297
|
+
"/#{event.id}?#{notifications}"
|
293
298
|
end
|
294
299
|
|
295
300
|
send_events_request(query_string, method, body)
|
@@ -300,7 +305,8 @@ module Google
|
|
300
305
|
# This is a callback used by the Event class.
|
301
306
|
#
|
302
307
|
def delete_event(event)
|
303
|
-
|
308
|
+
notifications = "sendNotifications=#{event.send_notifications?}"
|
309
|
+
send_events_request("/#{event.id}?#{notifications}", :delete)
|
304
310
|
end
|
305
311
|
|
306
312
|
protected
|
data/lib/google/connection.rb
CHANGED
@@ -18,7 +18,8 @@ module Google
|
|
18
18
|
:issuer => params[:client_id],
|
19
19
|
:audience => TOKEN_URI,
|
20
20
|
:token_credential_uri => TOKEN_URI,
|
21
|
-
:signing_key => params[:signing_key]
|
21
|
+
:signing_key => params[:signing_key],
|
22
|
+
:person => params[:person]
|
22
23
|
)
|
23
24
|
Connection.new(params, client)
|
24
25
|
end
|
data/lib/google/event.rb
CHANGED
@@ -30,11 +30,12 @@ module Google
|
|
30
30
|
# * +extended_properties+ - Custom properties which may be shared or private. Read Write
|
31
31
|
# * +guests_can_invite_others+ - Whether attendees other than the organizer can invite others to the event (*true*, false). Read Write.
|
32
32
|
# * +guests_can_see_other_guests+ - Whether attendees other than the organizer can see who the event's attendees are (*true*, false). Read Write.
|
33
|
+
# * +send_notifications+ - Whether to send notifications about the event update (true, *false*). Write only.
|
33
34
|
#
|
34
35
|
class Event
|
35
36
|
attr_reader :id, :raw, :html_link, :status, :transparency, :visibility
|
36
37
|
attr_writer :reminders, :recurrence, :extended_properties
|
37
|
-
attr_accessor :title, :location, :calendar, :quickadd, :attendees, :description, :creator_name, :color_id, :guests_can_invite_others, :guests_can_see_other_guests
|
38
|
+
attr_accessor :title, :location, :calendar, :quickadd, :attendees, :description, :creator_name, :color_id, :guests_can_invite_others, :guests_can_see_other_guests, :send_notifications, :new_event_with_id_specified
|
38
39
|
|
39
40
|
#
|
40
41
|
# Create a new event, and optionally set it's attributes.
|
@@ -60,9 +61,10 @@ module Google
|
|
60
61
|
# event.extendedProperties = {'shared' => {'custom_str' => 'some custom string'}}
|
61
62
|
# event.guests_can_invite_others = false
|
62
63
|
# event.guests_can_see_other_guests = false
|
64
|
+
# event.send_notifications = true
|
63
65
|
#
|
64
66
|
def initialize(params = {})
|
65
|
-
[:id, :status, :raw, :html_link, :title, :location, :calendar, :quickadd, :attendees, :description, :reminders, :recurrence, :start_time, :end_time, :color_id, :extended_properties, :guests_can_invite_others, :guests_can_see_other_guests].each do |attribute|
|
67
|
+
[:id, :status, :raw, :html_link, :title, :location, :calendar, :quickadd, :attendees, :description, :reminders, :recurrence, :start_time, :end_time, :color_id, :extended_properties, :guests_can_invite_others, :guests_can_see_other_guests, :send_notifications].each do |attribute|
|
66
68
|
instance_variable_set("@#{attribute}", params[attribute])
|
67
69
|
end
|
68
70
|
|
@@ -70,6 +72,7 @@ module Google
|
|
70
72
|
self.transparency = params[:transparency]
|
71
73
|
self.all_day = params[:all_day] if params[:all_day]
|
72
74
|
self.creator_name = params[:creator]['displayName'] if params[:creator]
|
75
|
+
self.new_event_with_id_specified = !!params[:new_event_with_id_specified]
|
73
76
|
end
|
74
77
|
|
75
78
|
#
|
@@ -259,30 +262,28 @@ module Google
|
|
259
262
|
# Google JSON representation of an event object.
|
260
263
|
#
|
261
264
|
def to_json
|
262
|
-
|
263
265
|
attributes = {
|
264
266
|
"summary" => title,
|
265
267
|
"visibility" => visibility,
|
266
268
|
"transparency" => transparency,
|
267
269
|
"description" => description,
|
268
270
|
"location" => location,
|
269
|
-
"start" =>
|
270
|
-
|
271
|
-
},
|
272
|
-
"end" => {
|
273
|
-
"dateTime" => end_time
|
274
|
-
},
|
271
|
+
"start" => time_or_all_day(start_time),
|
272
|
+
"end" => time_or_all_day(end_time),
|
275
273
|
"reminders" => reminders_attributes,
|
276
274
|
"guestsCanInviteOthers" => guests_can_invite_others,
|
277
275
|
"guestsCanSeeOtherGuests" => guests_can_see_other_guests
|
278
276
|
}
|
279
277
|
|
278
|
+
if id
|
279
|
+
attributes["id"] = id
|
280
|
+
end
|
281
|
+
|
280
282
|
if timezone_needed?
|
281
283
|
attributes['start'].merge!(local_timezone_attributes)
|
282
284
|
attributes['end'].merge!(local_timezone_attributes)
|
283
285
|
end
|
284
286
|
|
285
|
-
|
286
287
|
attributes.merge!(recurrence_attributes)
|
287
288
|
attributes.merge!(color_attributes)
|
288
289
|
attributes.merge!(attendees_attributes)
|
@@ -442,7 +443,31 @@ module Google
|
|
442
443
|
# Returns true if this a new event.
|
443
444
|
#
|
444
445
|
def new_event?
|
445
|
-
id == nil || id == ''
|
446
|
+
new_event_with_id_specified? || id == nil || id == ''
|
447
|
+
end
|
448
|
+
|
449
|
+
#
|
450
|
+
# Returns true if notifications were requested to be sent
|
451
|
+
#
|
452
|
+
def send_notifications?
|
453
|
+
!!send_notifications
|
454
|
+
end
|
455
|
+
|
456
|
+
|
457
|
+
private
|
458
|
+
|
459
|
+
def new_event_with_id_specified?
|
460
|
+
!!new_event_with_id_specified
|
461
|
+
end
|
462
|
+
|
463
|
+
def time_or_all_day(time)
|
464
|
+
time = Time.parse(time) if time.is_a? String
|
465
|
+
|
466
|
+
if all_day?
|
467
|
+
{ "date" => time.strftime("%Y-%m-%d") }
|
468
|
+
else
|
469
|
+
{ "dateTime" => time.xmlschema }
|
470
|
+
end
|
446
471
|
end
|
447
472
|
|
448
473
|
protected
|
@@ -529,7 +554,11 @@ module Google
|
|
529
554
|
# Validates id format
|
530
555
|
#
|
531
556
|
def self.parse_id(id)
|
532
|
-
|
557
|
+
if id.to_s =~ /\A[a-v0-9]{5,1024}\Z/
|
558
|
+
id
|
559
|
+
else
|
560
|
+
raise ArgumentError, "Event ID is invalid. Please check Google documentation: https://developers.google.com/google-apps/calendar/v3/reference/events/insert"
|
561
|
+
end
|
533
562
|
end
|
534
563
|
|
535
564
|
#
|
data/test/helper.rb
CHANGED
@@ -8,13 +8,13 @@ class TestGoogleCalendar < Minitest::Test
|
|
8
8
|
setup do
|
9
9
|
@client_mock = setup_mock_client
|
10
10
|
|
11
|
-
@client_id =
|
12
|
-
@client_secret =
|
13
|
-
@refresh_token =
|
14
|
-
@calendar_id =
|
15
|
-
@access_token = '
|
11
|
+
@client_id = ENV['CLIENT_ID']
|
12
|
+
@client_secret = ENV['CLIENT_SECRET']
|
13
|
+
@refresh_token = ENV['REFRESH_TOKEN']
|
14
|
+
@calendar_id = ENV['CALENDAR_ID']
|
15
|
+
@access_token = ENV['ACCESS_TOKEN']
|
16
16
|
|
17
|
-
@calendar = Calendar.new(:client_id => @client_id, :client_secret => @client_secret, :redirect_url =>
|
17
|
+
@calendar = Calendar.new(:client_id => @client_id, :client_secret => @client_secret, :redirect_url => ENV['REDIRECT_URL'], :refresh_token => @refresh_token, :calendar => @calendar_id)
|
18
18
|
|
19
19
|
end
|
20
20
|
|
@@ -279,6 +279,45 @@ class TestGoogleCalendar < Minitest::Test
|
|
279
279
|
end # Connected context
|
280
280
|
|
281
281
|
context "Event instance methods" do
|
282
|
+
context "#id=" do
|
283
|
+
should "retain a passed-in id" do
|
284
|
+
event = Event.new
|
285
|
+
event.id = '8os94knodtv84h0jh4pqq4ut35'
|
286
|
+
assert_equal event.id, '8os94knodtv84h0jh4pqq4ut35'
|
287
|
+
end
|
288
|
+
should "work with a passed-in NIL id" do
|
289
|
+
event = Event.new
|
290
|
+
event.id = nil
|
291
|
+
assert_equal event.id, nil
|
292
|
+
end
|
293
|
+
should "raise an error with an invalid ID" do
|
294
|
+
event = Event.new
|
295
|
+
assert_raises(ArgumentError) do
|
296
|
+
event.id = 'ZZZZ' # too short, invalid characters
|
297
|
+
end
|
298
|
+
end
|
299
|
+
end
|
300
|
+
|
301
|
+
context "send_notifications" do
|
302
|
+
should "work when initialized with true" do
|
303
|
+
event = Event.new(:send_notifications => true)
|
304
|
+
assert event.send_notifications?
|
305
|
+
end
|
306
|
+
|
307
|
+
should "work when initialized with false" do
|
308
|
+
event = Event.new(:send_notifications => false)
|
309
|
+
refute event.send_notifications?
|
310
|
+
end
|
311
|
+
|
312
|
+
should "be dynamic" do
|
313
|
+
event = Event.new
|
314
|
+
event.send_notifications = false
|
315
|
+
refute event.send_notifications?
|
316
|
+
event.send_notifications = true
|
317
|
+
assert event.send_notifications?
|
318
|
+
end
|
319
|
+
end
|
320
|
+
|
282
321
|
context "#all_day?" do
|
283
322
|
context "when the event is marked as All Day in google calendar" do
|
284
323
|
should "be true" do
|
@@ -344,7 +383,12 @@ class TestGoogleCalendar < Minitest::Test
|
|
344
383
|
end
|
345
384
|
|
346
385
|
context "event json" do
|
347
|
-
should "
|
386
|
+
should "include ID key when ID specified" do
|
387
|
+
@event = Event.new(id: "nfej9pqigzneknf8llso0iehlv")
|
388
|
+
assert_equal JSON.parse(@event.to_json)["id"], "nfej9pqigzneknf8llso0iehlv"
|
389
|
+
end
|
390
|
+
|
391
|
+
should "be correct format without ID specified" do
|
348
392
|
now = Time.now
|
349
393
|
@event = Event.new
|
350
394
|
@event.start_time = now
|
@@ -381,6 +425,13 @@ class TestGoogleCalendar < Minitest::Test
|
|
381
425
|
}
|
382
426
|
assert_equal JSON.parse(@event.to_json), expected_structure
|
383
427
|
end
|
428
|
+
|
429
|
+
should "return date instead of dateTime for all-day event" do
|
430
|
+
@event = Event.new(all_day: "2016-10-15")
|
431
|
+
json = JSON.parse(@event.to_json)
|
432
|
+
assert_equal json['start']['date'], "2016-10-15"
|
433
|
+
assert_equal json['end']['date'], "2016-10-16"
|
434
|
+
end
|
384
435
|
end
|
385
436
|
|
386
437
|
context "reminders" do
|
@@ -425,7 +476,7 @@ class TestGoogleCalendar < Minitest::Test
|
|
425
476
|
require 'timezone_parser'
|
426
477
|
expected_structure = {
|
427
478
|
"summary" => "Go Swimming",
|
428
|
-
"visibility"=>"default",
|
479
|
+
"visibility"=>"default",
|
429
480
|
"transparency"=>"opaque",
|
430
481
|
"description" => "The polar bear plunge",
|
431
482
|
"location" => "In the arctic ocean",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google_calendar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Zich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: signet
|
@@ -184,6 +184,20 @@ dependencies:
|
|
184
184
|
- - "~>"
|
185
185
|
- !ruby/object:Gem::Version
|
186
186
|
version: '4.1'
|
187
|
+
- !ruby/object:Gem::Dependency
|
188
|
+
name: dotenv
|
189
|
+
requirement: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - "~>"
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: '2.1'
|
194
|
+
type: :development
|
195
|
+
prerelease: false
|
196
|
+
version_requirements: !ruby/object:Gem::Requirement
|
197
|
+
requirements:
|
198
|
+
- - "~>"
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: '2.1'
|
187
201
|
description: A minimal wrapper around the google calendar API
|
188
202
|
email: steve.zich@gmail.com
|
189
203
|
executables: []
|
@@ -193,6 +207,8 @@ extra_rdoc_files:
|
|
193
207
|
- README.rdoc
|
194
208
|
files:
|
195
209
|
- ".document"
|
210
|
+
- ".env.default"
|
211
|
+
- ".env.test"
|
196
212
|
- ".gitignore"
|
197
213
|
- ".travis.yml"
|
198
214
|
- Gemfile
|
@@ -253,7 +269,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
253
269
|
version: '0'
|
254
270
|
requirements: []
|
255
271
|
rubyforge_project:
|
256
|
-
rubygems_version: 2.
|
272
|
+
rubygems_version: 2.6.10
|
257
273
|
signing_key:
|
258
274
|
specification_version: 4
|
259
275
|
summary: A lightweight Google Calendar API wrapper
|