Sha256: eba22a363fb296a693f069a33e6f1068f6bcf8eac166a4268bab91ee7e3c0e00

Contents?: true

Size: 1.39 KB

Versions: 33

Compression:

Stored size: 1.39 KB

Contents

require 'power_stencil/plugins/dependencies'
require 'power_stencil/plugins/config'
require 'power_stencil/plugins/command_line'
require 'power_stencil/plugins/templates'
require 'power_stencil/plugins/require'
require 'power_stencil/plugins/capabilities'
require 'power_stencil/plugins/gem'

module PowerStencil

  module Plugins

    class Base

      extend PowerStencil::Plugins::Gem

      include Climatic::Proxy
      include PowerStencil::Plugins::Dependencies
      include PowerStencil::Plugins::Config
      include PowerStencil::Plugins::CommandLine
      include PowerStencil::Plugins::Require
      include PowerStencil::Plugins::Capabilities
      include PowerStencil::Plugins::Templates

      attr_reader :name, :version, :entry_point_path

      def initialize(name, project)
        @name = name
        @project = project
        @version = PowerStencil::Utils::SemanticVersion.new '0.0.0-not-specified'
        logger.debug "Loading plugin '#{name}'..."
        setup_plugin
        logger.info "Plugin '#{name}' successfully available"
        logger.debug "Plugin '#{name}' has following capabilities: #{capabilities.inspect}"
      end

      def path
        project.project_plugin_path(name)
      end

      private

      attr_reader :project

      def setup_plugin
        require_entry_point
        load_plugin_specific_config
        load_yaml_command_definition
      end

    end

  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
power_stencil-0.4.22 lib/power_stencil/plugins/base.rb
power_stencil-0.4.21 lib/power_stencil/plugins/base.rb
power_stencil-0.4.20 lib/power_stencil/plugins/base.rb
power_stencil-0.4.19 lib/power_stencil/plugins/base.rb
power_stencil-0.4.18 lib/power_stencil/plugins/base.rb
power_stencil-0.4.17 lib/power_stencil/plugins/base.rb
power_stencil-0.4.16 lib/power_stencil/plugins/base.rb
power_stencil-0.4.15 lib/power_stencil/plugins/base.rb
power_stencil-0.4.14 lib/power_stencil/plugins/base.rb
power_stencil-0.4.13 lib/power_stencil/plugins/base.rb
power_stencil-0.4.12 lib/power_stencil/plugins/base.rb
power_stencil-0.4.11 lib/power_stencil/plugins/base.rb
power_stencil-0.4.10 lib/power_stencil/plugins/base.rb
power_stencil-0.4.9 lib/power_stencil/plugins/base.rb
power_stencil-0.4.8 lib/power_stencil/plugins/base.rb
power_stencil-0.4.7 lib/power_stencil/plugins/base.rb
power_stencil-0.4.6 lib/power_stencil/plugins/base.rb
power_stencil-0.4.5 lib/power_stencil/plugins/base.rb
power_stencil-0.4.4 lib/power_stencil/plugins/base.rb
power_stencil-0.4.3 lib/power_stencil/plugins/base.rb