Module: Spandx

Defined in:
lib/spandx.rb,
lib/spandx/cli.rb,
lib/spandx/version.rb,
lib/spandx/cli/main.rb,
lib/spandx/core/git.rb,
lib/spandx/core/http.rb,
lib/spandx/core/cache.rb,
lib/spandx/core/guess.rb,
lib/spandx/core/score.rb,
lib/spandx/java/index.rb,
lib/spandx/ruby/index.rb,
lib/spandx/cli/printer.rb,
lib/spandx/core/parser.rb,
lib/spandx/core/plugin.rb,
lib/spandx/js/yarn_pkg.rb,
lib/spandx/python/pypi.rb,
lib/spandx/core/circuit.rb,
lib/spandx/core/content.rb,
lib/spandx/core/gateway.rb,
lib/spandx/dotnet/index.rb,
lib/spandx/java/gateway.rb,
lib/spandx/js/yarn_lock.rb,
lib/spandx/python/index.rb,
lib/spandx/ruby/gateway.rb,
lib/spandx/spdx/gateway.rb,
lib/spandx/spdx/license.rb,
lib/spandx/core/relation.rb,
lib/spandx/java/metadata.rb,
lib/spandx/python/source.rb,
lib/spandx/core/data_file.rb,
lib/spandx/js/parsers/npm.rb,
lib/spandx/os/parsers/apk.rb,
lib/spandx/spdx/catalogue.rb,
lib/spandx/core/dependency.rb,
lib/spandx/core/index_file.rb,
lib/spandx/js/parsers/yarn.rb,
lib/spandx/os/parsers/dpkg.rb,
lib/spandx/spdx/expression.rb,
lib/spandx/cli/printers/csv.rb,
lib/spandx/core/thread_pool.rb,
lib/spandx/cli/commands/pull.rb,
lib/spandx/cli/commands/scan.rb,
lib/spandx/cli/printers/json.rb,
lib/spandx/core/registerable.rb,
lib/spandx/cli/commands/build.rb,
lib/spandx/cli/printers/table.rb,
lib/spandx/dotnet/parsers/sln.rb,
lib/spandx/java/parsers/maven.rb,
lib/spandx/core/license_plugin.rb,
lib/spandx/core/path_traversal.rb,
lib/spandx/dotnet/project_file.rb,
lib/spandx/dotnet/nuget_gateway.rb,
lib/spandx/php/parsers/composer.rb,
lib/spandx/dotnet/parsers/csproj.rb,
lib/spandx/php/packagist_gateway.rb,
lib/spandx/spdx/composite_license.rb,
lib/spandx/dotnet/package_reference.rb,
lib/spandx/ruby/parsers/gemfile_lock.rb,
lib/spandx/python/parsers/pipfile_lock.rb,
lib/spandx/terraform/parsers/lock_file.rb,
lib/spandx/dotnet/parsers/packages_config.rb,
ext/spandx/spandx.c

Defined Under Namespace

Modules: Cli, Core, Dotnet, Java, Js, Os, Php, Python, Ruby, Spdx, Terraform Classes: Error

Constant Summary collapse

Rubygems =
Ruby
VERSION =
'0.18.3'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.airgap=(value) ⇒ Object (writeonly)

Sets the attribute airgap

Parameters:

  • value

    the value to set the attribute airgap to.



28
29
30
# File 'lib/spandx.rb', line 28

def airgap=(value)
  @airgap = value
end

.gitObject



46
47
48
49
50
51
52
# File 'lib/spandx.rb', line 46

def git
  @git ||= {
    cache: ::Spandx::Core::Git.new(url: 'https://github.com/spandx/cache.git'),
    rubygems: ::Spandx::Core::Git.new(url: 'https://github.com/spandx/rubygems-cache.git'),
    spdx: ::Spandx::Core::Git.new(url: 'https://github.com/spdx/license-list-data.git', default_branch: 'master'),
  }
end

.httpObject



38
39
40
# File 'lib/spandx.rb', line 38

def http
  @http ||= Spandx::Core::Http.new
end

.loggerObject



42
43
44
# File 'lib/spandx.rb', line 42

def logger
  @logger ||= Logger.new('/dev/null')
end

Class Method Details

.airgap?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/spandx.rb', line 34

def airgap?
  @airgap
end

.rootObject



30
31
32
# File 'lib/spandx.rb', line 30

def root
  Pathname.new(File.dirname(__FILE__)).join('../..')
end