Sha256: 9af16547b9235af4b597df7f6b02bf0829ab29fbfea53e582acd4ba3b576aca1
Contents?: true
Size: 684 Bytes
Versions: 4
Compression:
Stored size: 684 Bytes
Contents
require 'yaml' require_relative '../helper/hash' module Gem module Release class Config class Files include Helper::Hash PATHS = %w( ./.gem_release/config.yml ./.gem_release.yml ~/.gem_release/config.yml ~/.gem_release.yml ) def load return {} unless path symbolize_keys(YAML.load_file(path) || {}) end private def path @path ||= paths.first end def paths paths = PATHS.map { |path| File.expand_path(path) } paths.select { |path| File.exist?(path) } end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems