Sha256: 6d346dcbbcb49394f78c56a26a57355ac884a1e6715d1266aa2b625135991dd7
Contents?: true
Size: 953 Bytes
Versions: 4
Compression:
Stored size: 953 Bytes
Contents
module SafePusher class Configuration attr_accessor :files_to_skip, :app_base_directory, :repo_url, :base_branch, :verbose, :services def initialize @verbose = application_config['verbose'] || true @base_branch = application_config['base_branch'] || 'master' @files_to_skip = application_config['files_to_skip'] || [] @app_base_directory = application_config['app_base_directory'] @repo_url = application_config['repo_url'] @services = load_services end private def load_services YAML .load_file('config/commands.yml') .reduce({}) { |o, (k, v)| o.update(k => v['default_client']) } .merge(application_config['services'] || {}) end def application_config return YAML.load_file('safe_pusher.yml') if File.exist?('safe_pusher.yml') {} end end end
Version data entries
4 entries across 4 versions & 1 rubygems