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: 7648e78c10ae0a6fd7909eb0bc29047557d1f27edc30eb0cdd29e6f48e315f94
4
- data.tar.gz: 98dc7716b4470c6f6a943730a4c7907a76807b33131413bfa32986387acc10a0
3
+ metadata.gz: 87ca5aa111e348e704356069cac17f5a200d37e5e64905cf888d94312a661cbd
4
+ data.tar.gz: d16b9ca9e71dbccb97547407bae3197a397263ea7add9969dc0363a78e2bac88
5
5
  SHA512:
6
- metadata.gz: 6d6b8a506b9206a6977de734297b6c862fbf659c3d7cfc69c5d6d05fa4b8712630e882f2c55762afa82b77f20aad3088c7666f4cac1c9da835f97e724fa628eb
7
- data.tar.gz: '0779247b730dffc1107d0aea100f921dfac88f9e5633904d0af27ea805fe95619a57af8924fe8c321ca3481ae62f366c5ec928da65f4523f6bcdb9067e49a90e'
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
- @generator = generator || ReportGenerator.new(@context)
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, @context.sandbox)
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
+
@@ -1,3 +1,3 @@
1
1
  module CocoaPodsGitlabLicenseReport
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-gitlab_license_report
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabio Gallonetto