mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Allow custom LicenseRef
This commit is contained in:
parent
b74385e78d
commit
17f8fd6568
2 changed files with 13 additions and 0 deletions
|
@ -5,6 +5,7 @@ class Gem::Licenses
|
|||
extend Gem::Text
|
||||
|
||||
NONSTANDARD = 'Nonstandard'.freeze
|
||||
LICENSE_REF = 'LicenseRef-.+'.freeze
|
||||
|
||||
# Software Package Data Exchange (SPDX) standard open-source software
|
||||
# license identifiers
|
||||
|
@ -523,6 +524,7 @@ class Gem::Licenses
|
|||
\+?
|
||||
(?:\s WITH \s #{Regexp.union(EXCEPTION_IDENTIFIERS)})?
|
||||
| #{NONSTANDARD}
|
||||
| #{LICENSE_REF}
|
||||
)
|
||||
\Z
|
||||
}ox.freeze
|
||||
|
|
|
@ -3066,6 +3066,17 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
|||
WARNING
|
||||
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
|
||||
util_setup_validate
|
||||
|
||||
|
|
Loading…
Reference in a new issue