Rakefile in rawler-0.1.0 vs Rakefile in rawler-0.1.1

- old
+ new

@@ -1,35 +1,69 @@ -# -*- ruby -*- +# encoding: utf-8 require 'rubygems' -require 'hoe' +require 'bundler' +require 'fileutils' -# require 'bundler' -# Bundler::GemHelper.install_tasks +begin + Bundler.setup(:default, :development) +rescue Bundler::BundlerError => e + $stderr.puts e.message + $stderr.puts "Run `bundle install` to install missing gems" + exit e.status_code +end +require 'rake' -require 'rspec/core/rake_task' -RSpec::Core::RakeTask.new(:test) +require 'jeweler' +Jeweler::Tasks.new do |gem| + # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options + gem.name = "rawler" + gem.homepage = "http://github.com/oscardelben/rawler" + gem.license = "MIT" + gem.summary = %Q{Rawler is a tool that crawls the links of your website} + gem.description = %Q{Rawler is a tool that crawls the links of your website} + gem.email = "info@oscardelben.com" + gem.authors = ["Oscar Del Ben"] + gem.executables = ['rawler'] + # dependencies defined in Gemfile +end +Jeweler::RubygemsDotOrgTasks.new -# Hoe.plugin :compiler -# Hoe.plugin :gem_prelude_sucks -# Hoe.plugin :inline -# Hoe.plugin :racc -# Hoe.plugin :rubyforge +require 'rake/testtask' +Rake::TestTask.new(:test) do |test| + test.libs << 'lib' << 'test' + test.pattern = 'test/**/test_*.rb' + test.verbose = true +end -Hoe.spec 'rawler' do - # HEY! If you fill these out in ~/.hoe_template/Rakefile.erb then - # you'll never have to touch them again! - # (delete this comment too, of course) +require 'rcov/rcovtask' +Rcov::RcovTask.new do |test| + test.libs << 'test' + test.pattern = 'test/**/test_*.rb' + test.verbose = true + test.rcov_opts << '--exclude "gems/*"' +end - developer('Oscar Del Ben', 'info@oscardelben.com') +task :default => :test - self.rubyforge_name = 'oscardelben' - - extra_deps << ['nokogiri'] -end +require 'rake/rdoctask' +Rake::RDocTask.new do |rdoc| + version = File.exist?('VERSION') ? File.read('VERSION') : "" -desc 'Console' -task :console do - exec 'irb -rubygems -I lib -r rawler.rb' + rdoc.rdoc_dir = 'rdoc' + rdoc.title = "rawler #{version}" + rdoc.rdoc_files.include('README*') + rdoc.rdoc_files.include('lib/**/*.rb') end -# vim: syntax=ruby +desc 'generate docs' +task :rocco do + #%x!rm -r html/*! + + Dir.chdir "lib" + + files = Dir['**/*.*'] + + files.each do |file| + %x!rocco #{file} -o ../html! + end +end