Skip to content

Instantly share code, notes, and snippets.

@stopthink
Created April 19, 2010 20:04
Show Gist options
  • Select an option

  • Save stopthink/371522 to your computer and use it in GitHub Desktop.

Select an option

Save stopthink/371522 to your computer and use it in GitHub Desktop.
# Load format-specific drivers in the following order:
$SourceParserImplementations = []
SourceParser::Upcoming
SourceParser::Ical
SourceParser::Hcal
@stopthink

Copy link
Copy Markdown
Author

for reference, I'm pulling code from http://github.com/calagator/calagator

I have cloned a copy of the Calagator project and am able to run it successfully on my machine. I've attempted to copy over just the components required for importing events, but clearly I've missed something, because it does not work in my project.

It appears that source_parser, and its siblings ical, upcoming, etc are classes.

source_parser.rb: http://github.com/calagator/calagator/blob/master/app/models/source_parser.rb

upcoming.rb: http://github.com/calagator/calagator/blob/master/app/models/source_parser/upcoming.rb

@nickstamas

Copy link
Copy Markdown

Try just moving source_parser.rb and the source_parser folder into the lib folder. The classes should then be included automatically by Rails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment