1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-22 12:50:24 +01:00

rubocop fixes

This commit is contained in:
Mike Linksvayer 2021-03-29 09:30:10 -07:00 committed by GitHub
parent 9a138e1ef3
commit 07e3e9521f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,13 +33,11 @@ def config
end end
def licenses def licenses
SpecHelper.licenses ||= begin SpecHelper.licenses ||= site.collections['licenses'].docs.map do |license|
site.collections['licenses'].docs.map do |license|
spdx_lcase = File.basename(license.basename, '.txt') spdx_lcase = File.basename(license.basename, '.txt')
license.to_liquid.merge('spdx-lcase' => spdx_lcase) license.to_liquid.merge('spdx-lcase' => spdx_lcase)
end end
end end
end
def shown_licenses def shown_licenses
licenses.reject { |l| l['hidden'] } licenses.reject { |l| l['hidden'] }
@ -139,6 +137,7 @@ module Licensee
dir = ::File.dirname(__FILE__) dir = ::File.dirname(__FILE__)
::File.expand_path '../_licenses', dir ::File.expand_path '../_licenses', dir
end end
def spdx_dir def spdx_dir
::File.expand_path '../license-list-XML/src', __dir__ ::File.expand_path '../license-list-XML/src', __dir__
end end