Sha256: ea54cd13dab5a4570caf70701083fe7fbd69979260634b27c077c93b19c66fe9

Contents?: true

Size: 587 Bytes

Versions: 12

Compression:

Stored size: 587 Bytes

Contents

module Jack
  module Util
    def do_cmd(command, options={})
      UI.say "Running: #{command.colorize(:green)}" unless options[:silent]
      return command if options[:noop]
      out = `#{command}`
      UI.say out unless options[:silent]
    end

    def app_name_convention(env_name)
      env_name.split('-')[1] # convention
    end

    def eb
      region = ENV['AWS_REGION'] || 'us-east-1'
      @@eb ||= Aws::ElasticBeanstalk::Client.new(region: region)
    end

    def ensure_folder_exist(folder)
      FileUtils.mkdir_p(folder) unless File.exist?(folder)
    end

  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
jack-eb-0.1.6 lib/jack/util.rb
jack-eb-0.1.5 lib/jack/util.rb
jack-eb-0.1.4 lib/jack/util.rb
jack-eb-0.1.3 lib/jack/util.rb
jack-eb-0.1.2 lib/jack/util.rb
jack-eb-0.1.1 lib/jack/util.rb
jack-eb-0.1.0 lib/jack/util.rb
jack-eb-0.0.9 lib/jack/util.rb
jack-eb-0.0.8 lib/jack/util.rb
jack-eb-0.0.7 lib/jack/util.rb
jack-eb-0.0.6 lib/jack/util.rb
jack-eb-0.0.4 lib/jack/util.rb