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.6.3 lib/power_stencil/command_processors/shell.rb
power_stencil-0.6.2 lib/power_stencil/command_processors/shell.rb
power_stencil-0.6.1 lib/power_stencil/command_processors/shell.rb
power_stencil-0.6.0 lib/power_stencil/command_processors/shell.rb
power_stencil-0.5.1 lib/power_stencil/command_processors/shell.rb
power_stencil-0.5.0 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.22 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.21 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.20 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.19 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.18 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.17 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.16 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.15 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.14 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.13 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.12 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.11 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.10 lib/power_stencil/command_processors/shell.rb
power_stencil-0.4.9 lib/power_stencil/command_processors/shell.rb