Sha256: 95e5337ebc10e33bcc9fefb6c989553983917f6840b22bd7339a8d16452d34dc

Contents?: true

Size: 498 Bytes

Versions: 11

Compression:

Stored size: 498 Bytes

Contents

namespace :marty do
  desc 'remove all loaded scripts from the database'
  task delete_scripts: :environment do
    Marty::Script.delete_scripts
  end

  desc 'load scripts from the LOAD_DIR directory'
  task load_scripts: :environment do
    Mcfly.whodunnit = Marty::User.find_by(
      login: Rails.configuration.marty.system_account
    )

    raise 'must have system user account seeded' unless Mcfly.whodunnit

    load_dir = ENV['LOAD_DIR']
    Marty::Script.load_scripts(load_dir)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
marty-14.3.0 lib/tasks/scripts_tasks.rake
marty-14.0.0 lib/tasks/scripts_tasks.rake
marty-13.0.2 lib/tasks/scripts_tasks.rake
marty-11.0.0 lib/tasks/scripts_tasks.rake
marty-10.0.3 lib/tasks/scripts_tasks.rake
marty-10.0.2 lib/tasks/scripts_tasks.rake
marty-10.0.0 lib/tasks/scripts_tasks.rake
marty-9.5.1 lib/tasks/scripts_tasks.rake
marty-9.5.0 lib/tasks/scripts_tasks.rake
marty-9.3.3 lib/tasks/scripts_tasks.rake
marty-9.3.2 lib/tasks/scripts_tasks.rake