spdx 2.0.9 → 2.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/spdx/version.rb +1 -1
- data/lib/spdx_parser.rb +1 -1
- data/spec/spdx_spec.rb +3 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef004b1fd5e38466c71ae884abb9c34543eb54e8d79b7a24095bf3bcbd3a7e80
|
4
|
+
data.tar.gz: 3c980264fc738deddbe0134a0ad94e1353f85ba1185b7f79ab03d32fec54e3b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc79614cfa299cba1e14d4b75fd94580988741bb408da4000de4378011dd4c4738f1e84208e4d6e654606e5ce9d936c9ff168e7f77e94f346512e227c80b7eea
|
7
|
+
data.tar.gz: 2452496acf68305de9c2ccfd7cfe5ea0599ce262eb9e28297947bbf4a7fea5afcd54f4b30466afb4e8d3e7cf0ef37ed41cbc0f94974889a9a2577e6ad7ca8f66
|
data/lib/spdx/version.rb
CHANGED
data/lib/spdx_parser.rb
CHANGED
@@ -25,7 +25,7 @@ class SpdxParser
|
|
25
25
|
data = "(#{data})" unless data.start_with?("(") || SKIP_PARENS.include?(data)
|
26
26
|
tree = @parser.parse(data)
|
27
27
|
|
28
|
-
raise SpdxGrammar::SpdxParseError, "Parse error at offset: #{@parser.index}" if tree.nil?
|
28
|
+
raise SpdxGrammar::SpdxParseError, "Unable to parse expression '#{data}'. Parse error at offset: #{@parser.index}" if tree.nil?
|
29
29
|
|
30
30
|
clean_tree(tree)
|
31
31
|
tree
|
data/spec/spdx_spec.rb
CHANGED
@@ -28,7 +28,6 @@ describe Spdx do
|
|
28
28
|
|
29
29
|
it "should return know license from an alias" do
|
30
30
|
expect(Spdx.find("The Apache Software License, Version 2.0").name).to eq("Apache License 2.0")
|
31
|
-
expect(Spdx.find("Apache 2.0").name).to eq("Apache License 2.0")
|
32
31
|
expect(Spdx.find("Apache2").name).to eq("Apache License 2.0")
|
33
32
|
expect(Spdx.find("Apache License, Version 2.0").name).to eq("Apache License 2.0")
|
34
33
|
expect(Spdx.find("Educational Community License, Version 2.0").name).to eq("Educational Community License v2.0")
|
@@ -223,5 +222,8 @@ describe Spdx do
|
|
223
222
|
it "returns false for a license in the exception spot" do
|
224
223
|
expect(Spdx.valid_spdx?("EPL-2.0 OR (GPL-2.0-only WITH AGPL-3.0)")).to be false
|
225
224
|
end
|
225
|
+
it "provides full details for a parse error" do
|
226
|
+
expect { Spdx.parse_spdx("MIT OR ((WHAT)") }.to raise_error(SpdxGrammar::SpdxParseError, "Unable to parse expression '(MIT OR ((WHAT))'. Parse error at offset: 0")
|
227
|
+
end
|
226
228
|
end
|
227
229
|
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.
|
4
|
+
version: 2.0.10
|
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-
|
11
|
+
date: 2020-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fuzzy_match
|
@@ -161,7 +161,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: '0'
|
163
163
|
requirements: []
|
164
|
-
|
164
|
+
rubyforge_project:
|
165
|
+
rubygems_version: 2.7.4
|
165
166
|
signing_key:
|
166
167
|
specification_version: 4
|
167
168
|
summary: A SPDX license normalizer
|