cocoapods-dependency-graph 1.0.4 → 1.0.5

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: ae7be43cdce09d85a4f675c8f68639f013c2869c3d2c9da225b967c23846a8ee
4
- data.tar.gz: 03c9cdd8119e2b582a43be9d59b5c9bef2f436b14e00c4282fc86acb669dc684
3
+ metadata.gz: 3675a97f47227784e54cb601ed261ece3ff44bc171466e837e8cf3ae96a67d07
4
+ data.tar.gz: 3d976e62cac690e1bef8575d71605c4816dbf0a9837861bbe0f038e21f5635cd
5
5
  SHA512:
6
- metadata.gz: cf4662b38eb0ae078d334c591f97cb8c1311c7384f092b6804d824b10d038ac9868669335c842544e52f54be2e7f5cae53c5a3207dd5e53306b345e136075fbd
7
- data.tar.gz: 81bbb1d418b684b1396102385f3eb52c163153b799935dc368ab07a95ce6df997966f3e5d74143db0efb63a36aafe8043a7e4de477a3c37b93f048ff42047b12
6
+ metadata.gz: 74eef795ccdb803cc35b2f2563b8214c0164da0de5307c5e96fa5126e3939a4b194bd186e1244c452b7e72e0f05f2e2c7c75c40d78010d8d0d29bea78693cb00
7
+ data.tar.gz: 36eeab68fdf139b18da4ae32914ebba19197b7e2fe937cd0b9b6b03a94f058653f8c7b8cc5e7c9225817a6452f1244bda132a8a626998c3417cf76a45067b2c8
@@ -1,3 +1,3 @@
1
1
  module CocoapodsDependencyGraph
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
@@ -5,8 +5,8 @@ module Dependency
5
5
  attr_accessor :workbook
6
6
  attr_accessor :worksheet
7
7
 
8
- def create_excel
9
- filename = 'cocoapods_dependency_list.xlsx'
8
+ def create_excel(target_label)
9
+ filename = "#{target_label}_dependency_list.xlsx"
10
10
  File.delete(filename) if File.file?(filename)
11
11
 
12
12
  @workbook = FastExcel.open(filename, constant_memory: true)
@@ -40,7 +40,7 @@ module Dependency
40
40
  # @param [Hash{<String, Specification>}] module_spec_hash
41
41
  #
42
42
  def generate(umbrella_target, module_spec_hash)
43
- create_excel
43
+ create_excel(umbrella_target.cocoapods_target_label)
44
44
  create_title
45
45
  create_content(umbrella_target.specs)
46
46
  close_excel
@@ -33,7 +33,8 @@ module Dependency
33
33
  dfs_graph(root_node, umbrella_target.specs)
34
34
 
35
35
  @graph.print_dotted_on
36
- @graph.write_to_graphic_file('jpg')
36
+ dot_file = "#{target_name}_dependency_graph"
37
+ @graph.write_to_graphic_file('png', dot_file)
37
38
  end
38
39
  end
39
40
  end
@@ -25,7 +25,7 @@ module Dependency
25
25
  target_name = umbrella_target.cocoapods_target_label
26
26
  dependency_hash = create_hash(target_name, umbrella_target.specs)
27
27
  # puts dependency_hash.to_json
28
- File.open("cocoapods_dependency_json.json","w") do |f|
28
+ File.open("#{target_name}_dependency_json.json","w") do |f|
29
29
  f.write(dependency_hash.to_json)
30
30
  end
31
31
  end
@@ -49,9 +49,15 @@ module Dependency
49
49
  unless umbrella_targets.length() > 0
50
50
  puts "No target detected"
51
51
  end
52
-
53
- umbrella_target = umbrella_targets[0]
54
52
 
53
+ umbrella_targets.each { |target|
54
+ next if target.cocoapods_target_label.end_with?("Tests")
55
+ generate_graph_for_target(target)
56
+ }
57
+ end
58
+
59
+ # @param [UmbrellaTargetDescription] umbrella_target
60
+ def generate_graph_for_target(umbrella_target)
55
61
  module_spec_hash = {}
56
62
  umbrella_target.specs.each { | spec |
57
63
  module_spec_hash[spec.name] = spec
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-dependency-graph
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rongyan Zheng
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-28 00:00:00.000000000 Z
11
+ date: 2020-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler