spdx 3.0.0 → 3.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 01e09caa619b6cb6d86d982ad58ada05c5226de001a216fe24133a0416c78f4b
4
- data.tar.gz: 2ad821cde618383e7595c81a2fbbfcb0737101951ab0f942bc9213901c792120
3
+ metadata.gz: dc59812be37956f04cda92f9f96ca4ecd86fcff8af570215464fbdfbef2ed2e7
4
+ data.tar.gz: 212505c4074311fed3bcd13b2cc89b618c64e3a4525e124152d3ecb234581f41
5
5
  SHA512:
6
- metadata.gz: ad5d27388cd1414e708a3dbee08505aec3b020445d7a779678bf7151c18cdb58383e31f4b6a2240f32adeace6d0551b83da2d6bcc03e3b2b15fa8e38055bab7c
7
- data.tar.gz: 5188f366d9dec69d06ef144ddb1648b05c3108c0840ebf06bc1f9c4e0f79994abda3a25b14c4f5126159eadd97c38c67f4ea5d4cba9276f364ea289540b0d464
6
+ metadata.gz: 35ed0504a7b247f40d8cdac9ebe8a3f71af8feb526efe960a1bbb09252006d70d6295e35af83d7e17bdf21116823d18133a7e4c91779408111083ceff5cc80b0
7
+ data.tar.gz: b2076f1d6bb44ec96899c008487f13da44737a97840ef44bb0c27d8050943df39d47f065d0ea2b6429486eb0b5b546d2d97385c40df57439efa09aca0651f703
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
- # [Spdx](http://libraries.io/rubygems/spdx) - A SPDX license normalizer
2
-
3
- This gem allows you to find the closest match using [FuzzyMatch](https://github.com/seamusabshere/fuzzy_match) in the [spdx-licenses](https://github.com/domcleal/spdx-licenses) list for similar (not necessarily exact) license names.
1
+ # [Spdx](http://libraries.io/rubygems/spdx) - A SPDX license parser
4
2
 
3
+ This gem allows you validate and parse spdx expressions. It also contains (relatively) up to date license and license exception lists from https://github.com/spdx/license-list-data/tree/master/json
5
4
  ## Installation
6
5
 
7
6
  Add this line to your application's Gemfile:
@@ -21,14 +20,25 @@ Or install it yourself as:
21
20
  ## Usage
22
21
 
23
22
  ```ruby
24
- Spdx.find('Apache 2') # => <SpdxLicenses::License:0x007fa3a2b462c8 @id="Apache-2.0", @name="Apache License 2.0", @osi_approved=true>
23
+ Spdx.valid_spdx?("(MIT OR AGPL-3.0+)")
24
+ => true
25
+ ```
26
+ ```ruby
27
+ Spdx.parse_spdx("(MIT OR AGPL-3.0+)")
28
+ => CompoundExpression+CompoundExpression0 offset=0, "((MIT OR AGPL-3.0+))" (body):
29
+ Body offset=1, "(MIT OR AGPL-3.0+)":
30
+ CompoundExpression+CompoundExpression0 offset=1, "(MIT OR AGPL-3.0+)" (body):
31
+ Body offset=2, "MIT OR AGPL-3.0+":
32
+ License+License0 offset=2, "MIT"
33
+ LogicalOr+Or0 offset=5, " OR " (space1,space2)
34
+ License+License0 offset=9, "AGPL-3.0+"
25
35
  ```
26
36
 
27
37
  ## Testing
28
38
 
29
39
  Run the tests with:
30
40
 
31
- $ bundle exec rake
41
+ $ bundle exec rspec
32
42
 
33
43
  ## Contributing
34
44
 
@@ -1,13 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "spdx/version"
4
- require "fuzzy_match"
5
4
  require "spdx_parser"
6
5
  require "json"
7
6
  require_relative "exception"
8
7
  require_relative "license"
9
8
 
10
- # Fuzzy matcher for licenses to SPDX standard licenses
11
9
  module Spdx
12
10
  def self.names
13
11
  (licenses.keys + licenses.map { |_k, v| v["name"] }).sort
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spdx
4
- VERSION = "3.0.0"
4
+ VERSION = "3.0.1"
5
5
  end
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.version = Spdx::VERSION
10
10
  spec.authors = ["Tidelift, Inc."]
11
11
  spec.email = ["support@tidelift.com"]
12
- spec.summary = "A SPDX license normalizer"
12
+ spec.summary = "A SPDX license parser"
13
13
  spec.homepage = "https://github.com/librariesio/spdx"
14
14
  spec.license = "MIT"
15
15
 
@@ -18,7 +18,6 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "fuzzy_match", "~> 2.1"
22
21
  spec.add_dependency "treetop", "~> 1.6"
23
22
  spec.add_development_dependency "bundler"
24
23
  spec.add_development_dependency "pry"
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spdx
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
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-08-10 00:00:00.000000000 Z
11
+ date: 2020-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: fuzzy_match
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '2.1'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '2.1'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: treetop
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -164,7 +150,7 @@ requirements: []
164
150
  rubygems_version: 3.0.8
165
151
  signing_key:
166
152
  specification_version: 4
167
- summary: A SPDX license normalizer
153
+ summary: A SPDX license parser
168
154
  test_files:
169
155
  - spec/spdx_spec.rb
170
156
  - spec/spec_helper.rb