-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathRakefile
76 lines (62 loc) · 1.75 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
71
72
73
74
75
76
lib_path = File.expand_path(File.join(File.dirname(__FILE__), 'lib'))
$LOAD_PATH.unshift(lib_path) unless $LOAD_PATH.include?(lib_path)
# Rake provides FileUtils and its own FileUtils extensions
require 'rake'
require 'rake/clean'
CLEAN.include('.*~')
CLOBBER.include('ydoc',
'rdoc',
'.yardoc',
'*.gem')
task :default => [:v]
# Generate documentation.
require 'rdoc/task'
RDoc::Task.new do |rdoc|
rdoc.rdoc_files.include('README.rdoc',
'LICENCE.rdoc',
'CHANGELOG.rdoc',
'lib/**/*',
'bin/**/*'
)
rdoc.rdoc_dir = 'rdoc'
end
require 'yard'
YARD::Rake::YardocTask.new do |ydoc|
ydoc.options += ['-o', 'ydoc']
ydoc.name = 'ydoc'
end
# Testing.
require 'rake/testtask'
Rake::TestTask.new do |t|
t.libs << 'test'
t.warning
t.ruby_opts = ['-rubygems']
t.test_files = FileList['test/*.rb']
end
desc 'Open an irb session preloaded with this library.'
task :console do
sh 'irb -rubygems -I lib -r tree_tagger/tagger'
end
desc 'Show the current version.'
task :v do
load 'tree_tagger/version.rb'
puts TreeTagger::VERSION
end
desc 'Document the code using Yard and RDoc.'
task :doc => [:clobber, :rdoc, :ydoc]
desc 'Release the library.'
task :release => [:tag, :build, :publish] do
end
desc 'Tag the current source code version.'
task :tag do
puts 'Tagging the version.'
end
desc 'Builds the .gem package.'
task :build do
puts 'Building the package.'
end
desc 'Publish the documentation on the homepage.'
task :publish => [:clobber, :doc] do
destination = 'arbox@bu.chsta.be:/var/www/sites/bu.chsta.be/htdocs/shared/projects/treetagger-ruby'
system "scp -r ydoc/* #{destination}"
end