cocoapods-gitlab_license_report 1.0.1 → 1.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87ca5aa111e348e704356069cac17f5a200d37e5e64905cf888d94312a661cbd
|
4
|
+
data.tar.gz: d16b9ca9e71dbccb97547407bae3197a397263ea7add9969dc0363a78e2bac88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a1a420102478871d6313c5e67f1d2f205caab94ca06c8866c983b6bee80bbcf3f425b87af2f4660f6689c93b40b45e7099aa997b53a6c3edf321b92204d86c6
|
7
|
+
data.tar.gz: 4aa9084745119f6e803f489b2b18d46ef29762be2156e4896b5b36ee3599105633f3450e6c1a0c4826d5099aca4ef89aa167bf1236a06086d25e4db48c67af45
|
@@ -7,7 +7,9 @@ module CocoaPodsGitlabLicenseReport
|
|
7
7
|
def initialize(context, options, generator = nil)
|
8
8
|
@context = context
|
9
9
|
@options = options
|
10
|
-
|
10
|
+
sandbox = @context.sandbox if defined? @context.sandbox
|
11
|
+
sandbox ||= Pod::Sandbox.new(@context.sandbox_root)
|
12
|
+
@generator = generator || ReportGenerator.new(sandbox)
|
11
13
|
end
|
12
14
|
|
13
15
|
def handle!
|
@@ -16,11 +18,9 @@ module CocoaPodsGitlabLicenseReport
|
|
16
18
|
report_path = @options["report_path"] || 'reports/licenses.json'
|
17
19
|
excluded_pods = Set.new(@options["exclude"])
|
18
20
|
|
19
|
-
sandbox = @context.sandbox if defined? @context.sandbox
|
20
|
-
sandbox ||= Pod::Sandbox.new(@context.sandbox_root)
|
21
|
-
|
22
21
|
installed_specs = @context.umbrella_targets.flat_map(&:specs).map(&:root).uniq
|
23
|
-
licenses_report = @generator.generate(installed_specs, excluded_pods
|
22
|
+
licenses_report = @generator.generate(installed_specs, excluded_pods)
|
23
|
+
puts "fef"
|
24
24
|
|
25
25
|
Dir.mkdir File.dirname(report_path) unless File.exist? File.dirname(report_path)
|
26
26
|
File.write(report_path, licenses_report.to_json)
|
@@ -43,3 +43,4 @@ module CocoaPodsGitlabLicenseReport
|
|
43
43
|
handler.handle!
|
44
44
|
end
|
45
45
|
end
|
46
|
+
|
@@ -15,6 +15,7 @@ module CocoaPodsGitlabLicenseReport
|
|
15
15
|
specs.reject { |s| excluded.include? s.name }.each do |s|
|
16
16
|
license_name = s.license
|
17
17
|
license_name = license_name[:type] if license_name.is_a?(Hash)
|
18
|
+
next if license_name == nil
|
18
19
|
license = LicenseFinder::License.find_by_name(license_name)
|
19
20
|
|
20
21
|
dependencies << { :name => s.name,
|
@@ -28,7 +29,7 @@ module CocoaPodsGitlabLicenseReport
|
|
28
29
|
:url => license.url || "" }
|
29
30
|
end
|
30
31
|
|
31
|
-
{
|
32
|
+
report = {
|
32
33
|
:version => "2.1",
|
33
34
|
:licenses => licenses.values.sort_by {|v| v[:id]},
|
34
35
|
:dependencies => dependencies
|
@@ -37,3 +38,4 @@ module CocoaPodsGitlabLicenseReport
|
|
37
38
|
end
|
38
39
|
end
|
39
40
|
end
|
41
|
+
|