forked from deivid-rodriguez/byebug
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
62 lines (51 loc) · 1.08 KB
/
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
59
60
61
62
#
# For the `release` task
#
require 'bundler/gem_tasks'
#
# Prepend DevKit into compilation phase
#
if Gem.win_platform?
desc 'Activates DevKit'
task :devkit do
begin
require 'devkit'
rescue LoadError
abort 'Failed to load DevKit required for compilation'
end
end
task compile: :devkit
end
#
# For the `compile` task
#
require 'rake/extensiontask'
spec = Gem::Specification.load('byebug.gemspec')
Rake::ExtensionTask.new('byebug', spec) { |ext| ext.lib_dir = 'lib/byebug' }
#
# Test task
#
desc 'Runs the test suite'
task :test do
require_relative 'script/minitest_runner'
exit 1 unless MinitestRunner.new.run
end
desc 'Run overcommit hooks manually'
task :overcommit do
exit 1 unless system('bundle exec overcommit --run')
end
desc 'Sign overcommit hooks'
task :sign_hooks do
system('bundle exec overcommit --sign')
system('bundle exec overcommit --sign pre-commit')
end
task default: %i(compile test overcommit)
#
# Custom tasks for development
#
require_relative 'tasks/dev_utils.rb'
#
# Generate docs
#
require 'yard'
YARD::Rake::YardocTask.new