-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
36 lines (30 loc) · 817 Bytes
/
Rakefile
File metadata and controls
36 lines (30 loc) · 817 Bytes
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
Dir['lib/tasks/*.rake'].each { |rake| load rake }
require 'bundler'
Bundler::GemHelper.install_tasks
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
task test: :spec
begin
require 'rubocop/rake_task'
RuboCop::RakeTask.new
rescue LoadError
desc 'Run RuboCop'
task :rubocop do
$stderr.puts 'Rubocop is disabled'
end
end
task default: [:spec, :rubocop]
task :reset do
if File.exist?('rm spec/dummy_app/config/initializers/ascent.rb')
puts 'Removing Ascent initalizer file'
sh 'rm spec/dummy_app/config/initializers/ascent.rb'
end
Dir.entries('spec/dummy_app/db/migrate').each do |f|
if f.include?('create_ascent_')
puts "Removing file #{f}"
sh "rm spec/dummy_app/db/migrate/#{f}"
end
end
sh 'gem uninstall ascent'
puts 'Finsihed resetting'
end