diff options
| author | mo khan <mo.khan@gmail.com> | 2019-10-29 10:19:35 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2019-10-29 10:38:16 -0600 |
| commit | e731e3570cce4a73aa2c17009c92587e6b3dd4c6 (patch) | |
| tree | 0bf39daf31d1b77bea3ffe971a76145b51791d82 | |
| parent | 13fd9dab34909eaf228534e0fd399b845c5e614a (diff) | |
Map `Apache License v2.0` to `Apache-2.0`
| -rw-r--r-- | CHANGELOG.md | 4 | ||||
| -rw-r--r-- | normalized-licenses.yml | 1 | ||||
| -rw-r--r-- | spec/license/management/repository_spec.rb | 11 |
3 files changed, 16 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 39fae56..4354ab0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # GitLab License management changelog +## v1.8.1 + +- Add mapping for `Apache License v2.0` to `Apache-2.0` (!78) + ## v1.8.0 - Add ability to configure the `license_finder` execution via `LICENSE_FINDER_CLI_OPTS` (!77) diff --git a/normalized-licenses.yml b/normalized-licenses.yml index 0c8635d..4ae5b98 100644 --- a/normalized-licenses.yml +++ b/normalized-licenses.yml @@ -3,6 +3,7 @@ ids: Apache1_1: Apache-1.1 Apache 2.0: Apache-2.0 Apache2: Apache-2.0 + Apache License v2.0: Apache-2.0 ASL, version 2: Apache-2.0 BSD: BSD-4-Clause BSD style: BSD-3-Clause diff --git a/spec/license/management/repository_spec.rb b/spec/license/management/repository_spec.rb index dbc0a22..6ebc09e 100644 --- a/spec/license/management/repository_spec.rb +++ b/spec/license/management/repository_spec.rb @@ -23,5 +23,16 @@ RSpec.describe License::Management::Repository do end end end + + [ + ['Apache License v2.0', 'Apache-2.0'], + ].each do |short_name, spdx_id| + context "when mapping a `#{short_name}` license" do + let(:license) { LicenseFinder::License.new(short_name: short_name, matcher: LicenseFinder::License::NoneMatcher.new, url: nil) } + let(:dependency) { double(name: 'x', summary: '', description: '', homepage: '', licenses: [license]) } + + it { expect(subject.item_for(license)['id']).to eql(spdx_id) } + end + end end end |
