Sha256: 983067d23e924bae0bada8fba4e50701b2e7286f017b0108bc889c963ab89d38
Contents?: true
Size: 798 Bytes
Versions: 5
Compression:
Stored size: 798 Bytes
Contents
require 'yaml' require 'ablerc' module Capistrano module Tampon module Configuration extend self CONFIG_FILE_NAME = '.tamponrc' GLOBAL_CONFIG_FILE = "#{Dir.home}/#{CONFIG_FILE_NAME}" PROJECT_CONFIG_FILE = "#{Dir.pwd}/#{CONFIG_FILE_NAME}" attr_reader :_config @_ablerc def ablerc Ablerc end def load!(filename, options={}) @_ablerc ||= Ablerc.load! Tampon.root end def method_missing(name, *args, &block) Ablerc.config.send(name.to_sym) || fail(NoMethodError, "unknown configuration root #{name}", caller) end def user_settings? File.exists? GLOBAL_CONFIG_FILE end def project_settings? File.exists? PROJECT_CONFIG_FILE end end end end
Version data entries
5 entries across 5 versions & 1 rubygems