summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md4
-rw-r--r--Gemfile.lock4
-rw-r--r--config/.bashrc1
-rw-r--r--lib/license/management/version.rb2
-rw-r--r--license-management.gemspec1
-rw-r--r--normalized-licenses.yml15
-rw-r--r--spec/fixtures/java/pom-public-gitlab-repository.xml5
-rw-r--r--spec/integration/java/maven_spec.rb6
-rw-r--r--spec/unit/license/management/repository_spec.rb18
9 files changed, 51 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ac2e94b..c019ad4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
# GitLab License management changelog
+## v3.12.1
+
+- Detect variations of the "Eclipse Public License" (!174)
+
## v3.12.0
- Update default name of the generated report. (!167)
diff --git a/Gemfile.lock b/Gemfile.lock
index f9508ff..8c23a6a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- license-management (3.12.0)
+ license-management (3.12.1)
license_finder (~> 6.0.0)
GEM
@@ -10,6 +10,7 @@ GEM
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
ast (2.4.0)
+ byebug (11.1.3)
diff-lcs (1.3)
docile (1.3.2)
gitlab-styles (3.1.0)
@@ -85,6 +86,7 @@ PLATFORMS
ruby
DEPENDENCIES
+ byebug (~> 11.1)
gitlab-styles (~> 3.1)
json-schema (~> 2.8)
license-management!
diff --git a/config/.bashrc b/config/.bashrc
index 5ab592a..a3cde0d 100644
--- a/config/.bashrc
+++ b/config/.bashrc
@@ -1,6 +1,7 @@
#!/bin/bash
alias nuget='mono /usr/local/bin/nuget.exe'
+set -o vi
function inflate() {
local file=$1
diff --git a/lib/license/management/version.rb b/lib/license/management/version.rb
index 9c987ed..163e48d 100644
--- a/lib/license/management/version.rb
+++ b/lib/license/management/version.rb
@@ -2,6 +2,6 @@
module License
module Management
- VERSION = '3.12.0'
+ VERSION = '3.12.1'
end
end
diff --git a/license-management.gemspec b/license-management.gemspec
index 58ec211..252047f 100644
--- a/license-management.gemspec
+++ b/license-management.gemspec
@@ -28,6 +28,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ['lib']
spec.add_dependency 'license_finder', '~> 6.0.0'
+ spec.add_development_dependency 'byebug', '~> 11.1'
spec.add_development_dependency 'gitlab-styles', '~> 3.1'
spec.add_development_dependency 'json-schema', '~> 2.8'
spec.add_development_dependency 'rspec', '~> 3.9'
diff --git a/normalized-licenses.yml b/normalized-licenses.yml
index 28bc1c4..6e13d65 100644
--- a/normalized-licenses.yml
+++ b/normalized-licenses.yml
@@ -5,6 +5,8 @@ ids:
Apache 2.0: Apache-2.0
Apache2: Apache-2.0
Apache License v2.0: Apache-2.0
+ Apache Software License - Version 2.0: Apache-2.0
+ ASF 2.0: Apache-2.0
ASL, version 2: Apache-2.0
BSD 3-Clause: BSD-3-Clause
BSD (3 clause): BSD-3-Clause
@@ -15,12 +17,23 @@ ids:
CC0 1.0 Universal: CC0-1.0
CC01: CC0-1.0
CDDL1: CDDL-1.0
+ COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0: CDDL-1.0
+ Common Development and Distribution License 1.1: CDDL-1.1
Common Public License Version 1.0: CPL-1.0
Eclipse Distribution License (EDL), Version 1.0: BSD-3-Clause # https://wiki.spdx.org/view/Legal_Team/License_List/Licenses_Under_Consideration
Eclipse Public License (EPL), Version 1.0: EPL-1.0
Eclipse Public License - Version 1.0: EPL-1.0
+ Eclipse Public License - v 1.0: EPL-1.0
+ Eclipse Public License 1.0: EPL-1.0
+ Eclipse Public License v1.0: EPL-1.0
EPL1: EPL-1.0
Gnu General Public License, Version 3: GPL-3.0
+ GNU General Public License v2.0 only, with Classpath exception: GPL-2.0-only
+ GNU General Public License, version 2: GPL-2.0-only
+ GNU Lesser General Public License v2.1 or later: LGPL-2.1-or-later
+ GNU Library General Public License v2.1 or later: LGPL-2.1+
+ GPL-2.0: GPL-2.0-only
+ GPL2 w/ CPE: GPL-2.0-only
GPLv2: GPL-2.0
GPLv3: GPL-3.0
http://www.apache.org/licenses/LICENSE-2.0: Apache-2.0
@@ -43,6 +56,8 @@ ids:
New BSD: BSD-3-Clause
NewBSD: BSD-3-Clause
New BSD License: BSD-3-Clause
+ BSD 3-Clause License: BSD-3-Clause
+ The BSD 3-Clause License: BSD-3-Clause
Python: Python-2.0
Python Software Foundation License: Python-2.0
Ruby: Ruby
diff --git a/spec/fixtures/java/pom-public-gitlab-repository.xml b/spec/fixtures/java/pom-public-gitlab-repository.xml
index c39e703..11abf7f 100644
--- a/spec/fixtures/java/pom-public-gitlab-repository.xml
+++ b/spec/fixtures/java/pom-public-gitlab-repository.xml
@@ -12,5 +12,10 @@
<artifactId>example</artifactId>
<version>1.0</version>
</dependency>
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>2.3.0</version>
+ </dependency>
</dependencies>
</project>
diff --git a/spec/integration/java/maven_spec.rb b/spec/integration/java/maven_spec.rb
index 9230a9f..410d607 100644
--- a/spec/integration/java/maven_spec.rb
+++ b/spec/integration/java/maven_spec.rb
@@ -13,8 +13,9 @@ RSpec.describe "maven" do
})
expect(report).to match_schema
- expect(report.dependency_names).to match_array(['example'])
+ expect(report.dependency_names).to match_array(%w[example jaxb-api])
expect(report.licenses_for('example')).to match_array(['MIT'])
+ expect(report.licenses_for('jaxb-api')).to match_array(['GPL-2.0-only', 'cddl 1.1'])
end
it 'downloads packages from by using a custom `settings.xml`' do
@@ -27,7 +28,8 @@ RSpec.describe "maven" do
})
expect(report).to match_schema
- expect(report[:dependencies]).to match_array([{ name: 'example', url: '', description: '', paths: ['.'], licenses: ['MIT'] }])
+ expect(report[:dependencies]).to match_array([{ name: 'example', url: '', description: '', paths: ['.'], licenses: ['MIT'] },
+ { description: '', licenses: ['GPL-2.0-only', 'cddl 1.1'], name: 'jaxb-api', paths: ['.'], url: '' }])
end
end
diff --git a/spec/unit/license/management/repository_spec.rb b/spec/unit/license/management/repository_spec.rb
index 6006e8a..5fa37e9 100644
--- a/spec/unit/license/management/repository_spec.rb
+++ b/spec/unit/license/management/repository_spec.rb
@@ -32,7 +32,23 @@ RSpec.describe License::Management::Repository do
end
[
- ['Apache License v2.0', 'Apache-2.0']
+ ['Apache License v2.0', 'Apache-2.0'],
+ ['COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0', 'CDDL-1.0'],
+ ['Common Development and Distribution License 1.1', 'CDDL-1.1'],
+ ['Apache Software License - Version 2.0', 'Apache-2.0'],
+ ['ASF 2.0', 'Apache-2.0'],
+ ['Eclipse Public License - v 1.0', 'EPL-1.0'],
+ ['Eclipse Public License 1.0', 'EPL-1.0'],
+ ['Eclipse Public License v1.0', 'EPL-1.0'],
+ ['GNU General Public License v2.0 only, with Classpath exception', 'GPL-2.0-only'],
+ ['GNU General Public License, version 2', 'GPL-2.0-only'],
+ ['GNU Lesser General Public License v2.1 or later', 'LGPL-2.1-or-later'],
+ ['GNU Library General Public License v2.1 or later', 'LGPL-2.1+'],
+ ['GPL-2.0', 'GPL-2.0-only'],
+ ['LGPL-2.1', 'LGPL-2.1'],
+ ['GPL2 w/ CPE', 'GPL-2.0-only'],
+ ['BSD 3-Clause License', 'BSD-3-Clause'],
+ ['The BSD 3-Clause License', 'BSD-3-Clause']
].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) }