Sha256: 6f4197456631221042dd8a615df08332d413c7418a3c7dc0e87b7fb5c58d18ba

Contents?: true

Size: 382 Bytes

Versions: 8

Compression:

Stored size: 382 Bytes

Contents

require 'fileutils'
require 'erb'
require 'open3'
require 'json'

module Kontena
  module Machine
    module Vagrant
      module Common

        def erb(template, vars)
          ERB.new(template).result(OpenStruct.new(vars).instance_eval { binding })
        end

        def run_command(cmd)
          exit $?.exitstatus unless system(cmd)
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
krates-plugin-vagrant-0.3.6 lib/kontena/machine/vagrant/common.rb
krates-plugin-vagrant-0.3.5 lib/kontena/machine/vagrant/common.rb
krates-plugin-vagrant-0.3.4 lib/kontena/machine/vagrant/common.rb
krates-plugin-vagrant-0.3.3 lib/kontena/machine/vagrant/common.rb
krates-plugin-vagrant-0.3.2 lib/kontena/machine/vagrant/common.rb
krates-plugin-vagrant-0.3.1 lib/kontena/machine/vagrant/common.rb
kontena-plugin-vagrant-0.3.1 lib/kontena/machine/vagrant/common.rb
kontena-plugin-vagrant-0.3.0 lib/kontena/machine/vagrant/common.rb