mirror of
https://github.com/inspec/inspec
synced 2024-11-27 07:00:39 +00:00
a6ef98c896
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
13 lines
293 B
Ruby
13 lines
293 B
Ruby
# encoding: utf-8
|
|
# author: Christoph Hartmann
|
|
# author: Dominik Richter
|
|
class Spdx
|
|
def self.licenses
|
|
spdx_file = File.join(File.dirname(__FILE__), 'spdx.txt').freeze
|
|
File.read(spdx_file).split("\n")
|
|
end
|
|
|
|
def self.valid_license?(license)
|
|
licenses.include?(license)
|
|
end
|
|
end
|