licensed 3.7.3 → 3.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -1
- data/lib/licensed/sources/pip.rb +10 -4
- data/lib/licensed/version.rb +1 -1
- data/licensed.gemspec +0 -1
- metadata +2 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c460f79af039dfcd0059dafa8c1ce9ea096f5fc869c05ed374a61e9d1504520
|
4
|
+
data.tar.gz: 98729cb3117d5642fe1bb6b81a8b5f9781578751407f0425ea2ed0c5842ae0ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f5bd011838dc17f8bb74da74b0799da181419718bf96f55ac097af2a077546bba007a1efa2ec8613bd03f345c1f82bf5b97fcad64ebb140ef06a99210ee45db
|
7
|
+
data.tar.gz: 79b667beb6bde2a62ec1c53c706a5379f761bc9189f2fd6caf4da10e7e2ca51216f44816fc06721c023f81446c7f1a480ca482cc6b77f53af92dcb1943a535b5
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## 3.7.5
|
10
|
+
|
11
|
+
### Fixed
|
12
|
+
|
13
|
+
- Python dependency metadata will be correctly parsed from the ouput of `pip show` (https://github.com/github/licensed/pull/555)
|
14
|
+
|
15
|
+
## 3.7.4
|
16
|
+
|
17
|
+
### Fixed
|
18
|
+
|
19
|
+
- Licenses for Python dependencies built with Hatchling are correctly found (https://github.com/github/licensed/pull/547)
|
20
|
+
|
9
21
|
## 3.7.3
|
10
22
|
|
11
23
|
### Fixed
|
@@ -631,4 +643,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
631
643
|
|
632
644
|
Initial release :tada:
|
633
645
|
|
634
|
-
[Unreleased]: https://github.com/github/licensed/compare/3.7.
|
646
|
+
[Unreleased]: https://github.com/github/licensed/compare/3.7.5...HEAD
|
data/lib/licensed/sources/pip.rb
CHANGED
@@ -42,8 +42,12 @@ module Licensed
|
|
42
42
|
# folder per https://peps.python.org/pep-0639/
|
43
43
|
def package_license_location(package)
|
44
44
|
dist_info = File.join(package["Location"], package["Name"].gsub("-", "_") + "-" + package["Version"] + ".dist-info")
|
45
|
-
|
46
|
-
|
45
|
+
|
46
|
+
license_path = ["license_files", "licenses"]
|
47
|
+
.map { |directory| File.join(dist_info, directory) }
|
48
|
+
.find { |path| File.exist?(path) }
|
49
|
+
|
50
|
+
license_path || dist_info
|
47
51
|
end
|
48
52
|
|
49
53
|
# Returns parsed information for all packages used by the project,
|
@@ -70,11 +74,13 @@ module Licensed
|
|
70
74
|
# Returns a hash filled with package info parsed from the email-header formatted output
|
71
75
|
# returned by `pip show`
|
72
76
|
def parse_package_info(package_info)
|
73
|
-
package_info.lines.each_with_object(Hash.new(0))
|
77
|
+
package_info.lines.each_with_object(Hash.new(0)) do |pkg, a|
|
78
|
+
next if pkg.start_with?(/^\s/)
|
79
|
+
|
74
80
|
k, v = pkg.split(":", 2)
|
75
81
|
next if k.nil? || k.empty?
|
76
82
|
a[k.strip] = v&.strip
|
77
|
-
|
83
|
+
end
|
78
84
|
end
|
79
85
|
|
80
86
|
# Returns the output from `pip list --format=json`
|
data/lib/licensed/version.rb
CHANGED
data/licensed.gemspec
CHANGED
@@ -36,7 +36,6 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_development_dependency "rake", ">= 12.3.3"
|
37
37
|
spec.add_development_dependency "minitest", "~> 5.8"
|
38
38
|
spec.add_development_dependency "mocha", "~> 1.0"
|
39
|
-
spec.add_development_dependency "rubocop", "~> 1.26", "< 1.27"
|
40
39
|
spec.add_development_dependency "rubocop-github", "~> 0.6"
|
41
40
|
spec.add_development_dependency "byebug", "~> 11.1.3"
|
42
41
|
end
|
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.7.
|
4
|
+
version: 3.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: licensee
|
@@ -196,26 +196,6 @@ dependencies:
|
|
196
196
|
- - "~>"
|
197
197
|
- !ruby/object:Gem::Version
|
198
198
|
version: '1.0'
|
199
|
-
- !ruby/object:Gem::Dependency
|
200
|
-
name: rubocop
|
201
|
-
requirement: !ruby/object:Gem::Requirement
|
202
|
-
requirements:
|
203
|
-
- - "~>"
|
204
|
-
- !ruby/object:Gem::Version
|
205
|
-
version: '1.26'
|
206
|
-
- - "<"
|
207
|
-
- !ruby/object:Gem::Version
|
208
|
-
version: '1.27'
|
209
|
-
type: :development
|
210
|
-
prerelease: false
|
211
|
-
version_requirements: !ruby/object:Gem::Requirement
|
212
|
-
requirements:
|
213
|
-
- - "~>"
|
214
|
-
- !ruby/object:Gem::Version
|
215
|
-
version: '1.26'
|
216
|
-
- - "<"
|
217
|
-
- !ruby/object:Gem::Version
|
218
|
-
version: '1.27'
|
219
199
|
- !ruby/object:Gem::Dependency
|
220
200
|
name: rubocop-github
|
221
201
|
requirement: !ruby/object:Gem::Requirement
|