Sha256: c040bd5a8d1192e827309ee151066039b4b91e377a128f57567135a86dd7b220

Contents?: true

Size: 758 Bytes

Versions: 2

Compression:

Stored size: 758 Bytes

Contents

require 'tty/prompt'
require 'colorize'

module Dockerun
  module Cli
    class Run
      #include TR::ArgUtils
      include DSL

      def start(root)
        set_exec_root(root)
        begin
          pmt.puts " Dockerun version #{Dockerun::VERSION}".yellow
          pmt.puts " Operational : Run Spec"
          load_spec
        rescue TTY::Reader::InputInterrupt
        end
      end


      private
      def load_spec
        selSpec = CliEngine.select_spec(exec_root)
        pmt.puts " Loading spec '#{selSpec}"
        cont = File.read(selSpec)
        self.instance_eval(cont)
        go if not is_go_done?
      end

      def pmt
        if @_pmt.nil?
          @_pmt = TTY::Prompt.new
        end
        @_pmt
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dockerun-0.4.2 lib/dockerun/cli/run.rb
dockerun-0.4.1 lib/dockerun/cli/run.rb