spdx 2.0.5 → 2.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -201,11 +201,9 @@ describe Spdx do
201
201
  expect(Spdx.valid_spdx?("NOASSERTION")).to be true
202
202
  expect(Spdx.valid_spdx?("MIT OR NONE")).to be false
203
203
  end
204
- end
205
- end
206
- context "alias lookup" do
207
- it "returns false for an alias that doesn't exist" do
208
- expect(Spdx.alias_exists?("FAKEALIAS")).to be false
204
+ it "returns true for + expression" do
205
+ expect(Spdx.valid_spdx?("AGPL-1.0+"))
206
+ end
209
207
  end
210
208
  end
211
209
  context "licenses" do
@@ -217,4 +215,13 @@ describe Spdx do
217
215
  expect(Spdx.parse_spdx("NOASSERTION").licenses).to eq []
218
216
  end
219
217
  end
218
+
219
+ context "exceptions" do
220
+ it "parses a valid spdx with expression" do
221
+ expect(Spdx.valid_spdx?("EPL-2.0 OR (GPL-2.0-only WITH Classpath-exception-2.0)")).to be true
222
+ end
223
+ it "returns false for a license in the exception spot" do
224
+ expect(Spdx.valid_spdx?("EPL-2.0 OR (GPL-2.0-only WITH AGPL-3.0)")).to be false
225
+ end
226
+ end
220
227
  end
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: 2.0.5
4
+ version: 2.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tidelift, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-12 00:00:00.000000000 Z
11
+ date: 2020-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fuzzy_match
@@ -129,7 +129,6 @@ files:
129
129
  - LICENSE.txt
130
130
  - README.md
131
131
  - Rakefile
132
- - aliases.json
133
132
  - bin/update-license-files
134
133
  - exceptions.json
135
134
  - lib/exception.rb
@@ -1,3 +0,0 @@
1
- {
2
-
3
- }