cocoapods-jyanalyzer 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e773a5bc5378f554be194194224b350a404dfbc16620c871f1b1219f8c5341f
4
- data.tar.gz: 891dbfa3284b0f560519b022ea6a49ca6c9c4220a29b139f9e69a27d22ac1950
3
+ metadata.gz: f9f3fc256393d91524a2b147e54448d0b3f41121f1d5caf6c911dc2e2f2698d2
4
+ data.tar.gz: 36a4be6e378bbfe8150f4d07d8fb7180b1d83f4cfe06fd375cf2960399ecbe5d
5
5
  SHA512:
6
- metadata.gz: 9cad2e2f6a1f31faa793c8e074c908cc83b2401e1d1b11a5fd1baccadda45e03bed1f04842697ad23df5e3cb7632de784610e8a341cccd1871793dea6f932c54
7
- data.tar.gz: 8e1ab511b267b4e4ae5195065949fdf7274f9e264b999c85cfdf40656c2674c8bc2c5da3fcad02fba0e557d3a843e1afeb2c1582e0efdb416f39d0fb9bed8aa0
6
+ metadata.gz: 53e600d17f2647468b483a88342f54c060d5e94ba6713070472c284dddad45a8f9e55f9ea3365a4a988dee5922bc299c65fb9788fadb312fdbf8266c2c7a0ad6
7
+ data.tar.gz: 8e32762f7cdaa06179fb531668d4a4857eb12db864cf02e831b5b9113fef62e68baee5d625bae3cfddb37d266d70dce04c86c56218041fb41da5b8ad4e390342
@@ -6,6 +6,7 @@ module Pod
6
6
  require 'cocoapods-jyanalyzer/command/jyanalyzer/recursion'
7
7
  require 'cocoapods-jyanalyzer/command/jyanalyzer/depend'
8
8
  require 'cocoapods-jyanalyzer/command/jyanalyzer/component'
9
+ require 'cocoapods-jyanalyzer/command/jyanalyzer/list'
9
10
 
10
11
  self.abstract_command = true
11
12
  self.default_subcommand = 'app'
@@ -14,7 +15,7 @@ module Pod
14
15
  self.description = <<-DESC
15
16
  哈啰pod依赖分析:recursion、app 、component 这是给服务端用的,请勿使用
16
17
 
17
- 本地使用 depend 命令即可
18
+ 本地使用 depend 命令获取完整依赖关系,list获取pod 依赖的库名列表
18
19
  DESC
19
20
  end
20
21
  end
@@ -0,0 +1,57 @@
1
+ require 'net/http'
2
+ require 'json'
3
+ require 'openssl'
4
+
5
+ module Pod
6
+ class Command
7
+ class Jyanalyzer
8
+ class List < Jyanalyzer
9
+ include RepoUpdate
10
+ include ProjectDirectory
11
+
12
+ self.summary = '本地使用:查看app依赖库名列表,pod jyanalyzer list'
13
+
14
+ self.arguments = [
15
+ CLAide::Argument.new('POD_NAMES', false, true),
16
+ ]
17
+ def initialize(argv)
18
+ @pods = argv.arguments!
19
+ super
20
+ end
21
+ def run
22
+
23
+ verify_podfile_exists!
24
+ installer = installer_for_config
25
+ installer.repo_update = repo_update?(:default => true)
26
+ UI.puts 'Update all pods'.yellow
27
+ installer.update = true
28
+ installer.prepare
29
+ installer.resolve_dependencies
30
+ pod_targets = installer.pod_targets;
31
+
32
+ Pod::UI.puts '查看app依赖库名列表,pod jyanalyzer list'
33
+
34
+ text = recursion_dependencies(pod_targets)
35
+ Pod::UI.puts text
36
+
37
+ f=File.new("dependencies.json","w+")
38
+ f.puts(JSON.pretty_generate(text))
39
+ f.close
40
+
41
+ end
42
+
43
+ def recursion_dependencies(pod_targets)
44
+ text = {}
45
+ dependent_targets = pod_targets
46
+ dependent_targets.each do |item|
47
+ text[item.pod_name]=item.version
48
+ end
49
+ return text
50
+
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+
57
+
@@ -1,3 +1,3 @@
1
1
  module CocoapodsJyanalyzer
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-jyanalyzer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - leo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-05 00:00:00.000000000 Z
11
+ date: 2020-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -51,6 +51,7 @@ files:
51
51
  - lib/cocoapods-jyanalyzer/command/jyanalyzer/app.rb
52
52
  - lib/cocoapods-jyanalyzer/command/jyanalyzer/component.rb
53
53
  - lib/cocoapods-jyanalyzer/command/jyanalyzer/depend.rb
54
+ - lib/cocoapods-jyanalyzer/command/jyanalyzer/list.rb
54
55
  - lib/cocoapods-jyanalyzer/command/jyanalyzer/recursion.rb
55
56
  - lib/cocoapods-jyanalyzer/gem_version.rb
56
57
  - lib/cocoapods_plugin.rb