Allow custom LicenseRef
This commit is contained in:
parent
b74385e78d
commit
17f8fd6568
@ -5,6 +5,7 @@ class Gem::Licenses
|
|||||||
extend Gem::Text
|
extend Gem::Text
|
||||||
|
|
||||||
NONSTANDARD = 'Nonstandard'.freeze
|
NONSTANDARD = 'Nonstandard'.freeze
|
||||||
|
LICENSE_REF = 'LicenseRef-.+'.freeze
|
||||||
|
|
||||||
# Software Package Data Exchange (SPDX) standard open-source software
|
# Software Package Data Exchange (SPDX) standard open-source software
|
||||||
# license identifiers
|
# license identifiers
|
||||||
@ -523,6 +524,7 @@ class Gem::Licenses
|
|||||||
\+?
|
\+?
|
||||||
(?:\s WITH \s #{Regexp.union(EXCEPTION_IDENTIFIERS)})?
|
(?:\s WITH \s #{Regexp.union(EXCEPTION_IDENTIFIERS)})?
|
||||||
| #{NONSTANDARD}
|
| #{NONSTANDARD}
|
||||||
|
| #{LICENSE_REF}
|
||||||
)
|
)
|
||||||
\Z
|
\Z
|
||||||
}ox.freeze
|
}ox.freeze
|
||||||
|
@ -3066,6 +3066,17 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
|||||||
WARNING
|
WARNING
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_validate_license_ref
|
||||||
|
util_setup_validate
|
||||||
|
|
||||||
|
use_ui @ui do
|
||||||
|
@a1.licenses = ['LicenseRef-LICENSE.md']
|
||||||
|
@a1.validate
|
||||||
|
end
|
||||||
|
|
||||||
|
assert_empty @ui.error
|
||||||
|
end
|
||||||
|
|
||||||
def test_validate_license_values_plus
|
def test_validate_license_values_plus
|
||||||
util_setup_validate
|
util_setup_validate
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user