inspec/lib/utils/spdx.rb
Miah Johnson 659b4b373a Remove # encoding: utf8 magic comments
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-07 16:06:23 -07:00

12 lines
275 B
Ruby

# 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