Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (28 sloc) 0.905 kB
module LicenseFinder
module Persistence
class Configuration
attr_accessor :whitelist, :ignore_groups, :dependencies_dir
def initialize(config={})
if File.exists?(config_file_path)
yaml = File.read(config_file_path)
config = YAML.load(yaml).merge config
end
@whitelist = config['whitelist'] || []
@ignore_groups = (config["ignore_groups"] || []).map(&:to_sym)
@dependencies_dir = config['dependencies_file_dir'] || '.'
end
def config_file_path
File.join('.', 'config', 'license_finder.yml')
end
def dependencies_yaml
File.join(dependencies_dir, "dependencies.yml")
end
def dependencies_text
File.join(dependencies_dir, "dependencies.txt")
end
def dependencies_html
File.join(dependencies_dir, "dependencies.html")
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.