jmpod 0.2.5 → 0.2.6
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/jmpod/command/analyze.rb +15 -67
- data/lib/jmpod/command.rb +1 -1
- data/lib/jmpod/version.rb +1 -1
- metadata +2 -3
- data/lib/jmpod/command/dependency.rb +0 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c149657a53dfafa8b7c34a75c5d34177fe46a0bd57a3fb332fca4c3545f9fea1
|
4
|
+
data.tar.gz: 7de2b6c3c55ca864195c7e19911a87eef1c9e257cd1e31e1321287f6f1f4c64d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3af982b6113eff69162ee2600cc260a4ad53c731abc43e615c6d485dce1c0014e4afdc9c61a186739bfba6360d5e3e7a50633d7ce90c70940f8360e1ee2c08a
|
7
|
+
data.tar.gz: 67ab8567a230448d97e07002ae129ce9404a3f2330407d254c4ff1c1facc4a1987a715e8b3484e5a9a0515135901e4fef20e240179102693b3ef61d39aa7f512
|
data/Gemfile.lock
CHANGED
@@ -3,80 +3,28 @@ require 'pathname'
|
|
3
3
|
require 'tmpdir'
|
4
4
|
|
5
5
|
module Jmpod
|
6
|
-
class
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies_hash_array.each do |item|
|
16
|
-
next if item.class.name != 'Hash'
|
17
|
-
|
18
|
-
item.each do |name, _|
|
19
|
-
res.push name
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
res
|
25
|
-
end
|
26
|
-
|
27
|
-
def analyze_with_podfile(_podfile_dir_path, podfile, lockfile = nil)
|
28
|
-
if _podfile_dir_path
|
29
|
-
sandbox = Dir.mktmpdir
|
30
|
-
else
|
31
|
-
sandbox = Dir.pwd + '/Pods'
|
6
|
+
class Command
|
7
|
+
class Analyze < Command
|
8
|
+
self.summary = '分析podfile完整依赖链'
|
9
|
+
self.description = <<-DESC
|
10
|
+
分析podfile完整依赖链,并输出json文件.
|
11
|
+
DESC
|
12
|
+
|
13
|
+
def initialize(argv)
|
14
|
+
super
|
32
15
|
end
|
33
|
-
p 'sandbox === '
|
34
|
-
pp sandbox
|
35
|
-
an = Pod::Installer::Analyzer.new(Pod::Sandbox.new(sandbox), podfile)
|
36
|
-
pp an
|
37
|
-
# analyzer = Pod::Installer::Analyzer.new(
|
38
|
-
# Pod::Sandbox.new(sandbox),
|
39
|
-
# podfile,
|
40
|
-
# lockfile
|
41
|
-
# )
|
42
|
-
|
43
|
-
# specifications = analyzer.analyze.specifications.map(&:root).uniq
|
44
16
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
# new_map
|
49
|
-
end
|
50
|
-
|
51
|
-
def generate_pods_data(specs)
|
52
|
-
pods_and_deps_merged = specs.reduce({}) do |result, spec|
|
53
|
-
name = spec.to_s
|
54
|
-
result[name] ||= []
|
55
|
-
result[name].concat(spec.all_dependencies.map(&:to_s))
|
56
|
-
result
|
17
|
+
def self.options
|
18
|
+
[
|
19
|
+
].concat(super)
|
57
20
|
end
|
58
21
|
|
59
|
-
|
60
|
-
|
22
|
+
def validate!
|
23
|
+
super
|
61
24
|
end
|
62
|
-
YAMLHelper.sorted_array(pod_and_deps)
|
63
|
-
end
|
64
25
|
|
65
|
-
|
66
|
-
return unless map[name]
|
67
|
-
|
68
|
-
map[name].each do |k|
|
69
|
-
find_dependencies(k.name, map, res, dependencies_map, root_name)
|
70
|
-
dependency = dependencies_map[k.name.split('/')[0]]
|
71
|
-
res.push dependency.name if dependency && dependency.name != root_name
|
26
|
+
def run
|
72
27
|
end
|
73
|
-
res
|
74
28
|
end
|
75
|
-
|
76
|
-
def self.subspecs_with_name(spec, subspecs_short_names)
|
77
|
-
subspecs_short_names.map do |name|
|
78
|
-
spec.subspecs.find { |ss| ss.name.include? name }
|
79
|
-
end
|
80
|
-
end
|
81
29
|
end
|
82
30
|
end
|
data/lib/jmpod/command.rb
CHANGED
data/lib/jmpod/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jmpod
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jieming
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -127,7 +127,6 @@ files:
|
|
127
127
|
- lib/jmpod/command/create/oc.rb
|
128
128
|
- lib/jmpod/command/create/swift.rb
|
129
129
|
- lib/jmpod/command/create/third.rb
|
130
|
-
- lib/jmpod/command/dependency.rb
|
131
130
|
- lib/jmpod/command/init.rb
|
132
131
|
- lib/jmpod/command/init/ci.rb
|
133
132
|
- lib/jmpod/command/init/unit.rb
|
@@ -1,33 +0,0 @@
|
|
1
|
-
require 'pp'
|
2
|
-
require 'tmpdir'
|
3
|
-
require 'jmpod/command/analyze'
|
4
|
-
|
5
|
-
module Pod
|
6
|
-
class Command
|
7
|
-
class Dependency < Command
|
8
|
-
self.summary = '分析podfile完整依赖链'
|
9
|
-
self.description = <<-DESC
|
10
|
-
分析podfile完整依赖链,并输出json文件.
|
11
|
-
DESC
|
12
|
-
|
13
|
-
def initialize(argv)
|
14
|
-
super
|
15
|
-
end
|
16
|
-
|
17
|
-
def self.options
|
18
|
-
[
|
19
|
-
].concat(super)
|
20
|
-
end
|
21
|
-
|
22
|
-
def validate!
|
23
|
-
super
|
24
|
-
verify_podfile_exists!
|
25
|
-
end
|
26
|
-
|
27
|
-
def run
|
28
|
-
analyze_result = Jmpod::Analyzer.analyze_with_podfile(nil, config.podfile)
|
29
|
-
pp analyze_result
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|