mt_tool 0.1.3 → 1.0.0
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 +6 -1
- data/README.md +74 -10
- data/Rakefile +14 -1
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/lib/mt_tool/commands.rb +43 -229
- data/lib/mt_tool/module/module.rb +275 -0
- data/lib/mt_tool/module/template/swift/Entity.swift +15 -0
- data/lib/mt_tool/module/template/swift/Interactor.swift +16 -0
- data/lib/mt_tool/module/template/swift/Presenter.swift +28 -0
- data/lib/mt_tool/module/template/swift/Router.swift +50 -0
- data/lib/mt_tool/module/template/swift/ViewController.swift +97 -0
- data/lib/mt_tool/version.rb +1 -1
- data/mt_tool.gemspec +23 -26
- metadata +81 -111
- data/.MTModuleFilesConfig.yml +0 -5
- data/.idea/.gitignore +0 -8
- data/.idea/misc.xml +0 -4
- data/.idea/modules.xml +0 -8
- data/.idea/mt_tool.iml +0 -45
- data/.idea/vcs.xml +0 -7
- data/Gemfile.lock +0 -134
- data/lib/mt_tool/analyze.rb +0 -126
- data/lib/mt_tool/template/objc/Bundle.h +0 -21
- data/lib/mt_tool/template/objc/Bundle.m +0 -28
- data/lib/mt_tool/template/objc/CategoryHeader.h +0 -15
- data/lib/mt_tool/template/objc/PrefixHeader.pch +0 -36
- data/lib/mt_tool/template/objc/RouterDefine.h +0 -14
- data/lib/mt_tool/template/objc/RouterRegister.h +0 -16
- data/lib/mt_tool/template/objc/RouterRegister.m +0 -33
- data/lib/mt_tool/template/objc/ServiceProtocol.h +0 -15
- data/lib/mt_tool/template/objc/ServiceRegister.h +0 -16
- data/lib/mt_tool/template/objc/ServiceRegister.m +0 -25
- data/lib/mt_tool/template/objc/ToolsHeader.h +0 -13
- data/lib/mt_tool/template/objc/VendorHeader.h +0 -13
- data/lib/mt_tool/template/objc/demo/DemoViewController.h +0 -17
- data/lib/mt_tool/template/objc/demo/DemoViewController.m +0 -28
- data/lib/mt_tool/template/objc/demo/DemoViewModel.h +0 -14
- data/lib/mt_tool/template/objc/demo/DemoViewModel.m +0 -19
- data/sig/mt_tool.rbs +0 -4
- /data/lib/mt_tool/{template → module/template}/swift/RouterDefine.swift +0 -0
metadata
CHANGED
@@ -1,197 +1,183 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mt_tool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LyleLH
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: thor
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
-
type: :
|
19
|
+
version: '1.2'
|
20
|
+
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '1.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: xcodeproj
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
34
|
-
type: :
|
33
|
+
version: '1.22'
|
34
|
+
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '1.22'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: colored
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
48
|
-
type: :
|
47
|
+
version: '1.2'
|
48
|
+
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '1.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: colored2
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rspec
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
59
|
- - "~>"
|
74
60
|
- !ruby/object:Gem::Version
|
75
|
-
version: '3.
|
76
|
-
type: :
|
61
|
+
version: '3.1'
|
62
|
+
type: :runtime
|
77
63
|
prerelease: false
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
79
65
|
requirements:
|
80
66
|
- - "~>"
|
81
67
|
- !ruby/object:Gem::Version
|
82
|
-
version: '3.
|
68
|
+
version: '3.1'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
70
|
+
name: pathname
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
86
72
|
requirements:
|
87
|
-
- - "
|
73
|
+
- - "~>"
|
88
74
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :
|
75
|
+
version: '0.2'
|
76
|
+
type: :runtime
|
91
77
|
prerelease: false
|
92
78
|
version_requirements: !ruby/object:Gem::Requirement
|
93
79
|
requirements:
|
94
|
-
- - "
|
80
|
+
- - "~>"
|
95
81
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
82
|
+
version: '0.2'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
84
|
+
name: mustache
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
100
86
|
requirements:
|
101
|
-
- - "
|
87
|
+
- - "~>"
|
102
88
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
104
|
-
type: :
|
89
|
+
version: '1.1'
|
90
|
+
type: :runtime
|
105
91
|
prerelease: false
|
106
92
|
version_requirements: !ruby/object:Gem::Requirement
|
107
93
|
requirements:
|
108
|
-
- - "
|
94
|
+
- - "~>"
|
109
95
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
96
|
+
version: '1.1'
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
98
|
+
name: activesupport
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
114
100
|
requirements:
|
115
|
-
- - "
|
101
|
+
- - "~>"
|
116
102
|
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :
|
103
|
+
version: '7.0'
|
104
|
+
type: :runtime
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
107
|
requirements:
|
122
|
-
- - "
|
108
|
+
- - "~>"
|
123
109
|
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
110
|
+
version: '7.0'
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
112
|
name: bundler
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
128
114
|
requirements:
|
129
|
-
- - "
|
115
|
+
- - "~>"
|
130
116
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
132
|
-
type: :
|
117
|
+
version: '2.3'
|
118
|
+
type: :development
|
133
119
|
prerelease: false
|
134
120
|
version_requirements: !ruby/object:Gem::Requirement
|
135
121
|
requirements:
|
136
|
-
- - "
|
122
|
+
- - "~>"
|
137
123
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
124
|
+
version: '2.3'
|
139
125
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
126
|
+
name: rake
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|
142
128
|
requirements:
|
143
|
-
- - "
|
129
|
+
- - "~>"
|
144
130
|
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
146
|
-
type: :
|
131
|
+
version: '13.0'
|
132
|
+
type: :development
|
147
133
|
prerelease: false
|
148
134
|
version_requirements: !ruby/object:Gem::Requirement
|
149
135
|
requirements:
|
150
|
-
- - "
|
136
|
+
- - "~>"
|
151
137
|
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
138
|
+
version: '13.0'
|
153
139
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
140
|
+
name: rspec
|
155
141
|
requirement: !ruby/object:Gem::Requirement
|
156
142
|
requirements:
|
157
|
-
- - "
|
143
|
+
- - "~>"
|
158
144
|
- !ruby/object:Gem::Version
|
159
|
-
version: '
|
160
|
-
type: :
|
145
|
+
version: '3.12'
|
146
|
+
type: :development
|
161
147
|
prerelease: false
|
162
148
|
version_requirements: !ruby/object:Gem::Requirement
|
163
149
|
requirements:
|
164
|
-
- - "
|
150
|
+
- - "~>"
|
165
151
|
- !ruby/object:Gem::Version
|
166
|
-
version: '
|
152
|
+
version: '3.12'
|
167
153
|
- !ruby/object:Gem::Dependency
|
168
|
-
name:
|
154
|
+
name: pry
|
169
155
|
requirement: !ruby/object:Gem::Requirement
|
170
156
|
requirements:
|
171
|
-
- - "
|
157
|
+
- - "~>"
|
172
158
|
- !ruby/object:Gem::Version
|
173
|
-
version: '0'
|
174
|
-
type: :
|
159
|
+
version: '0.14'
|
160
|
+
type: :development
|
175
161
|
prerelease: false
|
176
162
|
version_requirements: !ruby/object:Gem::Requirement
|
177
163
|
requirements:
|
178
|
-
- - "
|
164
|
+
- - "~>"
|
179
165
|
- !ruby/object:Gem::Version
|
180
|
-
version: '0'
|
166
|
+
version: '0.14'
|
181
167
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
168
|
+
name: pry-byebug
|
183
169
|
requirement: !ruby/object:Gem::Requirement
|
184
170
|
requirements:
|
185
|
-
- - "
|
171
|
+
- - "~>"
|
186
172
|
- !ruby/object:Gem::Version
|
187
|
-
version: '
|
188
|
-
type: :
|
173
|
+
version: '3.10'
|
174
|
+
type: :development
|
189
175
|
prerelease: false
|
190
176
|
version_requirements: !ruby/object:Gem::Requirement
|
191
177
|
requirements:
|
192
|
-
- - "
|
178
|
+
- - "~>"
|
193
179
|
- !ruby/object:Gem::Version
|
194
|
-
version: '
|
180
|
+
version: '3.10'
|
195
181
|
description: 常用工具 -- 快速创建模版代码.
|
196
182
|
email:
|
197
183
|
- v2top1lyle@gmail.com
|
@@ -200,42 +186,26 @@ executables:
|
|
200
186
|
extensions: []
|
201
187
|
extra_rdoc_files: []
|
202
188
|
files:
|
203
|
-
- ".MTModuleFilesConfig.yml"
|
204
|
-
- ".idea/.gitignore"
|
205
|
-
- ".idea/misc.xml"
|
206
|
-
- ".idea/modules.xml"
|
207
|
-
- ".idea/mt_tool.iml"
|
208
|
-
- ".idea/vcs.xml"
|
209
189
|
- Gemfile
|
210
|
-
- Gemfile.lock
|
211
190
|
- README.md
|
212
191
|
- Rakefile
|
192
|
+
- bin/console
|
213
193
|
- bin/mt_tool
|
194
|
+
- bin/setup
|
214
195
|
- lib/mt_tool.rb
|
215
|
-
- lib/mt_tool/analyze.rb
|
216
196
|
- lib/mt_tool/commands.rb
|
217
|
-
- lib/mt_tool/
|
218
|
-
- lib/mt_tool/template/
|
219
|
-
- lib/mt_tool/template/
|
220
|
-
- lib/mt_tool/template/
|
221
|
-
- lib/mt_tool/template/
|
222
|
-
- lib/mt_tool/template/
|
223
|
-
- lib/mt_tool/template/
|
224
|
-
- lib/mt_tool/template/objc/ServiceProtocol.h
|
225
|
-
- lib/mt_tool/template/objc/ServiceRegister.h
|
226
|
-
- lib/mt_tool/template/objc/ServiceRegister.m
|
227
|
-
- lib/mt_tool/template/objc/ToolsHeader.h
|
228
|
-
- lib/mt_tool/template/objc/VendorHeader.h
|
229
|
-
- lib/mt_tool/template/objc/demo/DemoViewController.h
|
230
|
-
- lib/mt_tool/template/objc/demo/DemoViewController.m
|
231
|
-
- lib/mt_tool/template/objc/demo/DemoViewModel.h
|
232
|
-
- lib/mt_tool/template/objc/demo/DemoViewModel.m
|
233
|
-
- lib/mt_tool/template/swift/RouterDefine.swift
|
197
|
+
- lib/mt_tool/module/module.rb
|
198
|
+
- lib/mt_tool/module/template/swift/Entity.swift
|
199
|
+
- lib/mt_tool/module/template/swift/Interactor.swift
|
200
|
+
- lib/mt_tool/module/template/swift/Presenter.swift
|
201
|
+
- lib/mt_tool/module/template/swift/Router.swift
|
202
|
+
- lib/mt_tool/module/template/swift/RouterDefine.swift
|
203
|
+
- lib/mt_tool/module/template/swift/ViewController.swift
|
234
204
|
- lib/mt_tool/version.rb
|
235
205
|
- mt_tool.gemspec
|
236
|
-
- sig/mt_tool.rbs
|
237
206
|
homepage: https://github.com/lyleLH/mt_tool
|
238
|
-
licenses:
|
207
|
+
licenses:
|
208
|
+
- MIT
|
239
209
|
metadata:
|
240
210
|
homepage_uri: https://github.com/lyleLH/mt_tool
|
241
211
|
source_code_uri: https://github.com/lyleLH/mt_tool
|
@@ -254,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
254
224
|
- !ruby/object:Gem::Version
|
255
225
|
version: '0'
|
256
226
|
requirements: []
|
257
|
-
rubygems_version: 3.
|
227
|
+
rubygems_version: 3.4.10
|
258
228
|
signing_key:
|
259
229
|
specification_version: 4
|
260
230
|
summary: 常用工具.
|
data/.MTModuleFilesConfig.yml
DELETED
data/.idea/.gitignore
DELETED
data/.idea/misc.xml
DELETED
data/.idea/modules.xml
DELETED
data/.idea/mt_tool.iml
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<module type="RUBY_MODULE" version="4">
|
3
|
-
<component name="ModuleRunConfigurationManager">
|
4
|
-
<shared />
|
5
|
-
</component>
|
6
|
-
<component name="NewModuleRootManager">
|
7
|
-
<content url="file://$MODULE_DIR$">
|
8
|
-
<sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
|
9
|
-
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
10
|
-
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
11
|
-
</content>
|
12
|
-
<orderEntry type="inheritedJdk" />
|
13
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
14
|
-
<orderEntry type="library" scope="PROVIDED" name="CFPropertyList (v3.0.5, RVM: ruby-2.7.2) [gem]" level="application" />
|
15
|
-
<orderEntry type="library" scope="PROVIDED" name="addressable (v2.8.0, RVM: ruby-2.7.2) [gem]" level="application" />
|
16
|
-
<orderEntry type="library" scope="PROVIDED" name="algoliasearch (v1.27.5, RVM: ruby-2.7.2) [gem]" level="application" />
|
17
|
-
<orderEntry type="library" scope="PROVIDED" name="atomos (v0.1.3, RVM: ruby-2.7.2) [gem]" level="application" />
|
18
|
-
<orderEntry type="library" scope="PROVIDED" name="claide (v1.1.0, RVM: ruby-2.7.2) [gem]" level="application" />
|
19
|
-
<orderEntry type="library" scope="PROVIDED" name="colored (v1.2, RVM: ruby-2.7.2) [gem]" level="application" />
|
20
|
-
<orderEntry type="library" scope="PROVIDED" name="colored2 (v3.1.2, RVM: ruby-2.7.2) [gem]" level="application" />
|
21
|
-
<orderEntry type="library" scope="PROVIDED" name="escape (v0.0.4, RVM: ruby-2.7.2) [gem]" level="application" />
|
22
|
-
<orderEntry type="library" scope="PROVIDED" name="ethon (v0.15.0, RVM: ruby-2.7.2) [gem]" level="application" />
|
23
|
-
<orderEntry type="library" scope="PROVIDED" name="ffi (v1.15.5, RVM: ruby-2.7.2) [gem]" level="application" />
|
24
|
-
<orderEntry type="library" scope="PROVIDED" name="fourflusher (v2.3.1, RVM: ruby-2.7.2) [gem]" level="application" />
|
25
|
-
<orderEntry type="library" scope="PROVIDED" name="fuzzy_match (v2.0.4, RVM: ruby-2.7.2) [gem]" level="application" />
|
26
|
-
<orderEntry type="library" scope="PROVIDED" name="gh_inspector (v1.1.3, RVM: ruby-2.7.2) [gem]" level="application" />
|
27
|
-
<orderEntry type="library" scope="PROVIDED" name="httpclient (v2.8.3, RVM: ruby-2.7.2) [gem]" level="application" />
|
28
|
-
<orderEntry type="library" scope="PROVIDED" name="i18n (v1.10.0, RVM: ruby-2.7.2) [gem]" level="application" />
|
29
|
-
<orderEntry type="library" scope="PROVIDED" name="json (v2.6.1, RVM: ruby-2.7.2) [gem]" level="application" />
|
30
|
-
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.15.0, RVM: ruby-2.7.2) [gem]" level="application" />
|
31
|
-
<orderEntry type="library" scope="PROVIDED" name="nanaimo (v0.3.0, RVM: ruby-2.7.2) [gem]" level="application" />
|
32
|
-
<orderEntry type="library" scope="PROVIDED" name="nap (v1.1.0, RVM: ruby-2.7.2) [gem]" level="application" />
|
33
|
-
<orderEntry type="library" scope="PROVIDED" name="netrc (v0.11.0, RVM: ruby-2.7.2) [gem]" level="application" />
|
34
|
-
<orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.5, RVM: ruby-2.7.2) [gem]" level="application" />
|
35
|
-
<orderEntry type="library" scope="PROVIDED" name="ruby-macho (v2.5.1, RVM: ruby-2.7.2) [gem]" level="application" />
|
36
|
-
<orderEntry type="library" scope="PROVIDED" name="thor (v1.2.1, RVM: ruby-2.7.2) [gem]" level="application" />
|
37
|
-
<orderEntry type="library" scope="PROVIDED" name="typhoeus (v1.4.0, RVM: ruby-2.7.2) [gem]" level="application" />
|
38
|
-
<orderEntry type="library" scope="PROVIDED" name="xcodeproj (v1.21.0, RVM: ruby-2.7.2) [gem]" level="application" />
|
39
|
-
</component>
|
40
|
-
<component name="RakeTasksCache">
|
41
|
-
<option name="myRootTask">
|
42
|
-
<RakeTaskImpl id="rake" />
|
43
|
-
</option>
|
44
|
-
</component>
|
45
|
-
</module>
|
data/.idea/vcs.xml
DELETED
data/Gemfile.lock
DELETED
@@ -1,134 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
mt_tool (0.1.3)
|
5
|
-
bundler
|
6
|
-
colored
|
7
|
-
pathname
|
8
|
-
thor
|
9
|
-
xcodeproj
|
10
|
-
|
11
|
-
GEM
|
12
|
-
remote: https://rubygems.org/
|
13
|
-
specs:
|
14
|
-
CFPropertyList (3.0.5)
|
15
|
-
rexml
|
16
|
-
activesupport (6.1.5)
|
17
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
|
-
i18n (>= 1.6, < 2)
|
19
|
-
minitest (>= 5.1)
|
20
|
-
tzinfo (~> 2.0)
|
21
|
-
zeitwerk (~> 2.3)
|
22
|
-
addressable (2.8.0)
|
23
|
-
public_suffix (>= 2.0.2, < 5.0)
|
24
|
-
algoliasearch (1.27.5)
|
25
|
-
httpclient (~> 2.8, >= 2.8.3)
|
26
|
-
json (>= 1.5.1)
|
27
|
-
atomos (0.1.3)
|
28
|
-
claide (1.1.0)
|
29
|
-
cocoapods (1.11.3)
|
30
|
-
addressable (~> 2.8)
|
31
|
-
claide (>= 1.0.2, < 2.0)
|
32
|
-
cocoapods-core (= 1.11.3)
|
33
|
-
cocoapods-deintegrate (>= 1.0.3, < 2.0)
|
34
|
-
cocoapods-downloader (>= 1.4.0, < 2.0)
|
35
|
-
cocoapods-plugins (>= 1.0.0, < 2.0)
|
36
|
-
cocoapods-search (>= 1.0.0, < 2.0)
|
37
|
-
cocoapods-trunk (>= 1.4.0, < 2.0)
|
38
|
-
cocoapods-try (>= 1.1.0, < 2.0)
|
39
|
-
colored2 (~> 3.1)
|
40
|
-
escape (~> 0.0.4)
|
41
|
-
fourflusher (>= 2.3.0, < 3.0)
|
42
|
-
gh_inspector (~> 1.0)
|
43
|
-
molinillo (~> 0.8.0)
|
44
|
-
nap (~> 1.0)
|
45
|
-
ruby-macho (>= 1.0, < 3.0)
|
46
|
-
xcodeproj (>= 1.21.0, < 2.0)
|
47
|
-
cocoapods-core (1.11.3)
|
48
|
-
activesupport (>= 5.0, < 7)
|
49
|
-
addressable (~> 2.8)
|
50
|
-
algoliasearch (~> 1.0)
|
51
|
-
concurrent-ruby (~> 1.1)
|
52
|
-
fuzzy_match (~> 2.0.4)
|
53
|
-
nap (~> 1.0)
|
54
|
-
netrc (~> 0.11)
|
55
|
-
public_suffix (~> 4.0)
|
56
|
-
typhoeus (~> 1.0)
|
57
|
-
cocoapods-deintegrate (1.0.5)
|
58
|
-
cocoapods-downloader (1.6.3)
|
59
|
-
cocoapods-plugins (1.0.0)
|
60
|
-
nap
|
61
|
-
cocoapods-search (1.0.1)
|
62
|
-
cocoapods-trunk (1.6.0)
|
63
|
-
nap (>= 0.8, < 2.0)
|
64
|
-
netrc (~> 0.11)
|
65
|
-
cocoapods-try (1.2.0)
|
66
|
-
colored (1.2)
|
67
|
-
colored2 (3.1.2)
|
68
|
-
concurrent-ruby (1.1.10)
|
69
|
-
diff-lcs (1.5.0)
|
70
|
-
escape (0.0.4)
|
71
|
-
ethon (0.15.0)
|
72
|
-
ffi (>= 1.15.0)
|
73
|
-
ffi (1.15.5)
|
74
|
-
fourflusher (2.3.1)
|
75
|
-
fuzzy_match (2.0.4)
|
76
|
-
gh_inspector (1.1.3)
|
77
|
-
httpclient (2.8.3)
|
78
|
-
i18n (1.10.0)
|
79
|
-
concurrent-ruby (~> 1.0)
|
80
|
-
json (2.6.1)
|
81
|
-
minitest (5.15.0)
|
82
|
-
molinillo (0.8.0)
|
83
|
-
nanaimo (0.3.0)
|
84
|
-
nap (1.1.0)
|
85
|
-
netrc (0.11.0)
|
86
|
-
pathname (0.2.0)
|
87
|
-
public_suffix (4.0.7)
|
88
|
-
rake (13.0.6)
|
89
|
-
rexml (3.2.5)
|
90
|
-
rspec (3.11.0)
|
91
|
-
rspec-core (~> 3.11.0)
|
92
|
-
rspec-expectations (~> 3.11.0)
|
93
|
-
rspec-mocks (~> 3.11.0)
|
94
|
-
rspec-core (3.11.0)
|
95
|
-
rspec-support (~> 3.11.0)
|
96
|
-
rspec-expectations (3.11.0)
|
97
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
98
|
-
rspec-support (~> 3.11.0)
|
99
|
-
rspec-mocks (3.11.1)
|
100
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
101
|
-
rspec-support (~> 3.11.0)
|
102
|
-
rspec-support (3.11.0)
|
103
|
-
ruby-macho (2.5.1)
|
104
|
-
thor (1.2.1)
|
105
|
-
typhoeus (1.4.0)
|
106
|
-
ethon (>= 0.9.0)
|
107
|
-
tzinfo (2.0.4)
|
108
|
-
concurrent-ruby (~> 1.0)
|
109
|
-
xcodeproj (1.21.0)
|
110
|
-
CFPropertyList (>= 2.3.3, < 4.0)
|
111
|
-
atomos (~> 0.1.3)
|
112
|
-
claide (>= 1.0.2, < 2.0)
|
113
|
-
colored2 (~> 3.1)
|
114
|
-
nanaimo (~> 0.3.0)
|
115
|
-
rexml (~> 3.2.4)
|
116
|
-
zeitwerk (2.5.4)
|
117
|
-
|
118
|
-
PLATFORMS
|
119
|
-
x86_64-darwin-21
|
120
|
-
|
121
|
-
DEPENDENCIES
|
122
|
-
bundler
|
123
|
-
cocoapods
|
124
|
-
cocoapods-core
|
125
|
-
colored
|
126
|
-
colored2
|
127
|
-
mt_tool!
|
128
|
-
rake (~> 13.0)
|
129
|
-
rspec (~> 3.2)
|
130
|
-
thor
|
131
|
-
xcodeproj
|
132
|
-
|
133
|
-
BUNDLED WITH
|
134
|
-
2.3.11
|
data/lib/mt_tool/analyze.rb
DELETED
@@ -1,126 +0,0 @@
|
|
1
|
-
require 'cocoapods'
|
2
|
-
require 'pathname'
|
3
|
-
|
4
|
-
require 'pp'
|
5
|
-
|
6
|
-
require 'tmpdir'
|
7
|
-
|
8
|
-
module MtTool
|
9
|
-
#
|
10
|
-
# Analyze the project using cocoapods
|
11
|
-
#
|
12
|
-
class Analyzer
|
13
|
-
def analyze(podfile_dir_path)
|
14
|
-
|
15
|
-
@path = Pathname.new(podfile_dir_path)
|
16
|
-
@podFile = Pod::Podfile.from_file(@path + 'Podfile')
|
17
|
-
@podLock = Pod::Lockfile.from_file(@path + 'Podfile.lock')
|
18
|
-
|
19
|
-
|
20
|
-
raise 'absolute path is needed' unless @path.absolute?
|
21
|
-
|
22
|
-
Dir.chdir(podfile_dir_path) do
|
23
|
-
analyze_with_podfile
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
def analyze_with_podfile
|
30
|
-
# if @path
|
31
|
-
# sandbox = Dir.mktmpdir
|
32
|
-
# else
|
33
|
-
# sandbox = Dir.pwd + '/Pods'
|
34
|
-
# end
|
35
|
-
#
|
36
|
-
|
37
|
-
sandbox = Dir.pwd + '/Pods'
|
38
|
-
|
39
|
-
analyzer = Pod::Installer::Analyzer.new(
|
40
|
-
Pod::Sandbox.new(sandbox),
|
41
|
-
@podFile,
|
42
|
-
# @podLock
|
43
|
-
)
|
44
|
-
|
45
|
-
specifications = analyzer.analyze.specifications.map(&:root).uniq
|
46
|
-
|
47
|
-
podfile_dependency = podfile_dependencies(@podFile)
|
48
|
-
|
49
|
-
map = {}
|
50
|
-
specifications.each do |s|
|
51
|
-
map[s.name] = if s.default_subspecs.count > 0
|
52
|
-
subspecs_with_name(s, s.default_subspecs) + s.dependencies
|
53
|
-
else
|
54
|
-
s.subspecs + s.dependencies
|
55
|
-
end
|
56
|
-
|
57
|
-
subspecs_in_podfile = podfile_dependency.select { |pd|
|
58
|
-
pd.split('/')[0] == s.name
|
59
|
-
}
|
60
|
-
sp = subspecs_in_podfile.map { |sip|
|
61
|
-
s.subspecs.find { |ss|
|
62
|
-
ss.name == sip
|
63
|
-
}
|
64
|
-
}.compact
|
65
|
-
|
66
|
-
map[s.name] = sp if sp.count != 0
|
67
|
-
s.subspecs.each do |ss|
|
68
|
-
map[ss.name] = ss.dependencies
|
69
|
-
end
|
70
|
-
|
71
|
-
end
|
72
|
-
|
73
|
-
# for performance
|
74
|
-
dependencies_map = {}
|
75
|
-
specifications.each do |s|
|
76
|
-
dependencies_map[s.name] = s
|
77
|
-
end
|
78
|
-
|
79
|
-
new_map = {}
|
80
|
-
specifications.each do |s|
|
81
|
-
new_map[s.name] = find_dependencies(s.name, map, [], dependencies_map, s.name).uniq.sort
|
82
|
-
end
|
83
|
-
|
84
|
-
new_map
|
85
|
-
end
|
86
|
-
|
87
|
-
def podfile_dependencies(podfile)
|
88
|
-
res = []
|
89
|
-
podfile.root_target_definitions.each do |td|
|
90
|
-
children_definitions = td.recursive_children
|
91
|
-
children_definitions.each do |cd|
|
92
|
-
dependencies_hash_array = cd.send(:get_hash_value, 'dependencies')
|
93
|
-
next if dependencies_hash_array.nil? || dependencies_hash_array.count.zero?
|
94
|
-
|
95
|
-
dependencies_hash_array.each do |item|
|
96
|
-
next if item.class.name != 'Hash'
|
97
|
-
|
98
|
-
item.each do |name, _|
|
99
|
-
res.push name
|
100
|
-
end
|
101
|
-
end
|
102
|
-
end
|
103
|
-
end
|
104
|
-
res
|
105
|
-
end
|
106
|
-
|
107
|
-
def find_dependencies(name, map, res, dependencies_map, root_name)
|
108
|
-
return unless map[name]
|
109
|
-
|
110
|
-
map[name].each do |k|
|
111
|
-
find_dependencies(k.name, map, res, dependencies_map, root_name)
|
112
|
-
dependency = dependencies_map[k.name.split('/')[0]]
|
113
|
-
res.push dependency.name if dependency && dependency.name != root_name
|
114
|
-
end
|
115
|
-
res
|
116
|
-
end
|
117
|
-
|
118
|
-
def subspecs_with_name(spec, subspecs_short_names)
|
119
|
-
subspecs_short_names.map do |name|
|
120
|
-
spec.subspecs.find { |ss| ss.name.include? name }
|
121
|
-
end
|
122
|
-
end
|
123
|
-
|
124
|
-
|
125
|
-
end
|
126
|
-
end
|