/
Rakefile
36 lines (31 loc) · 870 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
require 'bundler/gem_tasks'
require 'rake/testtask'
Rake::TestTask.new(:test) do |t|
t.libs << 'test'
t.libs << 'lib'
t.test_files = FileList['test/**/*_test.rb']
end
namespace :build do
desc 'Build README pages'
task :readme do
project_dir_path = File.dirname(__FILE__ )
readme_dir_path = File.join(
project_dir_path,
'markdown',
'readme',
)
Dir.chdir(readme_dir_path) do
ruby_file_paths = Dir.glob('./**/*.rb')
ruby_file_paths.each do |ruby_file_path|
Dir.chdir(File.dirname(ruby_file_path)) do
ruby_file_name = File.basename(ruby_file_path)
command = "ruby #{ruby_file_name}"
system(command)
end
end
command = "markdown_helper include --pristine template.md ../../README.md"
system(command)
end
end
end
task :default => :test