ruby-changes:69559
From: Carlos <ko1@a...>
Date: Tue, 2 Nov 2021 10:45:33 +0900 (JST)
Subject: [ruby-changes:69559] 17f8fd6568 (master): Allow custom LicenseRef
https://git.ruby-lang.org/ruby.git/commit/?id=17f8fd6568 From 17f8fd656818d62ab18027dc21e463768e1a9b54 Mon Sep 17 00:00:00 2001 From: Carlos Palhares <chjunior@g...> Date: Mon, 25 Oct 2021 15:50:32 -0300 Subject: Allow custom LicenseRef --- lib/rubygems/util/licenses.rb | 2 ++ test/rubygems/test_gem_specification.rb | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/lib/rubygems/util/licenses.rb b/lib/rubygems/util/licenses.rb index 8de5b11ae38..3f4178c6e05 100644 --- a/lib/rubygems/util/licenses.rb +++ b/lib/rubygems/util/licenses.rb @@ -5,6 +5,7 @@ class Gem::Licenses https://github.com/ruby/ruby/blob/trunk/lib/rubygems/util/licenses.rb#L5 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 https://github.com/ruby/ruby/blob/trunk/lib/rubygems/util/licenses.rb#L524 \+? (?:\s WITH \s #{Regexp.union(EXCEPTION_IDENTIFIERS)})? | #{NONSTANDARD} + | #{LICENSE_REF} ) \Z }ox.freeze diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index 582813c01dd..bfd0db347e6 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -3066,6 +3066,17 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license. https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L3066 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 -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/