Sha256: df989f40266b3e3f5311004b2d3bad51cfde3a746654ba760aecb3d51afc8719

Contents?: true

Size: 1.18 KB

Versions: 24

Compression:

Stored size: 1.18 KB

Contents

require 'yard'
require 'yard/rake/yardoc_task'
require File.expand_path(File.dirname(__FILE__) + '/../lib/cucumber/platform')

DOC_DIR      = File.expand_path(File.dirname(__FILE__) + '/../doc')
SITE_DIR     = File.expand_path(File.dirname(__FILE__) + '/../../cucumber.github.com')
API_DIR      = File.join(SITE_DIR, 'api', 'cucumber', 'ruby', 'yardoc')
TEMPLATE_DIR = File.expand_path(File.join(File.dirname(__FILE__), 'yard'))
YARD::Templates::Engine.register_template_path(TEMPLATE_DIR)

namespace :api do
  YARD::Rake::YardocTask.new(:yard) do |yard|
    yard.options = ["--out", DOC_DIR]
  end

  task :sync_with_git do
    unless File.directory?(SITE_DIR)
      raise "You need to git clone git@github.com:cucumber/cucumber.github.com.git #{SITE_DIR}"
    end
    Dir.chdir(SITE_DIR) do
      sh 'git pull -u'
    end
  end

  task :copy_to_website do
    rm_rf API_DIR
    cp_r DOC_DIR, API_DIR
  end

  task :release do
    Dir.chdir(SITE_DIR) do
      sh 'git add .'
      sh "git commit -m 'Update API docs for Cucumber-Ruby v#{Cucumber::VERSION}'"
      sh 'git push'
    end
  end

  desc "Generate YARD docs for Cucumber's API"
  task :doc => [:yard, :sync_with_git, :copy_to_website, :release]
end

Version data entries

24 entries across 22 versions & 2 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/cucumber-1.3.18/gem_tasks/yard.rake
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/cucumber-1.3.16/gem_tasks/yard.rake
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/cucumber-1.3.18/gem_tasks/yard.rake
cucumber-1.3.20 gem_tasks/yard.rake
cucumber-1.3.19 gem_tasks/yard.rake
cucumber-1.3.18 gem_tasks/yard.rake
cucumber-1.3.17 gem_tasks/yard.rake
cucumber-1.3.16 gem_tasks/yard.rake
cucumber-1.3.15 gem_tasks/yard.rake
cucumber-1.3.14 gem_tasks/yard.rake
cucumber-1.3.13 gem_tasks/yard.rake
cucumber-1.3.12 gem_tasks/yard.rake
cucumber-1.3.11 gem_tasks/yard.rake
cucumber-1.3.10 gem_tasks/yard.rake
cucumber-1.3.9 gem_tasks/yard.rake
cucumber-1.3.8 gem_tasks/yard.rake
cucumber-1.3.7 gem_tasks/yard.rake
cucumber-1.3.6 gem_tasks/yard.rake
cucumber-1.3.5 gem_tasks/yard.rake
cucumber-1.3.4 gem_tasks/yard.rake