Sha256: 2199ba59d007210745bb0c1acf2ae1ce142508645491a36980a16cab04391987

Contents?: true

Size: 467 Bytes

Versions: 4

Compression:

Stored size: 467 Bytes

Contents

require 'yaml'
require 'hashie'

module Elb
  class Settings
    def aws_path
      path = ENV['TEST'] ? "spec/fixtures/aws.yml" : "#{br_path}/aws.yml"
      path = ENV['AWS'] if ENV['AWS']
      path
    end

    def br_path
      self.class.br_path
    end

    def self.br_path
      ENV['BR_PATH'] || "#{ENV['HOME']}/.br"
    end

    def self.setup_br_path
      FileUtils.mkdir(br_path) unless File.exist?(br_path)
    end
  end
end

Elb::Settings.setup_br_path

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
elb-0.0.7 lib/elb/settings.rb
elb-0.0.6 lib/elb/settings.rb
elb-0.0.5 lib/elb/settings.rb
elb-0.0.4 lib/elb/settings.rb