Sha256: abdce294b5c5a9cdf5d6596d5ae7622037fd31a110f9f2218c399f8a963d07a2

Contents?: true

Size: 909 Bytes

Versions: 39

Compression:

Stored size: 909 Bytes

Contents

module PowerStencil
  module CommandProcessors

    class Shell

      include Climatic::Script::UnimplementedProcessor
      include Climatic::Proxy
      include PowerStencil::Project::Proxy

      def execute

        working_universe = if config[:compiled]
                             project.engine.root_universe.compile scenario: config[:scenario]
                           else
                             project.engine.root_universe

                           end

        context = project.engine.running_context working_universe

        require 'pry'

        Pry.hooks.add_hook(:before_session, "startup_message") do
          puts config[:shell_dsl][:session_greetings]
        end

        Pry.start context,
                  prompt: [proc { config[:shell_dsl][:prompt_level_1] }, proc { config[:shell_dsl][:prompt_level_2] }],
                  quiet: true

      end

    end

  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
power_stencil-0.4.8 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.7 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.6 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.5 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.4 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.3 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.2 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.1 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.0 lib/power_stencil/command_processors/shell.rb
power_stencil-0.3.9 lib/power_stencil/command_processors/shell.rb
power_stencil-0.3.8 lib/power_stencil/command_processors/shell.rb
power_stencil-0.3.7 lib/power_stencil/command_processors/shell.rb
power_stencil-0.3.6 lib/power_stencil/command_processors/shell.rb
power_stencil-0.3.5 lib/power_stencil/command_processors/shell.rb
power_stencil-0.3.4 lib/power_stencil/command_processors/shell.rb
power_stencil-0.3.3 lib/power_stencil/command_processors/shell.rb
power_stencil-0.3.2 lib/power_stencil/command_processors/shell.rb
power_stencil-0.3.1 lib/power_stencil/command_processors/shell.rb
power_stencil-0.3.0 lib/power_stencil/command_processors/shell.rb