IcsValidator
Validate iCalendar content, using http://icalvalid.cloudapp.net/. If this gem reports a failed validation, your best bet is to manually re-validate your content via the website for more actionable feedback.
Used by http://pvdtechevents.com/ to validate its generated feed.
Installation
Add this line to your application's Gemfile:
gem 'ics_validator'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ics_validator
Usage
# validate an online feed by URL
IcsValidator.valid_feed?("http://example.com/valid_feed.ics") # => true
IcsValidator.valid_feed?("http://example.com/invalid_feed.ics") # => false
# validate a String snippet of iCalendar content
IcsValidator.valid_snippet?("BEGIN:VCALENDAR...")
# validate an iCalendar file
IcsValidator.valid_file?("path/to/local/feed.ics")
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request