-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRakefile
58 lines (45 loc) · 919 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# frozen_string_literal: true
require 'rake/testtask'
task :default do
puts `rake -T`
end
desc 'run tests'
Rake::TestTask.new(:spec) do |t|
t.pattern = 'spec/*_spec.rb'
t.warning = false
end
desc 'rerun tests'
task :respec do
sh "rerun -c 'rake spec' --ignore 'coverage/*'"
end
namespace :run do
task :dev do
sh 'rerun -c "rackup -p 9090"'
end
task :test do
sh 'RACK_ENV=test rerun -c "rackup -p 9000"'
end
end
task :console do
sh 'pry -r ./spec/test_load_all'
end
desc 'delete cassette fixtures'
task :rmvcr do
sh 'rm spec/fixtures/cassettes/*.yml' do |ok, _|
puts(ok ? 'Cassettes deleted' : 'No cassettes found')
end
end
namespace :quality do
CODE = '**/*.rb'
desc 'run all quality checks'
task all: %i[rubocop reek flog]
task :rubocop do
sh "rubocop #{CODE}"
end
task :reek do
sh "reek #{CODE}"
end
task :flog do
sh "flog #{CODE}"
end
end