-
Notifications
You must be signed in to change notification settings - Fork 3
/
Rakefile
34 lines (27 loc) · 829 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
Dir.glob("tasks/*.rake").each { |r| import r }
task "test:generate_fixtures" do
FileUtils.mkdir_p "tmp"
FileUtils.mkdir_p "spec/fixtures"
Dir.chdir "tmp" do
sh "curl -L -O https://raw.githubusercontent.com/comperiosearch/booktownDemo/master/booktown.sql"
end
sh "dropdb booktown || true"
sh "psql -f tmp/booktown.sql"
sh "psql booktown -c 'alter schema public rename to booktown'"
sh "pg_dump --no-owner booktown > spec/fixtures/booktown.sql"
end
task "test:prepare_db" do
sh "createdb simple-sql-test 2>&1 > /dev/null || true"
end
task default: "test:prepare_db" do
sh "rspec"
sh "rubocop -D"
end
desc 'release a new development gem version'
task :release do
sh 'scripts/release.rb'
end
desc 'release a new stable gem version'
task 'release:stable' do
sh 'BRANCH=stable scripts/release.rb'
end