require 'rubygems' require 'rake' require 'yaml' begin require 'jeweler' Jeweler::Tasks.new do |gem| gem.name = "flannel" gem.summary = %Q{A soft comfortable worn in markup language for Ruby} gem.description = %Q{Flannel is a markup language that is not intended for your web app. It's for your local use, to write a blog entry in your text editor or a number of other uses.} gem.email = "jamal.hansen@gmail.com" gem.homepage = "http://github.com/rubyyot/flannel" gem.authors = ["Jamal Hansen"] gem.rubyforge_project = "flannel" gem.add_dependency 'treetop' gem.add_dependency 'polyglot' gem.add_development_dependency 'shoulda' gem.add_development_dependency 'mocha' # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings end rescue LoadError puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler" end require 'rake/testtask' Rake::TestTask.new(:test) do |test| test.libs << 'lib' << 'test' test.pattern = 'test/**/*_test.rb' test.verbose = true end begin require 'rcov/rcovtask' Rcov::RcovTask.new do |test| test.libs << 'test' test.pattern = 'test/**/*_test.rb' test.verbose = true end rescue LoadError task :rcov do abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov" end end begin require 'cucumber/rake/task' Cucumber::Rake::Task.new(:features) rescue LoadError task :features do abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber" end end task :default => :test require 'rake/rdoctask' 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 = "flannel #{version}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') end