Sha256: b65ffdf190448d5475ea6a8ba12d5ce2ff8888127267c2bd5fdece68bb243bac

Contents?: true

Size: 1.33 KB

Versions: 8

Compression:

Stored size: 1.33 KB

Contents

require 'bundler'
Bundler::GemHelper.install_tasks


require "namey/version"

require 'rspec/core'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
  spec.pattern = FileList['spec/**/*_spec.rb']
end

RSpec::Core::RakeTask.new(:rcov) do |spec|
  spec.pattern = 'spec/**/*_spec.rb'
  spec.rcov_opts = %w{--exclude .bundler,.rvm}
  spec.rcov = true
end

task :default => :spec



desc "Generate RDoc"
task :doc => ['doc:generate']


#
# YARD task from http://stackoverflow.com/questions/2138427/can-i-get-my-readme-textile-into-my-rdoc-with-proper-formatting
#
namespace :doc do
  project_root = File.expand_path(File.join(File.dirname(__FILE__)))
  doc_destination = File.join(project_root, 'doc')

  begin
    require 'yard'
    require 'yard/rake/yardoc_task'

    YARD::Rake::YardocTask.new(:generate) do |yt|
      yt.files   = Dir.glob(File.join(project_root, 'lib', '**', '*.rb'))
      #+ 
      #             [ File.join(project_root, 'README.markdown') ]
      yt.options = ['--output-dir', doc_destination, '--readme', 'README.markdown']
    end
  rescue LoadError
    desc "Generate YARD Documentation"
    task :generate do
      abort "Please install the YARD gem to generate rdoc."
    end
  end

  desc "Remove generated documenation"
  task :clean do
    rm_r doc_destination if File.exists?(doc_destination)
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
namey-0.0.13 Rakefile
namey-0.0.12 Rakefile
namey-0.0.10 Rakefile
namey-0.0.9 Rakefile
namey-0.0.8 Rakefile
namey-0.0.7 Rakefile
namey-0.0.6 Rakefile
namey-0.0.5 Rakefile