-
Notifications
You must be signed in to change notification settings - Fork 6
/
Rakefile
44 lines (35 loc) · 899 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
#:nopkg:
ENV["RUBYLIB"] = "#{File.dirname(__FILE__)}/lib"
ENV["RUBYOPT"] = "-rubygems"
#:
require "git/webby"
def spec
@spec ||= Gem::Specification.load("git-webby.gemspec")
end
desc "Run tests"
task :test, [:file] do |spec, args|
Dir["test/#{args.file}*_test.rb"].each do |file|
sh "ruby #{file}"
end
end
desc "API Documentation (RDoc)"
task :doc do
sh "rdoc -o doc/api -H -f hanna -m README.rdoc"
end
desc "Build #{spec.file_name}"
task :build => "#{spec.name}.gemspec" do
sh "gem build #{spec.name}.gemspec"
end
desc "Release #{spec.file_name}"
task :release => :build do
sh "gem push #{spec.file_name}"
end
desc "Install gem file #{spec.file_name}"
task :install => :build do
sh "gem install -l #{spec.file_name}"
end
desc "Uninstall gem #{spec.name} v#{spec.version}"
task :uninstall do
sh "gem uninstall #{spec.name} -v #{spec.version}"
end
task :default => :test