forked from jamesgolick/resource_controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
46 lines (39 loc) · 1.32 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
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
begin
require 'jeweler'
Jeweler::Tasks.new do |s|
s.name = "resource_controller"
s.summary = "Rails RESTful controller abstraction plugin."
s.email = "[email protected]"
s.homepage = "http://jamesgolick.com/resource_controller"
s.description = ""
s.authors = ["James Golick"]
s.files = FileList["[A-Z]*.*", "{bin,generators,lib,test,spec,rails}/**/*"]
end
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end
desc 'Generate documentation for the ResourceController plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = '../rdoc'
rdoc.title = 'ResourceController'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('../README.rdoc')
rdoc.rdoc_files.include('../lib/**/*.rb')
end
task :rc_test do
Dir.chdir('test')
load 'Rakefile'
Rake::Task['test'].execute
end
task :upload_docs => :rdoc do
puts 'Deleting previous rdoc'
`ssh jamesgolick.com 'rm -Rf /home/apps/jamesgolick.com/public/resource_controller/rdoc'`
puts "Uploading current rdoc"
`scp -r ../rdoc jamesgolick.com:/home/apps/jamesgolick.com/public/resource_controller`
puts "Deleting rdoc"
`rm -Rf ../rdoc`
end
task :default => :rc_test