-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathRakefile
39 lines (29 loc) · 827 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
require 'vanilla'
desc "Open an irb session preloaded with this library"
task :console do
sh "irb -rvanilla"
end
task :clean do
# TODO: get the database name from Soup
FileUtils.rm "soup.db" if File.exist?("soup.db")
end
def load_snips(kind)
Dir[File.join(File.dirname(__FILE__), 'vanilla', kind, '*.rb')].each do |f|
load f
end
end
task :bootstrap do
Soup.prepare
require File.join(File.dirname(__FILE__), *%w[vanilla snip_helper])
Dynasnip.persist_all!
load_snips('snips')
load File.join(File.dirname(__FILE__), *%w[vanilla test_snips.rb])
puts "The soup is simmering. Loaded #{Soup.tuple_class.count} tuples"
end
require 'spec'
require 'spec/rake/spectask'
Spec::Rake::SpecTask.new do |t|
t.spec_opts = %w(--format specdoc --colour)
t.libs = ["spec"]
end
task :default => :spec