Sha256: 533b44bd54dbf494a98d3a3763617821bd7323ca502dee5b11f954589a334ab7

Contents?: true

Size: 739 Bytes

Versions: 1

Compression:

Stored size: 739 Bytes

Contents

require 'fileutils'
require 'yaml'

module Jack
  class Config < Thor
    class Transmit
      include Util

      attr_reader :local_config_path
      def initialize(options={})
        @options = options
        @root = options[:root] || '.'
        @env_name = options[:env_name]
        @app_name = @options[:app] || app_name_convention(@env_name)

        @saved_configs = "#{@root}/.elasticbeanstalk/saved_configs"

        local_config_name = options[:cfg] || @env_name
        @local_config_path = "jack/cfg/#{local_config_name}.cfg.yml"
      end

      def timestamp
        Time.now.strftime "%Y-%m-%d_%H-%M-%S"
      end

      def extract_name(path)
        path.split('/').last.sub('.cfg.yml','')
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jack-eb-0.3.0 lib/jack/config/transmit.rb