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.4.18 lib/power_stencil/command_processors/get.rb
power_stencil-0.4.17 lib/power_stencil/command_processors/get.rb
power_stencil-0.4.16 lib/power_stencil/command_processors/get.rb
power_stencil-0.4.15 lib/power_stencil/command_processors/get.rb
power_stencil-0.4.14 lib/power_stencil/command_processors/get.rb
power_stencil-0.4.13 lib/power_stencil/command_processors/get.rb
power_stencil-0.4.12 lib/power_stencil/command_processors/get.rb
power_stencil-0.4.11 lib/power_stencil/command_processors/get.rb
power_stencil-0.4.10 lib/power_stencil/command_processors/get.rb
power_stencil-0.4.9 lib/power_stencil/command_processors/get.rb
power_stencil-0.4.8 lib/power_stencil/command_processors/get.rb
power_stencil-0.4.7 lib/power_stencil/command_processors/get.rb
power_stencil-0.4.6 lib/power_stencil/command_processors/get.rb
power_stencil-0.4.5 lib/power_stencil/command_processors/get.rb
power_stencil-0.4.4 lib/power_stencil/command_processors/get.rb
power_stencil-0.4.3 lib/power_stencil/command_processors/get.rb
power_stencil-0.4.2 lib/power_stencil/command_processors/get.rb
power_stencil-0.4.1 lib/power_stencil/command_processors/get.rb
power_stencil-0.4.0 lib/power_stencil/command_processors/get.rb