-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
37 lines (27 loc) · 858 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
require 'bundler/setup'
Bundler.require(:default)
# require './resque-example-app'
require 'resque/tasks'
task "resque:setup" do
ENV['QUEUE'] = '*'
end
namespace :db do
desc "Init any database repos that are not present"
task init_repos: :environment do
for p in Project.all.select { |p| !p.exists }
puts "Init'ing project '#{p.repo_remote_url}'"
p.init && p.save
puts "Done!"
end
end
desc "Cleans all repo data"
task clean_repos: :environment do
puts "Cleaning current repos..."
FileUtils.rm_rf Dir.glob("repos/*")
end
end
Gitscroll::Application.load_tasks