Class: LicenseAuto::Package

Inherits:
Hashie::Mash
  • Object
show all
Extended by:
LicenseAuto
Defined in:
lib/license_auto/package.rb

Overview

Package:

language: 'Ruby',                # Ruby|Golang|Java|NodeJS|Erlang|Python|
name: 'bundler',
group: 'com.google.http-client', # Optional: Assign nil if your package is not a Java
version: '1.11.2',               # Optional: Assign nil if check the latest
project_server: 'rubygems.org'   # Optional: github.com|rubygems.org|pypi.python.org/pypi|registry.npmjs.org

Constant Summary collapse

LANGUAGES_PROJECT_SERVER =

Default project website server of all kinds of languages.

Key: language name

Value: default project server

{
    Ruby: RubyGemsOrg
}

Constants included from LicenseAuto

GIT_HASH_LENGTH

Instance Method Summary collapse

Methods included from LicenseAuto

gem_version, github_get_license_info

Constructor Details

#initialize(hash) ⇒ Package

Returns a new instance of Package.



30
31
32
33
# File 'lib/license_auto/package.rb', line 30

def initialize(hash)
  super(hash)
  @server = nil
end

Instance Method Details

#get_license_info(**args) ⇒ Object

Class Entry



38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/license_auto/package.rb', line 38

def get_license_info(**args)

  # args = {
  #     fetch_license_text: true
  # }.merge(args)

  @server.get_license_info if chose_project_server

  # TODO: uncomment these line, add Google or Yahoo!
  # if @server.nil?
  #     @server.get_license_info if chose_search_engine
  # end

end