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: cea7471eae842634649c220a62e11f4589f20634d5b9c0808f4408316b49d3de
4
- data.tar.gz: 643fc2465fc83994e6438ccb12f9f93c8aa0b94762bf98c1e1fbb63c08567fc7
3
+ metadata.gz: 37116f9c50d0a054b0cdac7abf1780edb282e0fee63dd3d953ad1c106d2bb9c6
4
+ data.tar.gz: 565c6e8399328d174ec4829426462c369ae9b94e8366fa3db753ca2fce9f0d2c
5
5
  SHA512:
6
- metadata.gz: 71c5d7acda6dc021b007cb27b81bc7ddc37b8d24f6a143236650d8054b07231fd1d98fe25df236b901530c2990f53716df4473ebd33b55f62e1d3dde62896d8d
7
- data.tar.gz: 2256e7b73731522f3e649141332db91f3328b2c0d83cfd0c84feb4ab4e4d57de8b021ee624cf5e29efd3f26dc6813f2e326f69ac6cdebc27fede34a5a2d6936d
6
+ metadata.gz: 974593d648b8dfc27bfa9d79d8070c022c817dbfb8b1410fbeecf3e5e5303936235080a6dccf852c686cdf9daa42080ec93e47837472074428c8b153fa6c981a
7
+ data.tar.gz: 180a3740de5aaf2e9bf540e778b50b09cc58c1f90465a11830022cc53f2755cc6a2b07c8ead33f50f0a2b256c3a3a4d6b0c19bcf4b37e99e86ce4144112c7bf2
@@ -59,7 +59,7 @@ module Pod
59
59
  end
60
60
 
61
61
  def validate!
62
- # super
62
+ super
63
63
  # 这里由于 --help 是在 validate! 方法中提取的,会导致 --help 失效
64
64
  # pod lib create 也有这个问题
65
65
  banner! if @help
@@ -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
- puts "///#{h['desc']} #{h['example']}"
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"
@@ -1,5 +1,5 @@
1
1
  module CBin
2
- VERSION = '0.1.21'
2
+ VERSION = '0.1.22'
3
3
  end
4
4
 
5
5
  module Pod
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-aomi-bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.21
4
+ version: 0.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - lihaijian