require 'rubygems' require 'bundler/setup' Bundler.require(:default, :test) begin Jeweler::Tasks.new do |gem| gem.name = "walruz" gem.summary = %Q{Walruz is a gem that provides an easy yet powerful way to implement authorization policies in a system, relying on the composition of simple policies to create more complex ones.} gem.description = %Q{ Walruz provides an easy to use DSL to do composition of basic authorization policies to create more complex ones, and then register this composed policies on actions performed to the model begin accessed } gem.email = "roman@noomi.com" gem.homepage = "http://github.com/noomii/walruz" gem.authors = ["Roman Gonzalez"] gem.rubyforge_project = "walruz" gem.has_rdoc = 'yard' gem.add_development_dependency("rspec") gem.add_development_dependency("yard") # gem is a Gem::Specification... # see http://www.rubygems.org/read/chapter/20 for additional settings end Jeweler::GemcutterTasks.new rescue LoadError puts "Jeweler not available. Install it with: sudo gem \ install technicalpickles-jeweler -s http://gems.github.com" end require 'spec/rake/spectask' Spec::Rake::SpecTask.new(:spec) do |spec| spec.libs << 'lib' << 'spec' spec.spec_files = FileList['spec/**/*_spec.rb'] spec.spec_opts = ['--options', "\"%s/spec/spec.opts\"" % File.dirname(__FILE__)] end Spec::Rake::SpecTask.new(:rcov) do |spec| spec.libs << 'lib' << 'spec' spec.pattern = 'spec/**/*_spec.rb' spec.rcov = true end task :default => :spec require 'yard' YARD::Rake::YardocTask.new do |t| t.files = ['lib/**/*.rb'] end require 'rdoc/task' Rake::RDocTask.new do |rdoc| if File.exist?('VERSION.yml') config = YAML.load(File.read('VERSION.yml')) version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}" else version = "" end rdoc.rdoc_dir = 'rdoc' rdoc.title = "walruz #{version}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') end