(PDOC-3) Relocate plugin configuration
The plugin.rb file really only did configuration of components that were already loaded. By relocating to the strings.rb file, it provides a central place for all of the loading and configuration of the strings components.
This commit is contained in:
parent
14571c098d
commit
6d1d5b496d
|
@ -1,13 +1,23 @@
|
|||
require 'puppet'
|
||||
require 'puppetx'
|
||||
require 'puppet/pops'
|
||||
require 'puppet/util/docs'
|
||||
require 'yard'
|
||||
|
||||
# Nothing to see here except forward declarations.
|
||||
module Puppetx::PuppetLabs
|
||||
module Strings
|
||||
require 'puppet/pops'
|
||||
# This submodule contains bits that operate on the Pops module produced by
|
||||
# the Future parser.
|
||||
module Pops
|
||||
require 'puppetx/puppetlabs/strings/pops/yard_statement'
|
||||
require 'puppetx/puppetlabs/strings/pops/yard_transformer'
|
||||
end
|
||||
|
||||
# This submodule contains bits that interface with the YARD plugin system.
|
||||
module YARD
|
||||
require 'yard'
|
||||
require 'puppetx/puppetlabs/strings/yard/monkey_patches'
|
||||
require 'puppetx/puppetlabs/strings/yard/parser'
|
||||
|
||||
# This submodule contains code objects which are used to represent relevant
|
||||
# aspects of puppet code in YARD's Registry
|
||||
|
@ -21,20 +31,23 @@ module Puppetx::PuppetLabs
|
|||
# puppet code from the ASTs produced by the Ruby and Puppet parsers
|
||||
module Handlers
|
||||
# This utility library contains some tools for working with Puppet docstrings
|
||||
require 'puppet/util/docs'
|
||||
require 'puppetx/puppetlabs/strings/yard/handlers/base'
|
||||
require 'puppetx/puppetlabs/strings/yard/handlers/defined_type_handler'
|
||||
require 'puppetx/puppetlabs/strings/yard/handlers/host_class_handler'
|
||||
require 'puppetx/puppetlabs/strings/yard/handlers/puppet_3x_function_handler'
|
||||
require 'puppetx/puppetlabs/strings/yard/handlers/puppet_4x_function_handler'
|
||||
end
|
||||
end
|
||||
|
||||
# This submodule contains bits that operate on the Pops module produced by
|
||||
# the Future parser.
|
||||
module Pops
|
||||
require 'puppetx/puppetlabs/strings/pops/yard_statement'
|
||||
require 'puppetx/puppetlabs/strings/pops/yard_transformer'
|
||||
::YARD::Parser::SourceParser.register_parser_type(:puppet,
|
||||
Puppetx::PuppetLabs::Strings::YARD::PuppetParser,
|
||||
['pp'])
|
||||
::YARD::Handlers::Processor.register_handler_namespace(:puppet,
|
||||
Puppetx::PuppetLabs::Strings::YARD::Handlers)
|
||||
|
||||
# FIXME: Might not be the best idea to have the template code on the Ruby
|
||||
# LOAD_PATH as the contents of this directory really aren't library code.
|
||||
::YARD::Templates::Engine.register_template_path(
|
||||
File.join(File.dirname(__FILE__), 'strings', 'yard', 'templates'))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
require 'puppetx/puppetlabs/strings'
|
||||
require 'puppetx/puppetlabs/strings/yard/plugin'
|
||||
|
||||
class Puppetx::PuppetLabs::Strings::Actions
|
||||
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
require 'puppet'
|
||||
require 'puppetx/puppetlabs/strings/yard/monkey_patches'
|
||||
require 'puppetx/puppetlabs/strings/yard/parser'
|
||||
require 'puppetx/puppetlabs/strings'
|
||||
|
||||
YARD::Parser::SourceParser.register_parser_type(:puppet,
|
||||
Puppetx::PuppetLabs::Strings::YARD::PuppetParser,
|
||||
['pp'])
|
||||
YARD::Handlers::Processor.register_handler_namespace(:puppet,
|
||||
Puppetx::PuppetLabs::Strings::YARD::Handlers)
|
||||
|
||||
# FIXME: Might not be the best idea to have the template code on the Ruby
|
||||
# LOAD_PATH as the contents of this directory really aren't library code.
|
||||
YARD::Templates::Engine.register_template_path(File.join(
|
||||
File.dirname(__FILE__),
|
||||
'templates'))
|
Loading…
Reference in New Issue