forked from deivid-rodriguez/byebug
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
54 lines (44 loc) · 977 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
#
# Prepend DevKit into compilation phase
#
task compile: :devkit if RUBY_PLATFORM =~ /mingw/
require 'rake/extensiontask'
spec = Gem::Specification.load('byebug.gemspec')
Rake::ExtensionTask.new('byebug', spec) do |ext|
ext.lib_dir = 'lib/byebug'
end
require 'rake/testtask'
module Rake
#
# Overrides default rake tests loader
#
class TestTask
def rake_loader
'test/test_helper.rb'
end
end
end
desc 'Run the test suite'
task :test do
Rake::TestTask.new do |t|
t.verbose = true
t.warning = true
t.pattern = 'test/**/*_test.rb'
end
end
desc 'Activates DevKit'
task :devkit do
begin
require 'devkit'
rescue LoadError
abort "Failed to activate RubyInstaller's DevKit required for compilation."
end
end
require 'rubocop/rake_task'
desc 'Run RuboCop'
task :rubocop do
RuboCop::RakeTask.new
end
require_relative 'tasks/ccop.rb'
require_relative 'tasks/dev_utils.rb'
task default: [:compile, :test, :rubocop, :ccop]