licensed 3.7.2 → 3.7.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 31f187eacefe804712d35112ff72bc25e5d4cdd8696ac529327689999de6160e
4
- data.tar.gz: 6154eb5ff6efebaf727da8b03315dd7eed04b96911c9e43a81569138a39d0497
3
+ metadata.gz: 1002bceeb85db079486f7cbde9c09638362fc03b287c15822fcc7e4e250a1c6d
4
+ data.tar.gz: acb2c626b8efd7573e32efef91a3c68b93c5aeee07580d874d58ce1326ee5aa8
5
5
  SHA512:
6
- metadata.gz: e433eac2fa6ae6b394f6919fabb2c7f7b38fe335619cd13d392ce8bd208a9d6be06016789ba563660acf31110548daa2d3ebac306115dc01b3c3bb11d88f21d9
7
- data.tar.gz: 2fab2eac0cce0339c50d8a7242cd29627ec2bdce027104dfec70c405cc0e3b1e50961ead3a6375d2cbd8476703c8af03dd7957fd0762f6794855caa47c1a2e73
6
+ metadata.gz: fb16460e74fd404c19e3a977c9fc125f91ef2b96f04952aac6aa46da8dc5981d9bcfb556cd2db2503e0d36ce7a78278e57532005e54384069e632d62cd7181de
7
+ data.tar.gz: e1d0b1df753a9dcc0c6b488cdbfef416d776edd8e3128363a46722f43be2178f939e6cbef71a645d944049619d058c3df7f291e2b3779f32046f094726ca95f4
data/CHANGELOG.md CHANGED
@@ -6,6 +6,23 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## 3.7.4
10
+
11
+ ### Fixed
12
+
13
+ - Licenses for Python dependencies built with Hatchling are correctly found (https://github.com/github/licensed/pull/547)
14
+
15
+ ## 3.7.3
16
+
17
+ ### Fixed
18
+
19
+ - Swift test fixtures build artifacts are now ignored (:tada: @CvX https://github.com/github/licensed/pull/524)
20
+ - Running cargo test fixture setup no longer deletes test files (:tada: @CvX https://github.com/github/licensed/pull/525)
21
+ - Bundler test fixtures are compatible with latest macOS silicon(:tada: @CvX https://github.com/github/licensed/pull/528)
22
+ - Fix segfaults seen using licensed with ruby 3.0.4 (https://github.com/github/licensed/pull/530)
23
+ - Fix compatibility with latest versions of bundler 2.3 (https://github.com/github/licensed/pull/535)
24
+ - Fix compatibility with latest versions of bundler 2.3 (:tada: @CvX https://github.com/github/licensed/pull/522)
25
+
9
26
  ## 3.7.2
10
27
 
11
28
  ### Fixed
@@ -620,4 +637,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
620
637
 
621
638
  Initial release :tada:
622
639
 
623
- [Unreleased]: https://github.com/github/licensed/compare/3.7.2...HEAD
640
+ [Unreleased]: https://github.com/github/licensed/compare/3.7.4...HEAD
@@ -243,15 +243,16 @@ module Licensed
243
243
 
244
244
  # try to expand the source path for glob patterns
245
245
  expanded_source_paths = source_path_array.reduce(Set.new) do |matched_paths, pattern|
246
- current_matched_paths = if pattern.start_with?("!")
247
- # if the pattern is an exclusion, remove all matching files
248
- # from the result
249
- matched_paths - Dir.glob(pattern[1..-1])
250
- else
251
- # if the pattern is an inclusion, add all matching files
252
- # to the result
253
- matched_paths + Dir.glob(pattern)
254
- end
246
+ current_matched_paths =
247
+ if pattern.start_with?("!")
248
+ # if the pattern is an exclusion, remove all matching files
249
+ # from the result
250
+ matched_paths - Dir.glob(pattern[1..-1])
251
+ else
252
+ # if the pattern is an inclusion, add all matching files
253
+ # to the result
254
+ matched_paths + Dir.glob(pattern)
255
+ end
255
256
 
256
257
  current_matched_paths.select { |p| File.directory?(p) }
257
258
  end
@@ -19,7 +19,7 @@ module Licensed
19
19
  # app - An application configuration
20
20
  # report - A report containing information about the app evaluation
21
21
  def begin_report_app(app, report)
22
- shell.info "Checking cached dependency records for #{app["name"]}"
22
+ shell.info "Checking cached dependency records for #{app["name"]}"
23
23
  end
24
24
 
25
25
  # Reports any errors found when checking status, as well as
@@ -40,8 +40,15 @@ module Licensed
40
40
  end
41
41
 
42
42
  module LazySpecification
43
- def __materialize__
44
- spec = super
43
+ def materialize_for_installation(*args)
44
+ spec = super(*args)
45
+ return spec unless spec.is_a?(LazySpecification)
46
+
47
+ Licensed::Bundler::MissingSpecification.new(name: name, version: version, platform: platform, source: source)
48
+ end
49
+
50
+ def __materialize__(*args)
51
+ spec = super(*args)
45
52
  return spec if spec
46
53
 
47
54
  Licensed::Bundler::MissingSpecification.new(name: name, version: version, platform: platform, source: source)
@@ -20,12 +20,13 @@ module Licensed
20
20
  git_submodules_command.lines.map do |line|
21
21
  displaypath, toplevel, version, homepage = line.strip.split
22
22
  name = File.basename(displaypath)
23
- submodule_path = if toplevel == config.pwd.to_s
24
- name
25
- else
26
- parent = File.basename(toplevel)
27
- "#{submodule_paths[parent]}/#{name}"
28
- end
23
+ submodule_path =
24
+ if toplevel == config.pwd.to_s
25
+ name
26
+ else
27
+ parent = File.basename(toplevel)
28
+ "#{submodule_paths[parent]}/#{name}"
29
+ end
29
30
  submodule_paths[name] = submodule_path
30
31
 
31
32
  Licensed::Dependency.new(
@@ -36,11 +36,12 @@ module Licensed
36
36
 
37
37
  # Returns an array of dependency package import paths
38
38
  def packages
39
- dependency_packages = if go_version < Gem::Version.new("1.11.0")
40
- root_package_deps
41
- else
42
- go_list_deps
43
- end
39
+ dependency_packages =
40
+ if go_version < Gem::Version.new("1.11.0")
41
+ root_package_deps
42
+ else
43
+ go_list_deps
44
+ end
44
45
 
45
46
  # don't include go std packages
46
47
  # don't include packages under the root project that aren't vendored
@@ -27,14 +27,14 @@ module Licensed
27
27
  def version_strategy
28
28
  # default to git for backwards compatible behavior
29
29
  @version_strategy ||= begin
30
- case config.fetch("version_strategy", nil)
31
- when CONTENTS
32
- CONTENTS
33
- when GIT
34
- GIT
35
- else
36
- Licensed::Git.available? ? GIT : CONTENTS
37
- end
30
+ case config.fetch("version_strategy", nil)
31
+ when CONTENTS
32
+ CONTENTS
33
+ when GIT
34
+ GIT
35
+ else
36
+ Licensed::Git.available? ? GIT : CONTENTS
37
+ end
38
38
  end
39
39
  end
40
40
 
@@ -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
- license_files = File.join(dist_info, "license_files")
46
- return File.exist?(license_files) ? license_files : dist_info
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,
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Licensed
3
- VERSION = "3.7.2".freeze
3
+ VERSION = "3.7.4".freeze
4
4
 
5
5
  def self.previous_major_versions
6
6
  major_version = Gem::Version.new(Licensed::VERSION).segments.first
data/licensed.gemspec CHANGED
@@ -31,6 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.add_dependency "ruby-xxHash", "~> 0.4"
32
32
  spec.add_dependency "parallel", ">= 0.18.0"
33
33
  spec.add_dependency "reverse_markdown", ">= 1", "< 3"
34
+ spec.add_dependency "json", ">= 2.6.2"
34
35
 
35
36
  spec.add_development_dependency "rake", ">= 12.3.3"
36
37
  spec.add_development_dependency "minitest", "~> 5.8"
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.2
4
+ version: 3.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-02 00:00:00.000000000 Z
11
+ date: 2022-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: licensee
@@ -140,6 +140,20 @@ dependencies:
140
140
  - - "<"
141
141
  - !ruby/object:Gem::Version
142
142
  version: '3'
143
+ - !ruby/object:Gem::Dependency
144
+ name: json
145
+ requirement: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ version: 2.6.2
150
+ type: :runtime
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: 2.6.2
143
157
  - !ruby/object:Gem::Dependency
144
158
  name: rake
145
159
  requirement: !ruby/object:Gem::Requirement