Rakefile in postgis_adapter-0.5.1 vs Rakefile in postgis_adapter-0.7.1

- old
+ new

@@ -32,13 +32,39 @@ end task :default => :spec require 'rake/rdoctask' Rake::RDocTask.new do |rdoc| - config = YAML.load(File.read('VERSION.yml')) - version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}" - + version = File.exist?('VERSION') ? File.read('VERSION').chomp : "" rdoc.rdoc_dir = 'rdoc' rdoc.title = "postgis_adapter #{version}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') +end + +# +# Reek & Roodi +# +begin + require 'reek/rake_task' + Reek::RakeTask.new do |t| + t.fail_on_error = true + t.verbose = false + t.source_files = 'lib/**/*.rb' + end +rescue LoadError + task :reek do + abort "Reek is not available. In order to run reek, you must: sudo gem install reek" + end +end + +begin + require 'roodi' + require 'roodi_task' + RoodiTask.new do |t| + t.verbose = false + end +rescue LoadError + task :roodi do + abort "Roodi is not available. In order to run roodi, you must: sudo gem install roodi" + end end