lib/license_finder/configuration.rb in license_finder-1.0.1 vs lib/license_finder/configuration.rb in license_finder-1.1.0
- old
+ new
@@ -26,18 +26,19 @@
result = new(config)
result.artifacts.init
result
end
- attr_accessor :whitelist, :ignore_groups, :ignore_dependencies, :artifacts, :project_name
+ attr_accessor :whitelist, :ignore_groups, :ignore_dependencies, :artifacts, :project_name, :gradle_command
def initialize(config)
@whitelist = Array(config['whitelist'])
@ignore_groups = Array(config["ignore_groups"])
@ignore_dependencies = Array(config["ignore_dependencies"])
@artifacts = Artifacts.new(Pathname(config['dependencies_file_dir'] || './doc/'))
@project_name = config['project_name'] || determine_project_name
+ @gradle_command = config['gradle_command'] || 'gradle'
end
def save
Persistence.set(to_hash)
end
@@ -48,11 +49,12 @@
{
'whitelist' => whitelist.uniq,
'ignore_groups' => ignore_groups.uniq,
'ignore_dependencies' => ignore_dependencies.uniq,
'dependencies_file_dir' => artifacts.dir.to_s,
- 'project_name' => project_name
+ 'project_name' => project_name,
+ 'gradle_command' => gradle_command
}
end
def determine_project_name
Pathname.pwd.basename.to_s
@@ -145,10 +147,10 @@
def file
file_dir.join('license_finder.yml')
end
def file_template
- ROOT_PATH.join('..', 'files', 'license_finder.yml')
+ ROOT_PATH.join('data', 'license_finder.example.yml')
end
end
end
end