-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRakefile
42 lines (35 loc) · 869 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
38
39
40
41
42
ROOT = File.expand_path(File.join(File.dirname(__FILE__)))
begin
# Require the preresolved locked set of gems.
require File.expand_path(ROOT + '/.bundle/environment', __FILE__)
rescue LoadError
# Fallback on doing the resolve at runtime.
require "rubygems"
require "bundler"
Bundler.setup
end
Bundler.require('test')
require 'spec/rake/spectask'
require ROOT + '/tasks/redis.tasks'
if !defined?(Spec)
puts "spec targets require RSpec"
else
desc "Run all examples"
Spec::Rake::SpecTask.new('spec') do |t|
t.spec_files = FileList['spec/**/*.rb']
t.spec_opts = ['-cfs']
end
end
desc 'Run the scrapper and email new findings'
task :run do
AutomateAT::go
end
namespace :gems do
desc 'Bundle required gems'
task :bundle do
system "gem install bundler"
system "gem bundle"
end
end
task :default => :test
task :test => :spec