Sha256: 5b96e4aa262399e82bd6141b1fa802e099a8e258f46bcb56571f7c4b16791301
Contents?: true
Size: 829 Bytes
Versions: 3
Compression:
Stored size: 829 Bytes
Contents
namespace :open_conference_ware do namespace :snippets do desc "Load initial snippets of text. Use FORCE environmental variable to avoid prompt if these are already present." task :reload => ["environment"] do replace = false perform = true if OpenConferenceWare::Snippet.count > 0 and not ENV["FORCE"] replace = true print "?? WARNING: Reset snippets back to defaults? (y/N) " STDOUT.flush response = STDIN.readline unless response.strip.match(/y/i) puts "** Not resetting snippets back to defaults" perform = false end end # TODO Merge snippets for Tickets and Proposals apps #IK# Rake::Task["snippets:load"].invoke if perform OpenConferenceWare::Snippet.reload_from_fixtures! if perform end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
open_conference_ware-1.0.0.pre4 | lib/tasks/snippets.rake |
open_conference_ware-1.0.0.pre3 | lib/tasks/snippets.rake |
open_conference_ware-1.0.0.pre2 | lib/tasks/snippets.rake |