Sha256: 7c497d2d7d6f6b79e50ff87fa199d274131109c1b904849fcdaf97b629f18a25

Contents?: true

Size: 1.47 KB

Versions: 6

Compression:

Stored size: 1.47 KB

Contents

# -*- encoding: utf-8 -*-
$LOAD_PATH.unshift File.expand_path('lib', __dir__)

require 'rake/clean'
require 'bundler/gem_tasks'

begin
  require 'yard'
  # options are defined in .yardopts
  YARD::Rake::YardocTask.new

  task :doc => :yard
rescue LoadError => e
  warn "#{e.path} is not available"
end

begin
  require 'asciidoctor-doctest'
  require 'asciidoctor-latex'
  require 'rake/testtask'

  namespace :doctest do
    Rake::TestTask.new(:latex) do |t|
      t.description = 'Run integration tests for LaTeX output.'
      t.pattern = 'test/latex_test.rb'
      t.libs << 'test'
    end

    Rake::TestTask.new(:html) do |t|
      t.description = 'Run integration tests for HTML output.'
      t.pattern = 'test/html_test.rb'
      t.libs << 'test'
    end
  end

  task :doctest => [ 'doctest:latex', 'doctest:html' ]
  task :test    => :doctest
  task :default => :test

  namespace :generate do

    DocTest::GeneratorTask.new(:latex) do |t|
      t.converter_opts[:backend_name] = :latex
      t.output_suite = DocTest::Latex::ExamplesSuite.new(examples_path: 'test/examples/tex')
      t.examples_path.unshift 'test/examples/adoc'  # extra input examples
    end

    DocTest::GeneratorTask.new(:html) do |t|
      t.converter_opts[:backend_name] = :html
      t.output_suite = DocTest::HTML::ExamplesSuite.new(examples_path: 'test/examples/html')
      t.examples_path = ['test/examples/asciidoc-html']  # input examples
    end
  end
rescue LoadError => e
  warn "#{e.path} is not available"
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
asciidoctor-latex-1.5.0.11.dev Rakefile
asciidoctor-latex-1.5.0.10.dev Rakefile
asciidoctor-latex-1.5.0.9.dev Rakefile
asciidoctor-latex-1.5.0.8b.dev Rakefile
asciidoctor-latex-1.5.0.7.dev Rakefile
asciidoctor-latex-1.5.0.5.dev Rakefile