Rakefile in clevic-0.8.0 vs Rakefile in clevic-0.11.1

- old
+ new

@@ -13,11 +13,11 @@ ui_file.gsub( /\.ui$/, '_ui.rb' ) end # list of .ui files UI_FILES = FileList.new( 'lib/clevic/ui/*.ui' ) -CLEAN.include( 'ChangeLog' ) +CLEAN.include( 'ChangeLog', 'coverage', 'profiling' ) CLOBBER.include( 'ChangeLog', 'pkg', 'lib/clevic/ui/*_ui.rb' ) UI_FILES.each do |ui_file| # make tasks to generate _ui.rb files file ui_rb_file( ui_file ) => [ ui_file ] do |t| @@ -55,16 +55,10 @@ task :run => :ui do |t| ARGV.shift() exec "ruby -Ilib bin/clevic #{ARGV.join(' ')}" end -desc "Runs Clevic in warning mode, with test databases and debug flag on" -task :sqlite => :ui do |t| - ARGV.shift() - exec "ruby -Ilib bin/clevic #{ARGV.join(' ')} times_sqlite_model.rb" -end - desc "Runs Clevic in debug mode, with test databases" task :debug => :ui do |t| ARGV.shift() exec "ruby -w -rdebug -Ilib bin/clevic -D #{ARGV.join(' ')}" end @@ -88,10 +82,11 @@ # generate irb contexts desc "irb with #{model_file}" namespace :irb do task short_model( model_file ) do |t| ARGV.shift() + ARGV.shift() if ARGV[0] == '--' ENV['RUBYLIB'] ||= '.' ENV['RUBYLIB'] += ":#{File.expand_path('.')}/lib" exec "irb -Ilib -rclevic -r#{model_file} -rclevic/db_options.rb" end end @@ -99,34 +94,50 @@ # generate runs namespace :run do desc "run clevic with #{model_file}" task short_model( model_file ) => :ui do |t| ARGV.shift() + ARGV.shift() if ARGV[0] == '--' + cmd = "ruby -Ilib bin/clevic -D #{model_file} #{ARGV.join(' ')}" + puts "cmd: #{cmd.inspect}" + exec cmd + end + end + + namespace :warn do + desc "run clevic with #{model_file} and warnings on" + task short_model( model_file ) => :ui do |t| + ARGV.shift() exec "ruby -w -Ilib bin/clevic -D #{model_file} #{ARGV.join(' ')}" end end end task :package => :ui -# redefine this from the Hoe-1.7.0 sources to use -# the jamis template. -Rake::RDocTask.new(:docs) do |rd| - rd.main = "README.txt" - rd.options << '-d' if RUBY_PLATFORM !~ /win32/ and `which dot` =~ /\/dot/ and not ENV['NODOT'] - rd.rdoc_dir = 'doc' - rd.template = 'config/jamis.rb' - files = $hoe.spec.files.grep($hoe.rdoc_pattern) - files -= ['Manifest.txt'] - rd.rdoc_files.push(*files) - - title = "#{$hoe.name}-#{$hoe.version} Documentation" - title = "#{$hoe.rubyforge_name}'s " + title if $hoe.rubyforge_name != $hoe.name - - rd.options << "-t #{title}" -end - desc "Update ChangeLog from the SVN log" task :changelog do |t| ARGV.shift exec "svn2cl --break-before-msg -o ChangeLog #{ARGV.join(' ')}" +end + +# remove hoe documentation task +Rake::Task['docs'].clear + +# make this respond to docs, so it fits in with the rest of the build +Rake::RDocTask.new do |rdoc| + rdoc.name = :docs + rdoc.title = "Clevic DB UI builder" + rdoc.main = 'README.txt' + rdoc.rdoc_dir = 'doc' + rdoc.rdoc_files.include %w{History.txt lib/**/*.rb README.txt TODO} + rdoc.options += [ + '-SHN', + '-f', 'darkfish', # This is the important bit + '-A', 'property=Property', + #~ '--quiet', + "--opname=index.html", + #~ "--line-numbers", + #~ '--format=darkfish', + #~ "--inline-source" + ] end