cocoapods-aomi-bin 0.1.20 → 0.1.21
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/lib/cocoapods-lhj-bin/command/bin/yapi.rb +34 -3
- data/lib/cocoapods-lhj-bin/gem_version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cea7471eae842634649c220a62e11f4589f20634d5b9c0808f4408316b49d3de
|
4
|
+
data.tar.gz: 643fc2465fc83994e6438ccb12f9f93c8aa0b94762bf98c1e1fbb63c08567fc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71c5d7acda6dc021b007cb27b81bc7ddc37b8d24f6a143236650d8054b07231fd1d98fe25df236b901530c2990f53716df4473ebd33b55f62e1d3dde62896d8d
|
7
|
+
data.tar.gz: 2256e7b73731522f3e649141332db91f3328b2c0d83cfd0c84feb4ab4e4d57de8b021ee624cf5e29efd3f26dc6813f2e326f69ac6cdebc27fede34a5a2d6936d
|
@@ -25,8 +25,6 @@ module Pod
|
|
25
25
|
def run
|
26
26
|
load_config
|
27
27
|
fetch_model
|
28
|
-
print_models
|
29
|
-
print_models_implementation
|
30
28
|
print_methods
|
31
29
|
end
|
32
30
|
|
@@ -68,6 +66,25 @@ module Pod
|
|
68
66
|
|
69
67
|
def fetch_model
|
70
68
|
res_json = req_model
|
69
|
+
begin
|
70
|
+
puts "\n<===============打印返回数据模型-Begin=====================>\n"
|
71
|
+
fetch_res_boy(res_json)
|
72
|
+
print_models
|
73
|
+
print_models_implementation
|
74
|
+
puts "\n<===============打印返回数据模型-End=====================>\n"
|
75
|
+
end
|
76
|
+
begin
|
77
|
+
puts "\n<===============打印请求模型-Begin=====================>\n"
|
78
|
+
@models = []
|
79
|
+
@model_names = []
|
80
|
+
fetch_req_body(res_json)
|
81
|
+
print_models
|
82
|
+
print_models_implementation
|
83
|
+
puts "\n<===============打印请求模型-End=====================>\n"
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
def fetch_res_boy(res_json)
|
71
88
|
if res_json && res_json['data']
|
72
89
|
@data_json = res_json['data']
|
73
90
|
if @data_json['res_body']
|
@@ -83,6 +100,21 @@ module Pod
|
|
83
100
|
end
|
84
101
|
end
|
85
102
|
|
103
|
+
def fetch_req_body(res_json)
|
104
|
+
if res_json && res_json['data']
|
105
|
+
@data_json = res_json['data']
|
106
|
+
if @data_json['req_body_other']
|
107
|
+
begin
|
108
|
+
res_body = JSON.parse(@data_json['req_body_other'])
|
109
|
+
res_body['name'] = gen_model_name('')
|
110
|
+
handle_model(res_body)
|
111
|
+
rescue => ex
|
112
|
+
puts ex
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
86
118
|
def gen_model_name(name)
|
87
119
|
n = name.gsub(/vo|model|list/i, '').gsub(/(.*)s$/, '\1').gsub(/^\w/) { $&.upcase }
|
88
120
|
if n.length <= 0
|
@@ -126,7 +158,6 @@ module Pod
|
|
126
158
|
end
|
127
159
|
|
128
160
|
def print_models
|
129
|
-
puts "\n<===============打印模型=====================>\n"
|
130
161
|
@models.each do |model|
|
131
162
|
model_name = model[:name] || ''
|
132
163
|
model_properties = model[:properties]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-aomi-bin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lihaijian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06-
|
11
|
+
date: 2021-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|