cocoapods-aomi-bin 0.1.21 → 0.1.22
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37116f9c50d0a054b0cdac7abf1780edb282e0fee63dd3d953ad1c106d2bb9c6
|
4
|
+
data.tar.gz: 565c6e8399328d174ec4829426462c369ae9b94e8366fa3db753ca2fce9f0d2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 974593d648b8dfc27bfa9d79d8070c022c817dbfb8b1410fbeecf3e5e5303936235080a6dccf852c686cdf9daa42080ec93e47837472074428c8b153fa6c981a
|
7
|
+
data.tar.gz: 180a3740de5aaf2e9bf540e778b50b09cc58c1f90465a11830022cc53f2755cc6a2b07c8ead33f50f0a2b256c3a3a4d6b0c19bcf4b37e99e86ce4144112c7bf2
|
@@ -8,6 +8,13 @@ module Pod
|
|
8
8
|
class Yapi < Bin
|
9
9
|
self.summary = '通过yapi接口生成请求'
|
10
10
|
|
11
|
+
def self.options
|
12
|
+
[
|
13
|
+
%w[--id api的id],
|
14
|
+
%w[--model-pre 模型的前缀]
|
15
|
+
]
|
16
|
+
end
|
17
|
+
|
11
18
|
def initialize(argv)
|
12
19
|
@id = argv.option('id')
|
13
20
|
@model_pre_name = argv.option('model-pre')
|
@@ -20,6 +27,7 @@ module Pod
|
|
20
27
|
@type_trans = {}
|
21
28
|
@config_model_names = []
|
22
29
|
@model_names = []
|
30
|
+
super
|
23
31
|
end
|
24
32
|
|
25
33
|
def run
|
@@ -28,6 +36,13 @@ module Pod
|
|
28
36
|
print_methods
|
29
37
|
end
|
30
38
|
|
39
|
+
def test_ding
|
40
|
+
require 'net/http'
|
41
|
+
require 'uri'
|
42
|
+
body = { "msgtype" => "text", "text" => { "content" => "error:上传蒲公英超时失败!" } }.to_json
|
43
|
+
Net::HTTP.post(URI('https://oapi.dingtalk.com/robot/send?access_token=6a3519057170cdb1b7274edfe43934c84a0062ffe2c9bcced434699296a7e26e'), body, "Content-Type" => "application/json")
|
44
|
+
end
|
45
|
+
|
31
46
|
def url_str
|
32
47
|
"#{@http_url}#{api_id}"
|
33
48
|
end
|
@@ -187,11 +202,15 @@ module Pod
|
|
187
202
|
type_name = m[:type_name]
|
188
203
|
type = m[:type]
|
189
204
|
des = m[:description] || ''
|
190
|
-
des.gsub!(/\n/, '')
|
205
|
+
des.gsub!(/\n/, ' ')
|
191
206
|
default = m[:default]
|
192
207
|
puts "///#{des} #{default}"
|
193
208
|
if type.eql?('integer')
|
194
209
|
puts "@property (nonatomic, assign) NSInteger #{key};"
|
210
|
+
if des.include?('分')
|
211
|
+
puts "/////////==========删掉其中一个属性"
|
212
|
+
puts "@property (nonatomic, strong) MLCentNumber *#{key};"
|
213
|
+
end
|
195
214
|
elsif type.eql?('cent')
|
196
215
|
puts "@property (nonatomic, strong) MLCentNumber *#{key};"
|
197
216
|
elsif type.eql?('string')
|
@@ -224,7 +243,8 @@ module Pod
|
|
224
243
|
puts "\n\n"
|
225
244
|
puts "@interface MLParamModel : NSObject"
|
226
245
|
@data_json['req_query'].each do |h|
|
227
|
-
|
246
|
+
des = h['desc'].gsub(/\n/, ' ')
|
247
|
+
puts "///#{des} #{h['example']}"
|
228
248
|
puts "@property (nonatomic, copy) NSString *#{h['name']};"
|
229
249
|
end
|
230
250
|
puts "@end"
|