licensed 3.2.0 → 3.3.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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +44 -1
  3. data/README.md +1 -1
  4. data/docs/commands/status.md +1 -0
  5. data/docs/sources/cargo.md +19 -0
  6. data/lib/licensed/commands/cache.rb +4 -2
  7. data/lib/licensed/commands/command.rb +5 -2
  8. data/lib/licensed/reporters/status_reporter.rb +1 -1
  9. data/lib/licensed/sources/bundler/definition.rb +36 -0
  10. data/lib/licensed/sources/bundler/missing_specification.rb +10 -7
  11. data/lib/licensed/sources/bundler.rb +33 -69
  12. data/lib/licensed/sources/cargo.rb +70 -0
  13. data/lib/licensed/sources/dep.rb +2 -2
  14. data/lib/licensed/sources/go.rb +3 -3
  15. data/lib/licensed/sources/helpers/content_versioning.rb +2 -1
  16. data/lib/licensed/sources/nuget.rb +1 -2
  17. data/lib/licensed/sources.rb +1 -0
  18. data/lib/licensed/version.rb +1 -1
  19. data/licensed.gemspec +5 -5
  20. metadata +27 -41
  21. data/.github/workflows/release.yml +0 -213
  22. data/.github/workflows/test.yml +0 -439
  23. data/.gitignore +0 -57
  24. data/.licensed.yml +0 -7
  25. data/.rubocop.yml +0 -8
  26. data/.ruby-version +0 -1
  27. data/docker/Dockerfile.build-linux +0 -15
  28. data/script/bootstrap +0 -6
  29. data/script/cibuild +0 -7
  30. data/script/console +0 -15
  31. data/script/package +0 -20
  32. data/script/packages/build +0 -95
  33. data/script/packages/linux +0 -57
  34. data/script/packages/mac +0 -41
  35. data/script/setup +0 -5
  36. data/script/source-setup/bower +0 -17
  37. data/script/source-setup/bundler +0 -20
  38. data/script/source-setup/cabal +0 -19
  39. data/script/source-setup/composer +0 -38
  40. data/script/source-setup/git_submodule +0 -39
  41. data/script/source-setup/go +0 -31
  42. data/script/source-setup/mix +0 -19
  43. data/script/source-setup/npm +0 -34
  44. data/script/source-setup/nuget +0 -17
  45. data/script/source-setup/pip +0 -29
  46. data/script/source-setup/pipenv +0 -21
  47. data/script/source-setup/swift +0 -22
  48. data/script/source-setup/yarn +0 -17
  49. data/script/test +0 -16
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: licensed
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-19 00:00:00.000000000 Z
11
+ date: 2021-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: licensee
@@ -62,16 +62,22 @@ dependencies:
62
62
  name: tomlrb
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - "~>"
65
+ - - ">="
66
66
  - !ruby/object:Gem::Version
67
67
  version: '1.2'
68
+ - - "<"
69
+ - !ruby/object:Gem::Version
70
+ version: '3.0'
68
71
  type: :runtime
69
72
  prerelease: false
70
73
  version_requirements: !ruby/object:Gem::Requirement
71
74
  requirements:
72
- - - "~>"
75
+ - - ">="
73
76
  - !ruby/object:Gem::Version
74
77
  version: '1.2'
78
+ - - "<"
79
+ - !ruby/object:Gem::Version
80
+ version: '3.0'
75
81
  - !ruby/object:Gem::Dependency
76
82
  name: bundler
77
83
  requirement: !ruby/object:Gem::Requirement
@@ -118,16 +124,22 @@ dependencies:
118
124
  name: reverse_markdown
119
125
  requirement: !ruby/object:Gem::Requirement
120
126
  requirements:
121
- - - "~>"
127
+ - - ">="
122
128
  - !ruby/object:Gem::Version
123
- version: '1.0'
129
+ version: '1'
130
+ - - "<"
131
+ - !ruby/object:Gem::Version
132
+ version: '3'
124
133
  type: :runtime
125
134
  prerelease: false
