Google iCalendar

Build Status Gem Version Test Coverage Maintainability

Google Calendar extension for iCalendar

Installation

Add this line to your application's Gemfile:

gem 'icalendar-gcal'

And then execute:

$ bundle

Or install it yourself as:

$ gem install icalendar-gcal

Usage

require "icalendar/gcal"

gcal = Icalendar::Google::Calendar.from_google_id("[email protected]")
# or
gcal = Icalendar::Google::Calendar.from_ical_url("https://calendar.google.com/calendar/ical/ht3jlfaac5lfd6263ulfh4tql8%40group.calendar.google.com/public/basic.ics")

gcal.google_id
# => "[email protected]"

gcal.webcal_url
# => "webcal://calendar.google.com/calendar/ical/ht3jlfaac5lfd6263ulfh4tql8%40group.calendar.google.com/public/basic.ics"

gcal.event_url(gcal.events.last)
# => "https://calendar.google.com/calendar/event?eid=bW9vbnBoYXNlKzE1MTY4MzI0MDAwMDAgaHQzamxmYWFjNWxmZDYyNjN1bGZoNHRxbDhAZw"

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/amancevice/icalendar-gcal.

License

The gem is available as open source under the terms of the MIT License.