forked from rouge-ruby/rouge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
34 lines (27 loc) · 680 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
require 'rake/clean'
require 'pathname'
task :spec do
spec_files = FileList.new(ENV['files'] || './spec/**/*_spec.rb')
switch_spec_files = spec_files.map { |x| "-r#{x}" }.join(' ')
sh "ruby -I./lib -r ./spec/spec_helper #{switch_spec_files} -e Minitest::Unit.autorun"
end
task :doc do
sh 'bundle exec yard'
end
namespace :doc do
task :server do
sh 'bundle exec yard server --reload'
end
task :clean do
sh 'rm -rf ./doc/ ./.yardoc/'
end
end
CLEAN.include('*.gem')
task :build => [:clean, :spec] do
puts
sh "gem build rouge.gemspec"
end
task :default => :spec
Dir.glob(Pathname.new(__FILE__).dirname.join('tasks/*.rake')).each do |f|
load f
end