forked from documentcloud/jammit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
40 lines (32 loc) · 856 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
require 'rake/testtask'
desc 'Run all tests'
task :test do
$LOAD_PATH.unshift(File.expand_path('test'))
require 'redgreen' if Gem.available?('redgreen')
require 'test/unit'
Dir.chdir('test')
Dir['./**/test_*.rb'].each {|test| require test }
end
desc 'Generate YARD Documentation'
task :doc do
sh "mv README TEMPME"
sh "rm -rf doc"
sh "yardoc"
sh "mv TEMPME README"
end
desc "Deploy the Github Page"
task :deploy do
sh "git co gh-pages && git merge master && git push github gh-pages && git co master"
end
namespace :gem do
desc 'Build and install the jammit gem'
task :install do
sh "gem build jammit.gemspec"
sh "sudo gem install #{Dir['*.gem'].join(' ')} --local --no-ri --no-rdoc"
end
desc 'Uninstall the jammit gem'
task :uninstall do
sh "sudo gem uninstall -x jammit"
end
end
task :default => :test