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.2 lib/power_stencil/plugins/command_line.rb
power_stencil-0.4.1 lib/power_stencil/plugins/command_line.rb
power_stencil-0.4.0 lib/power_stencil/plugins/command_line.rb
power_stencil-0.3.9 lib/power_stencil/plugins/command_line.rb
power_stencil-0.3.8 lib/power_stencil/plugins/command_line.rb
power_stencil-0.3.7 lib/power_stencil/plugins/command_line.rb
power_stencil-0.3.6 lib/power_stencil/plugins/command_line.rb
power_stencil-0.3.5 lib/power_stencil/plugins/command_line.rb
power_stencil-0.3.4 lib/power_stencil/plugins/command_line.rb
power_stencil-0.3.3 lib/power_stencil/plugins/command_line.rb
power_stencil-0.3.2 lib/power_stencil/plugins/command_line.rb
power_stencil-0.3.1 lib/power_stencil/plugins/command_line.rb
power_stencil-0.3.0 lib/power_stencil/plugins/command_line.rb