spandx 0.1.0
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 +7 -0
- data/.gitignore +11 -0
- data/.gitlab-ci.yml +8 -0
- data/.rspec +3 -0
- data/.rubocop.yml +112 -0
- data/.travis.yml +7 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +73 -0
- data/LICENSE.txt +21 -0
- data/README.md +45 -0
- data/Rakefile +13 -0
- data/bin/cibuild +19 -0
- data/bin/console +15 -0
- data/bin/lint +11 -0
- data/bin/setup +6 -0
- data/bin/shipit +10 -0
- data/bin/test +13 -0
- data/exe/spandx +4 -0
- data/lib/spandx/catalogue.rb +41 -0
- data/lib/spandx/catalogue_gateway.rb +43 -0
- data/lib/spandx/license.rb +43 -0
- data/lib/spandx/version.rb +5 -0
- data/lib/spandx.rb +11 -0
- data/spandx.gemspec +39 -0
- metadata +182 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 16f3bef45e962f7d6d31e70718f05972163728218a37678e2f94e0f1acb65c8c
|
|
4
|
+
data.tar.gz: 070647d998de1ea3eb32cdee0785e23532c43e74d970dc9383a57147d671a341
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: bec14d60f51e290c6162d5276ca8f8c625d90dea6c2d98d790fbfa7e9e0899d8291ad8dc4a331bfe852cb4709c3172e9483b8011d3e94e98956f348c174e2959
|
|
7
|
+
data.tar.gz: 9687c2c24566853b15fa50376f5c4a9f1934b8feca53f2efde5e17d87aea7ff94144109f584c27d20d6db12730d131ad60c3796d896751b7550be02c9fab60a1
|
data/.gitignore
ADDED
data/.gitlab-ci.yml
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
require:
|
|
2
|
+
- rubocop-rspec
|
|
3
|
+
|
|
4
|
+
AllCops:
|
|
5
|
+
Exclude:
|
|
6
|
+
- 'coverage/**/*'
|
|
7
|
+
- 'pkg/**/*'
|
|
8
|
+
- 'spec/fixtures/**/*'
|
|
9
|
+
- 'tmp/**/*'
|
|
10
|
+
- 'vendor/**/*'
|
|
11
|
+
TargetRubyVersion: 2.6
|
|
12
|
+
|
|
13
|
+
Layout/AlignArguments:
|
|
14
|
+
EnforcedStyle: with_fixed_indentation
|
|
15
|
+
|
|
16
|
+
Layout/AlignParameters:
|
|
17
|
+
Enabled: true
|
|
18
|
+
EnforcedStyle: with_fixed_indentation
|
|
19
|
+
IndentationWidth: 2
|
|
20
|
+
|
|
21
|
+
Layout/ClassStructure:
|
|
22
|
+
Enabled: true
|
|
23
|
+
Categories:
|
|
24
|
+
module_inclusion:
|
|
25
|
+
- include
|
|
26
|
+
- prepend
|
|
27
|
+
- extend
|
|
28
|
+
ExpectedOrder:
|
|
29
|
+
- module_inclusion
|
|
30
|
+
- constants
|
|
31
|
+
- public_class_methods
|
|
32
|
+
- initializer
|
|
33
|
+
- instance_methods
|
|
34
|
+
- protected_methods
|
|
35
|
+
- private_methods
|
|
36
|
+
|
|
37
|
+
Layout/EndOfLine:
|
|
38
|
+
EnforcedStyle: lf
|
|
39
|
+
|
|
40
|
+
Layout/IndentFirstArrayElement:
|
|
41
|
+
EnforcedStyle: consistent
|
|
42
|
+
|
|
43
|
+
Layout/IndentHeredoc:
|
|
44
|
+
EnforcedStyle: active_support
|
|
45
|
+
|
|
46
|
+
Layout/MultilineMethodCallIndentation:
|
|
47
|
+
Enabled: true
|
|
48
|
+
EnforcedStyle: indented
|
|
49
|
+
|
|
50
|
+
Lint/AmbiguousBlockAssociation:
|
|
51
|
+
Exclude:
|
|
52
|
+
- 'spec/**/*.rb'
|
|
53
|
+
|
|
54
|
+
Lint/InterpolationCheck:
|
|
55
|
+
Exclude:
|
|
56
|
+
- 'spec/**/*.rb'
|
|
57
|
+
|
|
58
|
+
Metrics/BlockLength:
|
|
59
|
+
Exclude:
|
|
60
|
+
- '**/**/*.builder'
|
|
61
|
+
- '**/*.rake'
|
|
62
|
+
- '*.gemspec'
|
|
63
|
+
- 'Rakefile'
|
|
64
|
+
- 'spec/**/*.rb'
|
|
65
|
+
|
|
66
|
+
Metrics/ModuleLength:
|
|
67
|
+
Exclude:
|
|
68
|
+
- 'spec/**/*.rb'
|
|
69
|
+
|
|
70
|
+
Metrics/LineLength:
|
|
71
|
+
Exclude:
|
|
72
|
+
- 'lib/saml/kit/builders/templates/*.builder'
|
|
73
|
+
- 'spec/**/*.rb'
|
|
74
|
+
IgnoredPatterns:
|
|
75
|
+
- '^#*'
|
|
76
|
+
|
|
77
|
+
Naming/FileName:
|
|
78
|
+
Exclude:
|
|
79
|
+
- 'lib/saml-kit.rb'
|
|
80
|
+
|
|
81
|
+
Naming/RescuedExceptionsVariableName:
|
|
82
|
+
PreferredName: error
|
|
83
|
+
|
|
84
|
+
Style/Documentation:
|
|
85
|
+
Enabled: false
|
|
86
|
+
|
|
87
|
+
Style/EachWithObject:
|
|
88
|
+
Enabled: false
|
|
89
|
+
|
|
90
|
+
Style/StringLiterals:
|
|
91
|
+
EnforcedStyle: 'single_quotes'
|
|
92
|
+
|
|
93
|
+
Style/TrailingCommaInArrayLiteral:
|
|
94
|
+
Enabled: false
|
|
95
|
+
|
|
96
|
+
Style/TrailingCommaInHashLiteral:
|
|
97
|
+
Enabled: false
|
|
98
|
+
|
|
99
|
+
RSpec/ExampleLength:
|
|
100
|
+
Max: 80
|
|
101
|
+
|
|
102
|
+
RSpec/MultipleExpectations:
|
|
103
|
+
Enabled: false
|
|
104
|
+
|
|
105
|
+
RSpec/NamedSubject:
|
|
106
|
+
Enabled: false
|
|
107
|
+
|
|
108
|
+
RSpec/NestedGroups:
|
|
109
|
+
Max: 7
|
|
110
|
+
|
|
111
|
+
RSpec/SubjectStub:
|
|
112
|
+
Enabled: false
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
spandx (0.1.0)
|
|
5
|
+
net-hippie (~> 0.2)
|
|
6
|
+
|
|
7
|
+
GEM
|
|
8
|
+
remote: https://rubygems.org/
|
|
9
|
+
specs:
|
|
10
|
+
addressable (2.7.0)
|
|
11
|
+
public_suffix (>= 2.0.2, < 5.0)
|
|
12
|
+
ast (2.4.0)
|
|
13
|
+
bundler-audit (0.6.1)
|
|
14
|
+
bundler (>= 1.2.0, < 3)
|
|
15
|
+
thor (~> 0.18)
|
|
16
|
+
crack (0.4.3)
|
|
17
|
+
safe_yaml (~> 1.0.0)
|
|
18
|
+
diff-lcs (1.3)
|
|
19
|
+
hashdiff (1.0.0)
|
|
20
|
+
jaro_winkler (1.5.3)
|
|
21
|
+
net-hippie (0.2.6)
|
|
22
|
+
parallel (1.17.0)
|
|
23
|
+
parser (2.6.5.0)
|
|
24
|
+
ast (~> 2.4.0)
|
|
25
|
+
public_suffix (4.0.1)
|
|
26
|
+
rainbow (3.0.0)
|
|
27
|
+
rake (10.5.0)
|
|
28
|
+
rspec (3.8.0)
|
|
29
|
+
rspec-core (~> 3.8.0)
|
|
30
|
+
rspec-expectations (~> 3.8.0)
|
|
31
|
+
rspec-mocks (~> 3.8.0)
|
|
32
|
+
rspec-core (3.8.2)
|
|
33
|
+
rspec-support (~> 3.8.0)
|
|
34
|
+
rspec-expectations (3.8.5)
|
|
35
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
36
|
+
rspec-support (~> 3.8.0)
|
|
37
|
+
rspec-mocks (3.8.2)
|
|
38
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
39
|
+
rspec-support (~> 3.8.0)
|
|
40
|
+
rspec-support (3.8.3)
|
|
41
|
+
rubocop (0.75.0)
|
|
42
|
+
jaro_winkler (~> 1.5.1)
|
|
43
|
+
parallel (~> 1.10)
|
|
44
|
+
parser (>= 2.6)
|
|
45
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
46
|
+
ruby-progressbar (~> 1.7)
|
|
47
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
|
48
|
+
rubocop-rspec (1.36.0)
|
|
49
|
+
rubocop (>= 0.68.1)
|
|
50
|
+
ruby-progressbar (1.10.1)
|
|
51
|
+
safe_yaml (1.0.5)
|
|
52
|
+
thor (0.20.3)
|
|
53
|
+
unicode-display_width (1.6.0)
|
|
54
|
+
webmock (3.7.6)
|
|
55
|
+
addressable (>= 2.3.6)
|
|
56
|
+
crack (>= 0.3.2)
|
|
57
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
|
58
|
+
|
|
59
|
+
PLATFORMS
|
|
60
|
+
ruby
|
|
61
|
+
|
|
62
|
+
DEPENDENCIES
|
|
63
|
+
bundler (~> 2.0)
|
|
64
|
+
bundler-audit (~> 0.6)
|
|
65
|
+
rake (~> 10.0)
|
|
66
|
+
rspec (~> 3.0)
|
|
67
|
+
rubocop (~> 0.52)
|
|
68
|
+
rubocop-rspec (~> 1.22)
|
|
69
|
+
spandx!
|
|
70
|
+
webmock (~> 3.7)
|
|
71
|
+
|
|
72
|
+
BUNDLED WITH
|
|
73
|
+
2.0.2
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 mo khan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Spandx
|
|
2
|
+
|
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/spandx`. To experiment with that code, run `bin/console` for an interactive prompt.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
Add this line to your application's Gemfile:
|
|
9
|
+
|
|
10
|
+
```ruby
|
|
11
|
+
gem 'spandx'
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
And then execute:
|
|
15
|
+
|
|
16
|
+
$ bundle
|
|
17
|
+
|
|
18
|
+
Or install it yourself as:
|
|
19
|
+
|
|
20
|
+
$ gem install spandx
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
TODO: Write usage instructions here
|
|
25
|
+
|
|
26
|
+
```ruby
|
|
27
|
+
catalogue = Spandx::Catalogue.latest
|
|
28
|
+
catalogue.each do |license|
|
|
29
|
+
puts license.inspect
|
|
30
|
+
end
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Development
|
|
34
|
+
|
|
35
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/cibuild` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
36
|
+
|
|
37
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
38
|
+
|
|
39
|
+
## Contributing
|
|
40
|
+
|
|
41
|
+
Bug reports and pull requests are welcome on GitLab at https://gitlab.com/xlgmokha/spandx.
|
|
42
|
+
|
|
43
|
+
## License
|
|
44
|
+
|
|
45
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'bundler/audit/task'
|
|
4
|
+
require 'bundler/gem_tasks'
|
|
5
|
+
require 'rspec/core/rake_task'
|
|
6
|
+
require 'rubocop/rake_task'
|
|
7
|
+
|
|
8
|
+
RSpec::Core::RakeTask.new(:spec)
|
|
9
|
+
RuboCop::RakeTask.new(:rubocop)
|
|
10
|
+
Bundler::Audit::Task.new
|
|
11
|
+
|
|
12
|
+
task lint: [:rubocop, 'bundle:audit']
|
|
13
|
+
task default: :spec
|
data/bin/cibuild
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
cd "$(dirname "$0")/.."
|
|
6
|
+
|
|
7
|
+
echo [$(date "+%H:%M:%S")] "==> Started at…"
|
|
8
|
+
|
|
9
|
+
# GC customizations
|
|
10
|
+
export RUBY_GC_MALLOC_LIMIT=79000000
|
|
11
|
+
export RUBY_GC_HEAP_INIT_SLOTS=800000
|
|
12
|
+
export RUBY_HEAP_FREE_MIN=100000
|
|
13
|
+
export RUBY_HEAP_SLOTS_INCREMENT=400000
|
|
14
|
+
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
|
|
15
|
+
|
|
16
|
+
ruby -v
|
|
17
|
+
gem install bundler --conservative -v '~> 2.0'
|
|
18
|
+
bin/test
|
|
19
|
+
bin/lint
|
data/bin/console
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require 'bundler/setup'
|
|
5
|
+
require 'spandx'
|
|
6
|
+
|
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
9
|
+
|
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
11
|
+
# require "pry"
|
|
12
|
+
# Pry.start
|
|
13
|
+
|
|
14
|
+
require 'irb'
|
|
15
|
+
IRB.start(__FILE__)
|
data/bin/lint
ADDED
data/bin/setup
ADDED
data/bin/shipit
ADDED
data/bin/test
ADDED
data/exe/spandx
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Spandx
|
|
4
|
+
class Catalogue
|
|
5
|
+
include Enumerable
|
|
6
|
+
|
|
7
|
+
def initialize(catalogue = {})
|
|
8
|
+
@catalogue = catalogue
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def version
|
|
12
|
+
catalogue[:licenseListVersion]
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def each
|
|
16
|
+
licenses.each do |license|
|
|
17
|
+
yield license if present?(license.id)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def self.latest
|
|
22
|
+
CatalogueGateway.new.fetch
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
private
|
|
26
|
+
|
|
27
|
+
attr_reader :catalogue
|
|
28
|
+
|
|
29
|
+
def licenses
|
|
30
|
+
@licenses ||= catalogue.fetch(:licenses, []).map { |x| map_from(x) }
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def map_from(license_hash)
|
|
34
|
+
License.new(license_hash)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def present?(item)
|
|
38
|
+
item && !item.empty?
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Spandx
|
|
4
|
+
class CatalogueGateway
|
|
5
|
+
URL = 'https://spdx.org/licenses/licenses.json'
|
|
6
|
+
|
|
7
|
+
def initialize(http: default_client)
|
|
8
|
+
@http = http
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def fetch(url: URL)
|
|
12
|
+
response = http.get(url)
|
|
13
|
+
|
|
14
|
+
if response.code == '200'
|
|
15
|
+
parse(response.body)
|
|
16
|
+
else
|
|
17
|
+
empty_catalogue
|
|
18
|
+
end
|
|
19
|
+
rescue *::Net::Hippie::CONNECTION_ERRORS
|
|
20
|
+
empty_catalogue
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
private
|
|
24
|
+
|
|
25
|
+
attr_reader :http
|
|
26
|
+
|
|
27
|
+
def parse(json)
|
|
28
|
+
build_catalogue(JSON.parse(json, symbolize_names: true))
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def empty_catalogue
|
|
32
|
+
build_catalogue(licenses: [])
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def build_catalogue(hash)
|
|
36
|
+
Catalogue.new(hash)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def default_client
|
|
40
|
+
Net::Hippie::Client.new
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Spandx
|
|
4
|
+
class License
|
|
5
|
+
attr_reader :attributes
|
|
6
|
+
|
|
7
|
+
def initialize(attributes = {})
|
|
8
|
+
@attributes = attributes
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def id
|
|
12
|
+
attributes[:licenseId]
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def name
|
|
16
|
+
attributes[:name]
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def reference
|
|
20
|
+
attributes[:reference]
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def deprecated_license_id?
|
|
24
|
+
attributes[:isDeprecatedLicenseId]
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def url
|
|
28
|
+
attributes[:detailsUrl]
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def osi_approved?
|
|
32
|
+
attributes[:isOsiApproved]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def see_also
|
|
36
|
+
attributes[:seeAlso]
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def reference_number
|
|
40
|
+
attributes[:referenceNumber]
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
data/lib/spandx.rb
ADDED
data/spandx.gemspec
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
|
+
require 'spandx/version'
|
|
6
|
+
|
|
7
|
+
Gem::Specification.new do |spec|
|
|
8
|
+
spec.name = 'spandx'
|
|
9
|
+
spec.version = Spandx::VERSION
|
|
10
|
+
spec.authors = ['mo khan']
|
|
11
|
+
spec.email = ['mo@mokhan.ca']
|
|
12
|
+
|
|
13
|
+
spec.summary = 'A ruby interface to the SPDX catalogue.'
|
|
14
|
+
spec.description = 'A ruby interface to the SPDX catalogue.'
|
|
15
|
+
spec.homepage = 'https://gitlab.com/xlgmokha/spandx'
|
|
16
|
+
spec.license = 'MIT'
|
|
17
|
+
|
|
18
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
|
19
|
+
spec.metadata['source_code_uri'] = 'https://gitlab.com/xlgmokha/spandx'
|
|
20
|
+
spec.metadata['changelog_uri'] = 'https://gitlab.com/xlgmokha/spandx/blob/master/CHANGELOG.md'
|
|
21
|
+
|
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
24
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
25
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
26
|
+
end
|
|
27
|
+
spec.bindir = 'exe'
|
|
28
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
29
|
+
spec.require_paths = ['lib']
|
|
30
|
+
|
|
31
|
+
spec.add_dependency 'net-hippie', '~> 0.2'
|
|
32
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
|
33
|
+
spec.add_development_dependency 'bundler-audit', '~> 0.6'
|
|
34
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
|
35
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
|
36
|
+
spec.add_development_dependency 'rubocop', '~> 0.52'
|
|
37
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 1.22'
|
|
38
|
+
spec.add_development_dependency 'webmock', '~> 3.7'
|
|
39
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: spandx
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- mo khan
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2019-10-05 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: net-hippie
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '0.2'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0.2'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: bundler
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '2.0'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '2.0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: bundler-audit
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0.6'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0.6'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: rake
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - "~>"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '10.0'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - "~>"
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '10.0'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: rspec
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - "~>"
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '3.0'
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - "~>"
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '3.0'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: rubocop
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - "~>"
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '0.52'
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - "~>"
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '0.52'
|
|
97
|
+
- !ruby/object:Gem::Dependency
|
|
98
|
+
name: rubocop-rspec
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - "~>"
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '1.22'
|
|
104
|
+
type: :development
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - "~>"
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: '1.22'
|
|
111
|
+
- !ruby/object:Gem::Dependency
|
|
112
|
+
name: webmock
|
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
|
114
|
+
requirements:
|
|
115
|
+
- - "~>"
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: '3.7'
|
|
118
|
+
type: :development
|
|
119
|
+
prerelease: false
|
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
+
requirements:
|
|
122
|
+
- - "~>"
|
|
123
|
+
- !ruby/object:Gem::Version
|
|
124
|
+
version: '3.7'
|
|
125
|
+
description: A ruby interface to the SPDX catalogue.
|
|
126
|
+
email:
|
|
127
|
+
- mo@mokhan.ca
|
|
128
|
+
executables:
|
|
129
|
+
- spandx
|
|
130
|
+
extensions: []
|
|
131
|
+
extra_rdoc_files: []
|
|
132
|
+
files:
|
|
133
|
+
- ".gitignore"
|
|
134
|
+
- ".gitlab-ci.yml"
|
|
135
|
+
- ".rspec"
|
|
136
|
+
- ".rubocop.yml"
|
|
137
|
+
- ".travis.yml"
|
|
138
|
+
- Gemfile
|
|
139
|
+
- Gemfile.lock
|
|
140
|
+
- LICENSE.txt
|
|
141
|
+
- README.md
|
|
142
|
+
- Rakefile
|
|
143
|
+
- bin/cibuild
|
|
144
|
+
- bin/console
|
|
145
|
+
- bin/lint
|
|
146
|
+
- bin/setup
|
|
147
|
+
- bin/shipit
|
|
148
|
+
- bin/test
|
|
149
|
+
- exe/spandx
|
|
150
|
+
- lib/spandx.rb
|
|
151
|
+
- lib/spandx/catalogue.rb
|
|
152
|
+
- lib/spandx/catalogue_gateway.rb
|
|
153
|
+
- lib/spandx/license.rb
|
|
154
|
+
- lib/spandx/version.rb
|
|
155
|
+
- spandx.gemspec
|
|
156
|
+
homepage: https://gitlab.com/xlgmokha/spandx
|
|
157
|
+
licenses:
|
|
158
|
+
- MIT
|
|
159
|
+
metadata:
|
|
160
|
+
homepage_uri: https://gitlab.com/xlgmokha/spandx
|
|
161
|
+
source_code_uri: https://gitlab.com/xlgmokha/spandx
|
|
162
|
+
changelog_uri: https://gitlab.com/xlgmokha/spandx/blob/master/CHANGELOG.md
|
|
163
|
+
post_install_message:
|
|
164
|
+
rdoc_options: []
|
|
165
|
+
require_paths:
|
|
166
|
+
- lib
|
|
167
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
168
|
+
requirements:
|
|
169
|
+
- - ">="
|
|
170
|
+
- !ruby/object:Gem::Version
|
|
171
|
+
version: '0'
|
|
172
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
|
+
requirements:
|
|
174
|
+
- - ">="
|
|
175
|
+
- !ruby/object:Gem::Version
|
|
176
|
+
version: '0'
|
|
177
|
+
requirements: []
|
|
178
|
+
rubygems_version: 3.0.3
|
|
179
|
+
signing_key:
|
|
180
|
+
specification_version: 4
|
|
181
|
+
summary: A ruby interface to the SPDX catalogue.
|
|
182
|
+
test_files: []
|