This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# = Icebox : Caching for HTTParty | |
# | |
# Cache responses in HTTParty models [http://github.com/jnunemaker/httparty] | |
# | |
# === Usage | |
# | |
# class Foo | |
# include HTTParty | |
# include HTTParty::Icebox | |
# cache :store => 'file', :timeout => 600, :location => MY_APP_ROOT.join('tmp', 'cache') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run like so: (also see: http://blog.jayfields.com/2006/10/rake-tasks-with-parameters.html for tutorial on rake tasks, arguments etc.) | |
# | |
# with defaults: | |
# $ rake import_blogger_xml["db/blog_seed/blog-04-08-2011.xml"] # e.g. "db/blog_seed/blog-04-08-2011.xml | |
desc "Import Blogger xml into Blog Kit tables" | |
task :import_blogger_xml, :file_path, :needs => :environment do |t, args| | |
blog_kit_comment_array = [] | |
BlogKit.instance.settings['akismet_key'] = nil # this is to turn off spam filtering because of throttling | |
# This will be the default blog poster user, in our case Party is our user model and Employee inherits from Party... |