-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
49 lines (40 loc) · 1.19 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env rake
require File.expand_path('../config/application', __FILE__)
FeedEngine::Application.load_tasks
namespace :sanitation do
desc "Check line lengths & whitespace with Cane"
task :lines do
puts ""
puts "== using cane to check line length =="
system("cane --no-abc --style-glob 'app/**/*.rb' --no-doc")
puts "== done checking line length =="
puts ""
end
desc "Check method length with Reek"
task :methods do
puts ""
puts "== using reek to check method length =="
system("reek -n app/**/*.rb 2>&1 | grep -v ' 0 warnings'")
puts "== done checking method length =="
puts ""
end
desc "Check both line length and method length"
task :all => [:lines, :methods]
end
# Resque tasks
require 'resque/tasks'
require 'resque_scheduler/tasks'
task "resque:setup" => :environment do
require 'resque'
require 'resque_scheduler'
require 'resque/scheduler'
# Resque.redis = 'localhost:6379'
schedule = YAML.load_file("#{Rails.root}/config/resque_schedule.yml")
# puts schedule
Resque.schedule = schedule
# require 'tasks'
end
task "resque:check_twitter" => :environment do
require 'resque'
Resque.enqueue(CheckTwitterResponses)
end