-
Notifications
You must be signed in to change notification settings - Fork 4
/
Rakefile
32 lines (25 loc) · 884 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
# 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 'rake'
Appsterdam::Application.load_tasks
namespace :test do
Rake::TestTask.new('lib') do |t|
t.test_files = FileList['test/lib/**/*_test.rb']
t.verbose = true
end
end
task :test do
Rake::Task['test:lib'].invoke
end
desc "Deletes the classified ads that are over 30 days old"
task :purge_outdated_classifieds => :environment do
Classified.purge_outdated!
end
desc 'Have cron index the Sphinx search indices'
task :cron => ['fs:index', 'purge_outdated_classifieds']
desc "Imports events from external data sources inlcuding past events"
task :import_events => :environment do
log = Logger.new(STDOUT)
Event.sync_events true, log
end