lib/licensed/command/verify.rb in licensed-0.10.0 vs lib/licensed/command/verify.rb in licensed-0.11.0
- old
+ new
@@ -8,22 +8,23 @@
def initialize(config)
@config = config
end
def approved?(dependency)
- @config.whitelisted?(dependency) ||
- @config.reviewed?(dependency)
+ @config.whitelisted?(dependency) || @config.reviewed?(dependency)
end
def dependencies
- @dependencies ||= @config.sources.map(&:dependencies).flatten
+ @dependencies ||= @config.sources
+ .map(&:dependencies)
+ .flatten
+ .select { |d| !@config.ignored?(d) }
end
def run
@config.ui.info "Verifying licenses for #{dependencies.size} dependencies"
@results = dependencies.map do |dependency|
- next if @config.ignored?(dependency)
filename = @config.path.join("#{dependency["type"]}/#{dependency["name"]}.txt")
warnings = []
if File.exists?(filename)