Sha256: 088dff28a80a55be24d741c62218d2156b54d01b5e83f70d7d8179c29a958fc8

Contents?: true

Size: 959 Bytes

Versions: 33

Compression:

Stored size: 959 Bytes

Contents

module PowerStencil
  module Plugins

    module CommandLine

      attr_reader :plugin_command_line_modifier

      private

      def load_yaml_command_definition
        yaml_file = project.plugin_commands_line_definition_file name
        if File.exists? yaml_file and File.file? yaml_file and File.readable? yaml_file
          logger.info "Adding extra command line definition for '#{name}' plugin..."
          @plugin_command_line_modifier = project.yaml_file_to_hash yaml_file
          command_line_manager.contribute_to_definition @plugin_command_line_modifier, layer_name: "Plugin: #{name}"
          capabilities[:command_line] = true
        else
          logger.debug "There is no extra command line definition provided by plugin '#{name}'."
        end
      rescue => e
        logger.debug PowerStencil::Error.report_error(e)
        logger.warn "Could not load yaml file '#{yaml_file}' because '#{e.message}'"
      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/command_line.rb
power_stencil-0.4.21 lib/power_stencil/plugins/command_line.rb
power_stencil-0.4.20 lib/power_stencil/plugins/command_line.rb
power_stencil-0.4.19 lib/power_stencil/plugins/command_line.rb
power_stencil-0.4.18 lib/power_stencil/plugins/command_line.rb
power_stencil-0.4.17 lib/power_stencil/plugins/command_line.rb
power_stencil-0.4.16 lib/power_stencil/plugins/command_line.rb
power_stencil-0.4.15 lib/power_stencil/plugins/command_line.rb
power_stencil-0.4.14 lib/power_stencil/plugins/command_line.rb
power_stencil-0.4.13 lib/power_stencil/plugins/command_line.rb
power_stencil-0.4.12 lib/power_stencil/plugins/command_line.rb
power_stencil-0.4.11 lib/power_stencil/plugins/command_line.rb
power_stencil-0.4.10 lib/power_stencil/plugins/command_line.rb
power_stencil-0.4.9 lib/power_stencil/plugins/command_line.rb
power_stencil-0.4.8 lib/power_stencil/plugins/command_line.rb
power_stencil-0.4.7 lib/power_stencil/plugins/command_line.rb
power_stencil-0.4.6 lib/power_stencil/plugins/command_line.rb
power_stencil-0.4.5 lib/power_stencil/plugins/command_line.rb
power_stencil-0.4.4 lib/power_stencil/plugins/command_line.rb
power_stencil-0.4.3 lib/power_stencil/plugins/command_line.rb