126
135
  version_requirements: !ruby/object:Gem::Requirement
127
136
  requirements:
128
- - - "~>"
137
+ - - ">="
129
138
  - !ruby/object:Gem::Version
130
- version: '1.0'
139
+ version: '1'
140
+ - - "<"
141
+ - !ruby/object:Gem::Version
142
+ version: '3'
131
143
  - !ruby/object:Gem::Dependency
132
144
  name: rake
133
145
  requirement: !ruby/object:Gem::Requirement
@@ -179,7 +191,7 @@ dependencies:
179
191
  version: '0.49'
180
192
  - - "<"
181
193
  - !ruby/object:Gem::Version
182
- version: '0.67'
194
+ version: '1.20'
183
195
  type: :development
184
196
  prerelease: false
185
197
  version_requirements: !ruby/object:Gem::Requirement
@@ -189,7 +201,7 @@ dependencies:
189
201
  version: '0.49'
190
202
  - - "<"
191
203
  - !ruby/object:Gem::Version
192
- version: '0.67'
204
+ version: '1.20'
193
205
  - !ruby/object:Gem::Dependency
194
206
  name: rubocop-github
195
207
  requirement: !ruby/object:Gem::Requirement
@@ -210,14 +222,14 @@ dependencies:
210
222
  requirements:
211
223
  - - "~>"
212
224
  - !ruby/object:Gem::Version
213
- version: 10.0.0
225
+ version: 11.0.1
214
226
  type: :development
215
227
  prerelease: false
216
228
  version_requirements: !ruby/object:Gem::Requirement
217
229
  requirements:
218
230
  - - "~>"
219
231
  - !ruby/object:Gem::Version
220
- version: 10.0.0
232
+ version: 11.0.1
221
233
  description: Licensed automates extracting and validating the licenses of dependencies.
222
234
  email:
223
235
  - opensource+licensed@github.com
@@ -226,12 +238,6 @@ executables:
226
238
  extensions: []
227
239
  extra_rdoc_files: []
228
240
  files:
229
- - ".github/workflows/release.yml"
230
- - ".github/workflows/test.yml"
231
- - ".gitignore"
232
- - ".licensed.yml"
233
- - ".rubocop.yml"
234
- - ".ruby-version"
235
241
  - CHANGELOG.md
236
242
  - CODE_OF_CONDUCT.md
237
243
  - CONTRIBUTING.md
@@ -239,7 +245,6 @@ files:
239
245
  - LICENSE
240
246
  - README.md
241
247
  - Rakefile
242
- - docker/Dockerfile.build-linux
243
248
  - docs/adding_a_new_source.md
244
249
  - docs/commands/README.md
245
250
  - docs/commands/cache.md
@@ -267,6 +272,7 @@ files:
267
272
  - docs/sources/bower.md
268
273
  - docs/sources/bundler.md
269
274
  - docs/sources/cabal.md
275
+ - docs/sources/cargo.md
270
276
  - docs/sources/composer.md
271
277
  - docs/sources/dep.md
272
278
  - docs/sources/git_submodule.md
@@ -310,8 +316,10 @@ files:
310
316
  - lib/licensed/sources.rb
311
317
  - lib/licensed/sources/bower.rb
312
318
  - lib/licensed/sources/bundler.rb
319
+ - lib/licensed/sources/bundler/definition.rb
313
320
  - lib/licensed/sources/bundler/missing_specification.rb
314
321
  - lib/licensed/sources/cabal.rb
322
+ - lib/licensed/sources/cargo.rb
315
323
  - lib/licensed/sources/composer.rb
316
324
  - lib/licensed/sources/dep.rb
317
325
  - lib/licensed/sources/git_submodule.rb
@@ -330,28 +338,6 @@ files:
330
338
  - lib/licensed/ui/shell.rb
331
339
  - lib/licensed/version.rb
332
340
  - licensed.gemspec
