-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
22 lines (19 loc) · 838 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'rake'
require 'rake/rdoctask'
require 'fileutils'
desc 'Generate documentation for the acts_as_pageless plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'EndlessPageless'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README')
rdoc.rdoc_files.include('lib/**/*.rb')
end
desc 'Removes/reverts the javascripts for the plugin.'
task :remove_scripts do
FileUtils.rm %{paginator.js}.collect { |f| "../../../public/javascripts/" + f }
if FileTest.exist? "../../../public/javascripts/prototype.bak"
FileUtils.cp File.dirname(__FILE__) + '/../../../public/javascripts/prototype.bak', File.dirname(__FILE__) + '/../../../public/javascripts/prototype.js'
FileUtils.rm %{prototype.bak}.collect { |f| "../../../public/javascripts/" + f }
end
end