Sha256: 1c4b7db4e83db4d5160a457d4f3a0a98d5524866cd87e4da4cbaa7600d6239de
Contents?: true
Size: 1.57 KB
Versions: 19
Compression:
Stored size: 1.57 KB
Contents
namespace :panda_pal do desc 'Cleans up old session data' task clean_sessions: :environment do PandaPal::Session.where('updated_at < ?', 1.week.ago).delete_all end namespace :org do desc "Interactively Create a new PandaPal::Organization" task :new, [:name] => :environment do |t, args| org = PandaPal::Organization.new(name: args[:name]) PandaPal::Organization.interactive_create!(org) rescue PandaPal::OrganizationConcerns::OrganizationBuilder::InteractiveSessionError => ex ex.print end desc "Interactively Update a PandaPal::Organization" task :edit, [:name] => :environment do |t, args| org = PandaPal::Organization.find_by!(name: args[:name]) org.interactive_update! rescue PandaPal::OrganizationConcerns::OrganizationBuilder::InteractiveSessionError => ex ex.print end desc "Install/update the LTI in Canvas for the given Organization" task :install, [:name, :host] => :environment do |t, args| org = PandaPal::Organization.find_by!(name: args[:name]) org.interactive_install!(host: args[:host], exists: :update) end desc "Reinstall the LTI in Canvas for the given Organization" task :reinstall, [:name, :host] => :environment do |t, args| org = PandaPal::Organization.find_by!(name: args[:name]) org.interactive_install!(host: args[:host], exists: :replace) end if Rails.env.development? desc "Creates a new PandaPal::Organization for development" task dev: :environment do PandaPal::Organization.development_create! end end end end
Version data entries
19 entries across 19 versions & 1 rubygems