Class: LicenseFinder::ConanPackage
- 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
-
#initialize(name, version, license_text, url, options = {}) ⇒ ConanPackage
constructor
A new instance of ConanPackage.
- #licenses_from_spec ⇒ Object
- #package_manager ⇒ Object
- #package_url ⇒ Object
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, = {}) super(name, version, ) @license = License.find_by_text(license_text.to_s) @homepage = url end |
Instance Method Details
#licenses_from_spec ⇒ Object
11 12 13 |
# File 'lib/license_finder/packages/conan_package.rb', line 11 def licenses_from_spec [@license].compact end |
#package_manager ⇒ Object
15 16 17 |
# File 'lib/license_finder/packages/conan_package.rb', line 15 def package_manager 'Conan' end |
#package_url ⇒ Object
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 |