Sha256: 77ce02da4ab69ab50b5d6e300dffc1850cc903574340e403534b9932d87f76e7

Contents?: true

Size: 1.17 KB

Versions: 33

Compression:

Stored size: 1.17 KB

Contents

require '<%= plugin_name %>/version'
require '<%= plugin_name %>/plugin_helper'
require '<%= plugin_name %>/<%= plugin_name %>_processor'

module <%= plugin_module_name %>

  extend PowerStencil::Utils::SecureRequire
  extend <%= plugin_module_name %>::PluginHelper

  REQUIRED_PLUGINS = []

  def self.setup_processors
    clm = PowerStencil.command_line_manager
    clm.register_processor clm.command_by_alias('<%= main_entry_point %>'), <%= plugin_module_name %>::Processor.new
  end

  def self.setup_entity_definitions
    PowerStencil.logger.info 'Setting up <%= main_entry_point %> plugin entities'
    securely_require '<%= plugin_name %>/entity_definitions/<%= plugin_name %>_entity', fail_on_error: true
  end

  def self.setup_plugin_templates
    Dir.entries(plugin_templates_path).reject { |e| %w(. ..).include? e }.each do |entry|
      template_path = File.join(plugin_templates_path, entry)
      if Dir.exist? template_path
        PowerStencil.project.register_template_path_for_type entry.to_sym, template_path
      end
    end
  end

end

# All plugins have to be in the PowerStencil::Plugin namespace !
PowerStencil::Plugin::<%= plugin_module_name %> = <%= plugin_module_name %>

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
power_stencil-0.4.22 etc/templates/plugin_definition/lib/{entity}.rb.erb
power_stencil-0.4.21 etc/templates/plugin_definition/lib/{entity}.rb.erb
power_stencil-0.4.20 etc/templates/plugin_definition/lib/{entity}.rb.erb
power_stencil-0.4.19 etc/templates/plugin_definition/lib/{entity}.rb.erb
power_stencil-0.4.18 etc/templates/plugin_definition/lib/{entity}.rb.erb
power_stencil-0.4.17 etc/templates/plugin_definition/lib/{entity}.rb.erb
power_stencil-0.4.16 etc/templates/plugin_definition/lib/{entity}.rb.erb
power_stencil-0.4.15 etc/templates/plugin_definition/lib/{entity}.rb.erb
power_stencil-0.4.14 etc/templates/plugin_definition/lib/{entity}.rb.erb
power_stencil-0.4.13 etc/templates/plugin_definition/lib/{entity}.rb.erb
power_stencil-0.4.12 etc/templates/plugin_definition/lib/{entity}.rb.erb
power_stencil-0.4.11 etc/templates/plugin_definition/lib/{entity}.rb.erb
power_stencil-0.4.10 etc/templates/plugin_definition/lib/{entity}.rb.erb
power_stencil-0.4.9 etc/templates/plugin_definition/lib/{entity}.rb.erb
power_stencil-0.4.8 etc/templates/plugin_definition/lib/{entity}.rb.erb
power_stencil-0.4.7 etc/templates/plugin_definition/lib/{entity}.rb.erb
power_stencil-0.4.6 etc/templates/plugin_definition/lib/{entity}.rb.erb
power_stencil-0.4.5 etc/templates/plugin_definition/lib/{entity}.rb.erb
power_stencil-0.4.4 etc/templates/plugin_definition/lib/{entity}.rb.erb
power_stencil-0.4.3 etc/templates/plugin_definition/lib/{entity}.rb.erb