Sha256: ffc955e474bdcb37bc2ada2dc28310c3615b30cfffca79421b76d81121a83c58

Contents?: true

Size: 585 Bytes

Versions: 1

Compression:

Stored size: 585 Bytes

Contents

require 'fileutils'

# This is a simple class that puts options from a config file
# into an accessible object
module Ogre
  # ogre home
  OGRE_HOME = "#{ENV['HOME']}/.ogre"
  # config path
  CONFIG_PATH = "#{OGRE_HOME}/config.json"
  # default chef policy repo
  REPO_URL = 'https://github.com/activenetwork-automation/code_generator'

  # Static method to make config parameters available
  class Config
    # Read in defaults from config file
    def self.options
      (JSON.parse(File.read(CONFIG_PATH), symbolize_names: true) if File.exist?(CONFIG_PATH)) || {}
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ogre-0.1.5 lib/ogre/config.rb