lib/licensed/dependency.rb in licensed-1.3.4 vs lib/licensed/dependency.rb in licensed-1.4.0

- old
+ new

@@ -1,16 +1,18 @@ # frozen_string_literal: true require "licensee" module Licensed class Dependency < License - LEGAL_FILES = /\A(AUTHORS|COPYING|NOTICE|LEGAL)(?:\..*)?\z/i + LEGAL_FILES = /\A(AUTHORS|NOTICE|LEGAL)(?:\..*)?\z/i attr_reader :path attr_reader :search_root + attr_reader :name def initialize(path, metadata = {}) @search_root = metadata.delete("search_root") + @name = metadata.delete("path") || metadata["name"] super metadata self.path = path end