Sha256: 953019b544a1df840c620a313532586eaec18d19609bb24c5ae7c5a606b474c7

Contents?: true

Size: 1.83 KB

Versions: 20

Compression:

Stored size: 1.83 KB

Contents

require 'puppet/util'
module Puppet::Util::RDoc
  module_function

  # launch a rdoc documentation process
  # with the files/dir passed in +files+
  def rdoc(outputdir, files, charset = nil)

    # then rdoc
    require 'rdoc/rdoc'
    require 'rdoc/options'

    # load our parser
    require 'puppet/util/rdoc/parser'

    r = RDoc::RDoc.new

    # specify our own format & where to output
    options = [ "--fmt", "puppet",
                "--quiet",
                "--exclude", "/modules/[^/]*/spec/.*$",
                "--exclude", "/modules/[^/]*/files/.*$",
                "--exclude", "/modules/[^/]*/tests/.*$",
                "--exclude", "/modules/[^/]*/templates/.*$",
                "--op", outputdir ]

    options << "--force-update"
    options += [ "--charset", charset] if charset
    # Rdoc root default is Dir.pwd, but the win32-dir gem monkey patches Dir.pwd
    # replacing Ruby's normal / with \.  When RDoc generates relative paths it
    # uses relative_path_from that will generate errors when the slashes don't
    # properly match.  This is a workaround for that issue.
    if Puppet.features.microsoft_windows? && RDoc::VERSION !~ /^[0-3]\./
      options += [ "--root", Dir.pwd.tr('\\', '/')]
    end
    options += files

    # launch the documentation process
    r.document(options)
  end

  # launch an output to console manifest doc
  def manifestdoc(files)
    raise _("RDOC SUPPORT FOR MANIFEST HAS BEEN REMOVED - See PUP-3638")
  end

  # Outputs to the console the documentation
  # of a manifest
  def output(file, ast)
    raise _("RDOC SUPPORT FOR MANIFEST HAS BEEN REMOVED - See PUP-3638")
  end

  def output_astnode_doc(ast)
    raise _("RDOC SUPPORT FOR MANIFEST HAS BEEN REMOVED - See PUP-3638")
  end

  def output_resource_doc(code)
    raise _("RDOC SUPPORT FOR MANIFEST HAS BEEN REMOVED - See PUP-3638")
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
puppet-5.5.22 lib/puppet/util/rdoc.rb
puppet-5.5.22-x86-mingw32 lib/puppet/util/rdoc.rb
puppet-5.5.22-x64-mingw32 lib/puppet/util/rdoc.rb
puppet-5.5.22-universal-darwin lib/puppet/util/rdoc.rb
puppet-5.5.21 lib/puppet/util/rdoc.rb
puppet-5.5.21-x86-mingw32 lib/puppet/util/rdoc.rb
puppet-5.5.21-x64-mingw32 lib/puppet/util/rdoc.rb
puppet-5.5.21-universal-darwin lib/puppet/util/rdoc.rb
puppet-5.5.20 lib/puppet/util/rdoc.rb
puppet-5.5.20-x86-mingw32 lib/puppet/util/rdoc.rb
puppet-5.5.20-x64-mingw32 lib/puppet/util/rdoc.rb
puppet-5.5.20-universal-darwin lib/puppet/util/rdoc.rb
puppet-5.5.19 lib/puppet/util/rdoc.rb
puppet-5.5.19-x86-mingw32 lib/puppet/util/rdoc.rb
puppet-5.5.19-x64-mingw32 lib/puppet/util/rdoc.rb
puppet-5.5.19-universal-darwin lib/puppet/util/rdoc.rb
puppet-5.5.18 lib/puppet/util/rdoc.rb
puppet-5.5.18-x86-mingw32 lib/puppet/util/rdoc.rb
puppet-5.5.18-x64-mingw32 lib/puppet/util/rdoc.rb
puppet-5.5.18-universal-darwin lib/puppet/util/rdoc.rb