Sha256: ffbcaf21962738011799d335dd7acfd1b2fb0074d4f7cee6e8fbae45cda4b85a

Contents?: true

Size: 809 Bytes

Versions: 1

Compression:

Stored size: 809 Bytes

Contents

# frozen_string_literal: true

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

SITE_DIR = File.expand_path(File.dirname(__FILE__) + '/../cucumber.github.com')
API_DIR = File.join(SITE_DIR, 'api', 'cucumber-rails', 'ruby', 'yardoc')

namespace :api do
  file :dir do
    raise "You need to git clone git@github.com:cucumber/cucumber.github.com.git #{SITE_DIR}" unless File.directory?(SITE_DIR)

    sh('git pull origin master')
    mkdir_p API_DIR
  end

  template_path = File.expand_path(File.join(File.dirname(__FILE__), 'yard'))
  YARD::Templates::Engine.register_template_path(template_path)
  YARD::Rake::YardocTask.new(:yard) do |yard|
    dir = API_DIR
    mkdir_p dir
    yard.options = ['--out', dir]
  end
  task yard: :dir

  desc "Generate YARD docs for Cucumber-Rails' API"
  task doc: :yard
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cucumber-rails-2.1.0 dev_tasks/yard.rake