summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2010-03-31 22:17:06 +0000
committermurphy <murphy@rubychan.de>2010-03-31 22:17:06 +0000
commit862bc9aa6b002f6b29cf74f93ca66e63cf370819 (patch)
tree45e8a8731fadca8df5fe86595dc2e8f6dc7a3782 /Rakefile
parentcce5dad0dce285a2b7c4f1fe0ec79d10c71a8403 (diff)
downloadcoderay-862bc9aa6b002f6b29cf74f93ca66e63cf370819.tar.gz
Upporting changes from 0.9.2 (vs. 0.9.1).
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile93
1 files changed, 29 insertions, 64 deletions
diff --git a/Rakefile b/Rakefile
index 93fcd29..b238cb1 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,71 +1,36 @@
$: << File.dirname(__FILE__) unless $:.include? '.'
-require 'rake_helpers/ftp.rb'
-
-verbose false
+require 'rake/rdoctask'
ROOT = '.'
LIB_ROOT = File.join ROOT, 'lib'
-RUBY = ENV.fetch 'ruby', 'ruby'
-
-EXTRA_FILES = %w(lib/README FOLDERS)
-def EXTRA_FILES.in folder
- map do |file_name|
- File.join folder, file_name
- end
-end
+EXTRA_RDOC_FILES = %w(lib/README FOLDERS)
task :default => :test
-task :upload => %w( gem:upload doc:upload example:upload )
-
-def ruby command
- params =
- if RUBY == 'rbx'
- '-I/usr/local/lib/ruby/1.8'
- else
- '-w'
- end
- cmd = "#{RUBY} #{params} #{command}"
- puts cmd if verbose
- system cmd
-end
-
-task '19' do
- RUBY.replace 'ruby19'
-end
-
-task '18' do
- RUBY.replace 'ruby18'
-end
-
-task '187' do
- RUBY.replace 'ruby187'
-end
-
-task 'jruby' do
- RUBY.replace 'jruby'
-end
-task :j => :jruby
-
-task 'jruby19' do
- RUBY.replace 'jruby --1.9'
-end
-task :j19 => :jruby19
-
-task 'jruby-nailgun' do
- RUBY.replace 'jruby --ng'
-end
-task :jng => :'jruby-nailgun'
-
-task 'rubinius' do
- RUBY.replace 'rbx'
-end
-
-task 'ee' do
- RUBY.replace 'rubyee'
-end
-
-for task_file in Dir['rake_tasks/*.rake']
- load task_file
-end
-
+if File.directory? 'rake_tasks'
+
+ # load rake tasks from subfolder
+ for task_file in Dir['rake_tasks/*.rake'].sort
+ load task_file
+ end
+
+else
+
+ # fallback tasks when rake_tasks folder is not present
+ desc 'Run CodeRay tests (basic)'
+ task :test do
+ ruby './test/functional/suite.rb'
+ ruby './test/functional/for_redcloth.rb'
+ end
+
+ desc 'Generate documentation for CodeRay'
+ Rake::RDocTask.new :doc do |rd|
+ rd.title = 'CodeRay Documentation'
+ rd.main = 'lib/README'
+ rd.rdoc_files.add Dir['lib']
+ rd.rdoc_files.add 'lib/README'
+ rd.rdoc_files.add 'FOLDERS'
+ rd.rdoc_dir = 'doc'
+ end
+
+end \ No newline at end of file