spdx 4.0.1 → 4.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b14167134c0066ee60871b43ae1c92508f21f923ff46c6bc71a14a556b3ed73
4
- data.tar.gz: dcb5aa6f11173a6f88cd036911e1f97211043a8f012984fc8bc0a40311f4886b
3
+ metadata.gz: 134220c02a07e17eed28ab3756470ccf78a20f8b8921f28ea7d3f5e10b5a9289
4
+ data.tar.gz: 156fb2738f753f1c14d076f5c5cf07445011e462a3fe8ef820b67b6624e55dff
5
5
  SHA512:
6
- metadata.gz: e4d00a4d70c1e83b0d5c2f3703c7037fa0f28febf7d1990b6a1e685a3237b4127cc2645e093592809c33eaff33940d83a690e14dedb0f3b19f38263de975ecaf
7
- data.tar.gz: 0a64315cec604a279b1f8be2f1d646341e9e9a62471cb3e4d9a2bfdf4fe15a307403ecc8fe8a182a67114731a05c333e25e0a424016bae0e920151a9c69b4fc0
6
+ metadata.gz: 62863d05da4b3e424b328fcecb668a4c25f1693cab4b38ecc2fbc6d22a864cd2e2752990505bc4426ed9c9c5734d265694917c84881a84c0f459779337de8f9f
7
+ data.tar.gz: fc2e69460b219455a8ee73612a52491d1974b380bd5286a7834244ad29d75f824c7d26bc0c225e513aca0ba98b5b77d127b020929211f5f6a80a1e6f84238c6a
data/lib/spdx/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spdx
4
- VERSION = "4.0.1"
4
+ VERSION = "4.0.2"
5
5
  end
data/lib/spdx_grammar.rb CHANGED
@@ -57,7 +57,7 @@ module SpdxGrammar
57
57
 
58
58
  class LicensePlus < Treetop::Runtime::SyntaxNode
59
59
  def licenses
60
- child.licenses
60
+ child.licenses.map { |license| "#{license}+" }
61
61
  end
62
62
 
63
63
  def child
data/spec/spdx_spec.rb CHANGED
@@ -118,7 +118,10 @@ describe Spdx do
118
118
  end
119
119
  context "licenses" do
120
120
  it "returns a list of possible licenses" do
121
+ expect(Spdx.parse("MIT").licenses).to eq ["MIT"]
121
122
  expect(Spdx.parse("MIT OR MPL-2.0").licenses).to eq ["MIT", "MPL-2.0"]
123
+ expect(Spdx.parse("MIT OR MPL-2.0+").licenses).to eq ["MIT", "MPL-2.0+"]
124
+ expect(Spdx.parse("GPL-2.0-only WITH Classpath-exception-2.0").licenses).to eq ["GPL-2.0-only"]
122
125
  end
123
126
  it "returns empty array for NONE or NOASSERTION" do
124
127
  expect(Spdx.parse("NONE").licenses).to eq []
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spdx
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tidelift, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-08 00:00:00.000000000 Z
11
+ date: 2021-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: treetop
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  - !ruby/object:Gem::Version
148
148
  version: '0'
149
149
  requirements: []
150
- rubygems_version: 3.0.8
150
+ rubygems_version: 3.1.2
151
151
  signing_key:
152
152
  specification_version: 4
153
153
  summary: A SPDX license parser