public
Description: Rails RESTful controller abstraction plugin.
Homepage: http://jamesgolick.com/resource_controller
Clone URL: git://github.com/giraffesoft/resource_controller.git
Click here to lend your support to: resource_controller and make a donation at www.pledgie.com !
resource_controller / Rakefile
100644 51 lines (43 sloc) 1.455 kb
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
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 = "james@giraffesoft.ca"
    s.homepage = "http://jamesgolick.com/resource_controller"
    s.description = ""
    s.authors = ["James Golick"]
    file_list = FileList.new("[A-Z]*.*", "{bin,generators,lib,test,spec,rails}/**/*") do |f|
      f.exclude(/\.sqlite3/)
      f.exclude(/\.log/)
    end
    s.files = file_list
  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