northworld/google_calendar — pull request #22 by wstrinz (2013-09-29 14:10:09+00:00)
Title: Reminders

Added the ability to set reminders for events. You can either use the regular event initializer

@event = Event.new :start_time => "2012-03-31", :end_time => "2012-04-03", :reminders => [minutes: 6, method: "sms"]

or add it as part of a block

event = cal.create_event do |e|
e.title = 'Some Event'
e.start_time = Time.now + (60 * 10)
e.end_time = Time.now + (60 * 60) # seconds * min
e.reminders << {method: 'email', minutes: '4'}
e.reminders << {method: 'alert', hours: '8'}
end

It'd be nice to pack this into a reminder class and make things a little more idiomatic, so you could say

e.reminder do
r.method = "email"
r.minutes = 10
end

But it works well enough as is. I added a few tests for reminders too.