Sha256: 97ba18ceb8293a374dd3f65fb6a52052029dfac0080b770f6fa4cc2518bec72e

Contents?: true

Size: 477 Bytes

Versions: 8

Compression:

Stored size: 477 Bytes

Contents

require "thor"

module ContainersManager
  class Cli < Thor
    include Thor::Actions

    desc 'exec', 'Execute jobs to manage containers'
    def exec
      exception_rescue do
        Application.exec
      end
    end

    desc 'check', 'Output the configuration'
    def check
      exception_rescue do
        Application.check
      end
    end

    private

    def exception_rescue
      yield
    rescue Exception => e
      $stdout.puts(e.message)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
containers_manager-0.1.13 lib/containers_manager/cli.rb
containers_manager-0.1.12 lib/containers_manager/cli.rb
containers_manager-0.1.11 lib/containers_manager/cli.rb
containers_manager-0.1.10 lib/containers_manager/cli.rb
containers_manager-0.1.9 lib/containers_manager/cli.rb
containers_manager-0.1.8 lib/containers_manager/cli.rb
containers_manager-0.1.7 lib/containers_manager/cli.rb
containers_manager-0.1.6 lib/containers_manager/cli.rb