Sha256: 4399349cea7991669efb942d5483b537ee0afbfdbf833873f34e35a1796fd1de

Contents?: true

Size: 908 Bytes

Versions: 59

Compression:

Stored size: 908 Bytes

Contents

module PowerStencil
  module CommandProcessors

    class Get

      include Climatic::Script::UnimplementedProcessor
      include Climatic::Proxy
      include PowerStencil::Project::Proxy
      include PowerStencil::CommandProcessors::EntityHelper
      include PowerStencil::Utils::Graphviz

      def execute
        targets = targets_from_criteria analyse_extra_params, project.engine.root_universe
        if config[:graph] || config[:'graph-file']
          filename = graph_entities targets, config[:'graph-file']
          msg = "Graphviz graph saved into '#{filename}'."
          logger.info msg
          puts msg
          if config[:graphviz][:viewer]
            cmd = config[:graphviz][:viewer] % [filename]
            `#{cmd}`
          end
        else
          targets.sort{|a, b| a.as_path <=> b.as_path}.each {|target| display_entity target }
        end
      end
    end

  end

end

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
power_stencil-0.10.0 lib/power_stencil/command_processors/get.rb
power_stencil-0.9.8 lib/power_stencil/command_processors/get.rb
power_stencil-0.9.7 lib/power_stencil/command_processors/get.rb
power_stencil-0.9.6 lib/power_stencil/command_processors/get.rb
power_stencil-0.9.5 lib/power_stencil/command_processors/get.rb
power_stencil-0.9.4 lib/power_stencil/command_processors/get.rb
power_stencil-0.9.3 lib/power_stencil/command_processors/get.rb
power_stencil-0.9.2 lib/power_stencil/command_processors/get.rb
power_stencil-0.9.1 lib/power_stencil/command_processors/get.rb
power_stencil-0.9.0 lib/power_stencil/command_processors/get.rb
power_stencil-0.8.14 lib/power_stencil/command_processors/get.rb
power_stencil-0.8.13 lib/power_stencil/command_processors/get.rb
power_stencil-0.8.12 lib/power_stencil/command_processors/get.rb
power_stencil-0.8.11 lib/power_stencil/command_processors/get.rb
power_stencil-0.8.10 lib/power_stencil/command_processors/get.rb
power_stencil-0.8.9 lib/power_stencil/command_processors/get.rb
power_stencil-0.8.8 lib/power_stencil/command_processors/get.rb
power_stencil-0.8.7 lib/power_stencil/command_processors/get.rb
power_stencil-0.8.6 lib/power_stencil/command_processors/get.rb
power_stencil-0.8.5 lib/power_stencil/command_processors/get.rb