Class: LicenseFinder::ConanPackage

Inherits:
Package
  • Object
show all
Defined in:
lib/license_finder/packages/conan_package.rb

Instance Attribute Summary

Attributes inherited from Package

#authors, #children, #description, #groups, #homepage, #install_path, #license_names_from_spec, #logger, #manual_approval, #name, #parents, #summary, #version

Instance Method Summary collapse

Methods inherited from Package

#<=>, #activations, #approved?, #approved_manually!, #approved_manually?, #decide_on_license, #eql?, #hash, #license_files, license_names_from_standard_spec, #licenses, #licensing, #log_activation, #missing?, #notice_files, #permitted!, #permitted?, #restricted!, #restricted?

Constructor Details

#initialize(name, version, license_text, url, options = {}) ⇒ ConanPackage

Returns a new instance of ConanPackage.



5
6
7
8
9
# File 'lib/license_finder/packages/conan_package.rb', line 5

def initialize(name, version, license_text, url, options = {})
  super(name, version, options)
  @license = License.find_by_text(license_text.to_s)
  @homepage = url
end

Instance Method Details

#licenses_from_specObject



11
12
13
# File 'lib/license_finder/packages/conan_package.rb', line 11

def licenses_from_spec
  [@license].compact
end

#package_managerObject



15
16
17
# File 'lib/license_finder/packages/conan_package.rb', line 15

def package_manager
  'Conan'
end

#package_urlObject



19
20
21
# File 'lib/license_finder/packages/conan_package.rb', line 19

def package_url
  "https://conan.io/center/#{CGI.escape(name)}/#{CGI.escape(version)}"
end