333
- - script/bootstrap
334
- - script/cibuild
335
- - script/console
336
- - script/package
337
- - script/packages/build
338
- - script/packages/linux
339
- - script/packages/mac
340
- - script/setup
341
- - script/source-setup/bower
342
- - script/source-setup/bundler
343
- - script/source-setup/cabal
344
- - script/source-setup/composer
345
- - script/source-setup/git_submodule
346
- - script/source-setup/go
347
- - script/source-setup/mix
348
- - script/source-setup/npm
349
- - script/source-setup/nuget
350
- - script/source-setup/pip
351
- - script/source-setup/pipenv
352
- - script/source-setup/swift
353
- - script/source-setup/yarn
354
- - script/test
355
341
  homepage: https://github.com/github/licensed
356
342
  licenses:
357
343
  - MIT
@@ -1,213 +0,0 @@
1
- name: Build and publish release assets
2
-
3
- on:
4
- release:
5
- types: [created]
6
- workflow_dispatch:
7
- inputs:
8
- version:
9
- description: 'Commit-like version of github/licensed to build package at'
10
- required: true
11
- release_tag:
12
- description: 'Release tag to upload built packages to'
13
- required: false
14
-
15
- jobs:
16
- vars:
17
- name: "Gather values for remainder of steps"
18
- runs-on: ubuntu-latest
19
- outputs:
20
- version: ${{ steps.get_version.outputs.result }}
21
- upload_url: ${{ steps.get_url.outputs.result }}
22
- ref: ${{ steps.get_ref.outputs.result }}
23
- steps:
24
- - id: get_version
25
- name: Get package version
26
- uses: actions/github-script@v3
27
- with:
28
- github-token: ${{ secrets.GITHUB_TOKEN }}
29
- result-encoding: string
30
- script: |
31
- let version = "${{ github.event.release.tag_name }}"
32
- if (!version) {
33
- version = "${{ github.event.inputs.version }}"
34
- }
35
-
36
- if (!version) {
37
- throw new Error("unable to find package build version")
38
- }
39
-
40
- return version
41
-
42
- - id: get_url
43
- name: Get release upload url
44
- uses: actions/github-script@v3
45
- with:
46
- github-token: ${{ secrets.GITHUB_TOKEN }}
47
- result-encoding: string
48
- script: |
49
- let uploadUrl = "${{ github.event.release.upload_url}}"
50
- const tag = "${{ github.event.inputs.release_tag }}"
51
- if (!uploadUrl && tag) {
52
- const { data: release } = await github.repos.getReleaseByTag({
53
- ...context.repo,
54
- tag
55
- })
56
-
57
- if (!release.upload_url) {
58
- throw new Error("unable to find a release upload url")
59
- }
60
-
61
- uploadUrl = release.upload_url
62
- }
63
-
64
- return uploadUrl
65
-
66
- - id: get_ref
67
- name: Get checkout ref for custom build scripts
68
- uses: actions/github-script@v3
69
- with:
70
- github-token: ${{ secrets.GITHUB_TOKEN }}
71
- result-encoding: string
72
- script: |
73
- let ref = "${{ github.event.release.tag_name }}"
74
- if (!ref) {
75
- ref = "${{ github.event.ref }}".replace(/refs\/[^\/]+\//, '')
76
- }
77
-
78
- if (!ref) {
79
- throw new Error("unable to find a ref for action")
80
- }
81
-
82
- return ref
83
-
84
- package_linux:
85
- needs: vars
86
- runs-on: ubuntu-18.04
87
- steps:
88
- - uses: actions/checkout@v2
89
- with:
90
- # checkout at the ref for the action, separate from the target build version
91
- # this allows running build scripts independent of the target version
92
- ref: ${{needs.vars.outputs.ref}}
93
- fetch-depth: 0
94
-
95
- - name: Set up Ruby 2.6
96
- uses: ruby/setup-ruby@v1
97
- with:
98
- ruby-version: 2.6
99
-
100
- - name: Build package
101
- run: script/packages/linux
102
- env:
103
- VERSION: ${{needs.vars.outputs.version}}
104
-
105
- - uses: actions/upload-artifact@v2
106
- with:
107
- name: ${{needs.vars.outputs.version}}-linux
108
- path: pkg/${{needs.vars.outputs.version}}/licensed-${{needs.vars.outputs.version}}-linux-x64.tar.gz
109
-
110
- package_mac:
111
- needs: vars
112
- runs-on: macOS-latest
113
- steps:
114
- - uses: actions/checkout@v2
115
- with:
116
- # checkout at the ref for the action, separate from the target build version
117
- # this allows running build scripts independent of the target version
118
- ref: ${{needs.vars.outputs.ref}}
119
- fetch-depth: 0
120
-
121
- - name: Set up Ruby 2.6
122
- uses: ruby/setup-ruby@v1
123
- with:
124
- ruby-version: 2.6
125
-
126
- - name: Build package
127
- run: script/packages/mac
128
- env:
129
- VERSION: ${{needs.vars.outputs.version}}
130
-
131
- - uses: actions/upload-artifact@v2
132
- with:
133
- name: ${{needs.vars.outputs.version}}-darwin
134
- path: pkg/${{needs.vars.outputs.version}}/licensed-${{needs.vars.outputs.version}}-darwin-x64.tar.gz
135
-
136
- build_gem:
137
- needs: vars
138
- runs-on: ubuntu-latest
139
- steps:
140
- - uses: actions/checkout@v2
141
- with:
142
- # building a gem doesn't use a different ref from the version input
143
- ref: ${{needs.vars.outputs.version}}
144
-
145
- - name: Set up Ruby 2.6
146
- uses: ruby/setup-ruby@v1
147
- with:
148
- ruby-version: 2.6
149
-
150
- - name: Build gem
151
- run: gem build licensed.gemspec -o licensed-${{needs.vars.outputs.version}}.gem
152
-
153
- - uses: actions/upload-artifact@v2
154
- with:
155
- name: ${{needs.vars.outputs.version}}-gem
156
- path: licensed-${{needs.vars.outputs.version}}.gem
157
-
158
- upload_packages:
159
- if: ${{ needs.vars.outputs.upload_url != '' }}
160
- runs-on: ubuntu-latest
161
- needs: [vars, package_linux, package_mac, build_gem]
162
-
163
- steps:
164
- - name: Set up Ruby 2.6
165
- uses: ruby/setup-ruby@v1
166
- with:
167
- ruby-version: 2.6
168
-
169
- - name: Download linux package
170
- uses: actions/download-artifact@v2
171
- with:
172
- name: ${{needs.vars.outputs.version}}-linux
173
-
174
- - name: Download macOS package
175
- uses: actions/download-artifact@v2
176
- with:
177
- name: ${{needs.vars.outputs.version}}-darwin
178
-
179
- - name: Download gem
180
- uses: actions/download-artifact@v2
181
- with:
182
- name: ${{needs.vars.outputs.version}}-gem
183
-
184
- - name: Publish linux package
185
- uses: actions/upload-release-asset@v1
186
- env:
187
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
188
- with:
189
- upload_url: ${{ needs.vars.outputs.upload_url }}
190
- asset_path: ./licensed-${{needs.vars.outputs.version}}-linux-x64.tar.gz
191
- asset_name: licensed-${{needs.vars.outputs.version}}-linux-x64.tar.gz
192
- asset_content_type: application/gzip
193
-
194
- - name: Publish mac package
195
- uses: actions/upload-release-asset@v1
196
- env:
197
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
198
- with:
199
- upload_url: ${{ needs.vars.outputs.upload_url }}
200
- asset_path: ./licensed-${{needs.vars.outputs.version}}-darwin-x64.tar.gz
201
- asset_name: licensed-${{needs.vars.outputs.version}}-darwin-x64.tar.gz
202
- asset_content_type: application/gzip
203
-
204
- - name: Publish gem to RubyGems
205
- run: |
206
- mkdir -p $HOME/.gem
207
- touch $HOME/.gem/credentials
208
- chmod 0600 $HOME/.gem/credentials
209
- printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
210
- gem push $GEM
211
- env:
212
- RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
213
- GEM: licensed-${{needs.vars.outputs.version}}.gem