forked from glejeune/Ruby-Graphviz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
70 lines (57 loc) · 1.36 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
63
64
65
66
67
68
69
70
$:.unshift( "lib" )
require "graphviz/constants"
require 'rubygems'
require 'rake/clean'
require 'bundler'
require 'rubygems/package_task'
require 'rake/testtask'
require 'fileutils'
require 'open-uri'
require 'yard'
include FileUtils
CLEAN.include ['**/.*.sw?', '*.gem', '.config', 'test/test.log']
desc "Packages up Ruby/GraphViz."
task :default => [:test, :package]
task :package => [:clean]
task :doc => :yard
YARD::Rake::YardocTask.new do |t|
end
Rake::TestTask.new(:test) do |t|
t.libs << 'lib' << 'test'
t.verbose = true
require 'graphviz/utils'
include GraphViz::Utils
test_files = FileList['test/test_*.rb']
test_files.exclude("test/test_examples.rb") unless find_executable("dot", nil)
p test_files
t.test_files = test_files
end
desc "Generate man pages"
task :man do
unless RUBY_PLATFORM == 'java'
require 'ronn'
chdir 'man' do
sh "ronn -r *.ronn"
end
else
puts "Can't generate man pages with JRuby"
end
end
namespace :changelog do
desc "Update CHANGELOG"
task :update do
require "github_changelog_generator"
GitHubChangelogGenerator::ChangelogGenerator.new.run
end
end
Bundler::GemHelper.install_tasks
namespace :contributors do
desc "Install all-contributors-cli"
task :install do
sh "npm install --save-dev all-contributors-cli"
end
desc "Run"
task :run do
sh "npx all-contributors"
end
end