pindo 4.7.0 → 4.7.2

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.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pindo/base/aeshelper.rb +30 -2
  3. data/lib/pindo/base/githelper.rb +7 -9
  4. data/lib/pindo/client/aws3sclient.rb +1 -1
  5. data/lib/pindo/client/bossconfigclient.rb +3 -3
  6. data/lib/pindo/client/giteeclient.rb +2 -2
  7. data/lib/pindo/client/pgyerclient.rb +97 -102
  8. data/lib/pindo/command/appstore/iap.rb +1 -1
  9. data/lib/pindo/command/deploy/build.rb +70 -4
  10. data/lib/pindo/command/deploy/cert.rb +68 -67
  11. data/lib/pindo/command/{utils → dev}/applovin.rb +2 -2
  12. data/lib/pindo/command/dev/autobuild.rb +19 -7
  13. data/lib/pindo/command/dev/autoresign.rb +10 -6
  14. data/lib/pindo/command/dev/build.rb +94 -0
  15. data/lib/pindo/command/dev.rb +3 -6
  16. data/lib/pindo/command/ipa/autoresign.rb +4 -1
  17. data/lib/pindo/command/ipa/import.rb +45 -9
  18. data/lib/pindo/command/ipa/output.rb +7 -2
  19. data/lib/pindo/command/lib/update.rb +8 -8
  20. data/lib/pindo/command/pgyer/resign.rb +21 -19
  21. data/lib/pindo/command/pgyer/upload.rb +34 -6
  22. data/lib/pindo/command/utils/renewcert.rb +158 -0
  23. data/lib/pindo/command/utils.rb +1 -1
  24. data/lib/pindo/config/pindoconfig.rb +27 -0
  25. data/lib/pindo/module/appselect.rb +9 -8
  26. data/lib/pindo/module/cert/certhelper.rb +42 -36
  27. data/lib/pindo/module/cert/keychainhelper.rb +25 -13
  28. data/lib/pindo/module/cert/provisioninghelper.rb +1 -1
  29. data/lib/pindo/module/cert/xcodecerthelper.rb +98 -39
  30. data/lib/pindo/module/pgyer/pgyerhelper.rb +50 -28
  31. data/lib/pindo/module/xcode/xcodeappconfig.rb +2 -3
  32. data/lib/pindo/module/xcode/xcodereshandler.rb +41 -13
  33. data/lib/pindo/module/xcode/xcodereshelper.rb +2 -3
  34. data/lib/pindo/options/deployoptions.rb +1 -2
  35. data/lib/pindo/version.rb +1 -1
  36. metadata +5 -4
  37. data/lib/pindo/command/dev/renewcert.rb +0 -142
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c7daab6ca92e2942ae682695e06ea741b5cb2ae45804dd9af94bdacc59a49cf
4
- data.tar.gz: d237736dfdf676455395a85590142ac30ab8604cd8dd2636577582b48d1da389
3
+ metadata.gz: 45f5abed812ba1c0068fad2e583c9b4195ceaf65f7535a3b878b68c1e842c8f6
4
+ data.tar.gz: b4ecb804c33881b62ec284c560d69d39cddd9632cc6f274ae1125a1d647f24a2
5
5
  SHA512:
6
- metadata.gz: d5dc55d34adbd57fd5fa0d0d5268418f88b5fe019e2f1f33c9f5dd19016e15ff3ce00272966c76d6a90b8b68af2eb0d40f49f700990010557abbad69e3338bdf
7
- data.tar.gz: f6d9f58c141d0a0b2702f84f34745315b821d59d04f59f8a61c963c6cfc8497b3532455d344e65f73cdfbccd7282cb84166ee5dd46517e5f47c7463a003f36d3
6
+ metadata.gz: 7395a2bb7ebda1d191e6122ad27d51cd546a1954d6fc8c392fd738815d5f9f940d9575f46ef26dbd6e0c9188dcf8154f5d89a57cdf920f1890a067c6993dc294
7
+ data.tar.gz: a4fc02fa9c1f567c4e37e9ad9fba752cfb95efaa1ecee8ca1f5e54307804f61ff94df1ba514199ce1ddb3b4f4fcbebe91b050b66fc4b1ce333a39e0600c01046
@@ -6,6 +6,33 @@ module Pindo
6
6
  module AESHelper
7
7
 
8
8
 
9
+ def self.fetch_password(keychain_name:nil)
10
+ # password = ENV["MATCH_PASSWORD"]
11
+
12
+ server_name = ["match", keychain_name].join("_")
13
+
14
+ item = Security::InternetPassword.find(server: server_name)
15
+
16
+ password = item.password if item
17
+
18
+ unless password
19
+ password = FastlaneCore::Helper.ask_password(message: "请输入证书仓库的加密密码: ", confirm: true)
20
+ Security::InternetPassword.add(server_name, "", password)
21
+ end
22
+ return password
23
+ end
24
+
25
+ def self.delete_password(keychain_name:nil)
26
+ server_name = ["match", keychain_name].join("_")
27
+ Security::InternetPassword.delete(server:server_name)
28
+ end
29
+
30
+ def self.store_password(keychain_name:nil, password:nil)
31
+ server_name = ["match", keychain_name].join("_")
32
+ Security::InternetPassword.add(server_name, "", password)
33
+ end
34
+
35
+
9
36
  def self.aes_128_ecb_encrypt(key, encrypted_string)
10
37
  cipher = OpenSSL::Cipher::Cipher.new('AES-128-ECB')
11
38
  cipher.encrypt
@@ -48,7 +75,7 @@ module Pindo
48
75
  # 1.0.x OpenSSL and earlier versions use MD5, 1.1.0c and newer uses SHA256, we try both before giving an error
49
76
  def self.decrypt_specific_file(src_file: nil, password: nil, output_dir: nil, hash_algorithm: "MD5")
50
77
 
51
- begin
78
+ begin
52
79
  stored_data = Base64.decode64(File.read(src_file))
53
80
  salt = stored_data[8..15]
54
81
  data_to_decrypt = stored_data[16..-1]
@@ -66,7 +93,8 @@ module Pindo
66
93
  if hash_algorithm != fallback_hash_algorithm
67
94
  decrypt_specific_file(src_file: src_file, password: password, hash_algorithm: fallback_hash_algorithm)
68
95
  else
69
- raise Informative, "Couldn't decrypt the repo, please make sure you enter the right password!"
96
+ Funlog.instance.fancyinfo_error("解析文件失败: #{src_file}")
97
+ return nil
70
98
  end
71
99
  end
72
100
  end
@@ -24,7 +24,6 @@ module Pindo
24
24
  current=Dir.pwd
25
25
  result = false
26
26
 
27
- puts local_branch_exists?(local_repo_dir: local_repo_dir, branch: branch)
28
27
  if !local_branch_exists?(local_repo_dir: local_repo_dir, branch: branch)
29
28
  git!(%W(-C #{local_repo_dir} checkout -b #{branch}))
30
29
  result = true
@@ -226,7 +225,7 @@ module Pindo
226
225
  current=Dir.pwd
227
226
  local_repo_dir = File::join(path, reponame)
228
227
 
229
- Funlog.instance.fancyinfo_start("开始更新仓库:#{local_repo_dir}...")
228
+ Funlog.instance.fancyinfo_update("开始更新仓库:#{local_repo_dir}...")
230
229
 
231
230
  begin
232
231
 
@@ -249,15 +248,10 @@ module Pindo
249
248
 
250
249
  git!(%W(-C #{local_repo_dir} fetch origin --progress))
251
250
  else
252
- puts "Cloning `#{remote_url}` into `#{local_repo_dir}`."
253
251
  git! ['clone', remote_url, local_repo_dir]
254
252
  end
255
253
 
256
254
  Dir.chdir(local_repo_dir)
257
- if !remote_branch_exists?(local_repo_dir:local_repo_dir, branch:new_branch)
258
- raise Informative, "仓库中的#{new_branch}分支不存在 !!!"
259
- end
260
-
261
255
  current_branch = git!(%W(-C #{local_repo_dir} rev-parse --abbrev-ref HEAD)).strip
262
256
  if current_branch.eql?(new_branch)
263
257
  git!(%W(-C #{local_repo_dir} reset --hard origin/#{new_branch}))
@@ -269,7 +263,11 @@ module Pindo
269
263
  if local_branch_exists?(local_repo_dir:local_repo_dir, branch:new_branch)
270
264
  git!(%W(-C #{local_repo_dir} checkout #{new_branch}))
271
265
  else
272
- git!(%W(-C #{local_repo_dir} checkout -b #{new_branch}))
266
+ if !remote_branch_exists?(local_repo_dir:local_repo_dir, branch:new_branch)
267
+ git!(%W(-C #{local_repo_dir} checkout -b #{new_branch}))
268
+ else
269
+ raise Informative, "仓库中的#{new_branch}分支不存在 !!!"
270
+ end
273
271
  end
274
272
  git!(%W(-C #{local_repo_dir} branch --set-upstream-to=origin/#{new_branch} #{new_branch}))
275
273
  git!(%W(-C #{local_repo_dir} pull))
@@ -285,7 +283,7 @@ module Pindo
285
283
  end
286
284
 
287
285
  end
288
-
286
+ $stdin.flush
289
287
  Funlog.instance.fancyinfo_success("仓库#{local_repo_dir}更新完成!")
290
288
  rescue StandardError => e
291
289
 
@@ -154,7 +154,7 @@ module Pindo
154
154
 
155
155
  # (char * (index/1).floor).ljust(100, ' ')
156
156
 
157
- upload_message = "已下载:#{progress_str}\%【" + (char * (index/1).floor).ljust(100, '_') + "】Total: #{total_size} M"
157
+ upload_message = "已上传:#{progress_str}\%【" + (char * (index/1).floor).ljust(100, '_') + "】Total: #{total_size} M"
158
158
  @upload_message = upload_message
159
159
  Funlog.instance.fancyinfo_update(upload_message)
160
160
  # @spinner.reset
@@ -133,10 +133,10 @@ module Pindo
133
133
 
134
134
  # all_cookies = res['set-cookie']
135
135
  all_cookies = File.read("/Users/wade/Desktop/cookie.txt")
136
- puts "111"
137
- puts all_cookies
136
+ # puts "111"
137
+ # puts all_cookies
138
138
  cookies_array = parse_cookie(all_cookies)
139
- puts JSON.pretty_generate(cookies_array)
139
+ # puts JSON.pretty_generate(cookies_array)
140
140
 
141
141
 
142
142
  end
@@ -39,7 +39,7 @@ module Pindo
39
39
  body_str = body_params.to_json
40
40
  url = @base_url + "/api/v5/orgs/#{owner}/repos"
41
41
 
42
- puts body_str
42
+ # puts body_str
43
43
 
44
44
  con = Faraday.new
45
45
  res = con.post do |req|
@@ -48,7 +48,7 @@ module Pindo
48
48
  req.body = body_str
49
49
  end
50
50
 
51
- puts res.body
51
+ # puts res.body
52
52
 
53
53
  # puts res.body
54
54
  if res.body['error'].nil?
@@ -6,9 +6,9 @@ require 'pindo/client/httpclient'
6
6
 
7
7
 
8
8
  module Pindo
9
-
10
9
 
11
- class PgyerClient
10
+
11
+ class PgyerClient
12
12
 
13
13
 
14
14
  attr_accessor :use_local_wechat_url
@@ -23,7 +23,7 @@ module Pindo
23
23
  @pgyer_token_file = File.join(File::expand_path(Pindoconfig.instance.pindo_dir), ".pgyer_token")
24
24
  config_file = File.join(File::expand_path(Pindoconfig.instance.pindo_common_configdir), "pgyer_client_config.json")
25
25
  config_json = JSON.parse(File.read(config_file))
26
-
26
+
27
27
  @use_local_wechat_url = config_json["use_local_wechat_url"]
28
28
  @baseurl = config_json["pgyerapps_base_url"]
29
29
  @request_config = config_json["pgyerapps_req_config"]
@@ -31,7 +31,7 @@ module Pindo
31
31
 
32
32
  rescue => error
33
33
  raise Informative, "加载pgyer配置文件失败, 需要执行 pindo setup 或者pindo env dreamstudio"
34
- end
34
+ end
35
35
 
36
36
  end
37
37
 
@@ -39,13 +39,13 @@ module Pindo
39
39
 
40
40
  end
41
41
 
42
-
42
+
43
43
  def do_login(force_login:false)
44
44
 
45
-
45
+
46
46
 
47
47
  login_success = false
48
- @token = load_token()
48
+ @token = load_token()
49
49
  if !@token.nil? && !@token["token"].nil? && !force_login
50
50
  login_success = true
51
51
 
@@ -58,43 +58,45 @@ module Pindo
58
58
  username = @token["username"]
59
59
  checksum_password = nil
60
60
  if !@token["password"].nil?
61
- checksum_password = @token["password"]
61
+ checksum_password = @token["password"]
62
62
  end
63
63
  end
64
- token = do_login_req(username:username, checksum_password:checksum_password)
64
+ token = do_login_req(username:username, checksum_password:checksum_password)
65
65
  if !token.nil? && !token["token"].nil?
66
66
  @token = token
67
67
  login_success = true
68
- end
69
- end
68
+ end
69
+ end
70
70
 
71
71
  return login_success
72
72
  end
73
73
 
74
74
  def do_login_req(username:nil, checksum_password:nil)
75
-
76
-
75
+
76
+
77
77
  login_name = username
78
- if login_name.nil?
78
+ if login_name.nil? || login_name.empty?
79
79
  login_name = ask('请输入pgger网站的usernmae:') || nil
80
80
  end
81
81
 
82
- puts "用户: #{login_name} "
82
+ checksum_pass = checksum_password
83
+ if checksum_pass.nil? || checksum_pass.empty?
84
+ login_passwork = ask('请输入pgger网站的密码:') || nil
85
+ checksum_pass = Digest::MD5.hexdigest(login_passwork)
86
+ end
87
+
88
+ if !login_name.nil? && !login_name.empty? && !checksum_pass.nil? && !checksum_pass.empty?
83
89
 
84
- result_data = do_send_code(username:login_name)
90
+ else
91
+ raise Informative, "请输入正确的用户名和密码!"
92
+ end
85
93
 
86
- puts "验证码: #{result_data["msg"]}"
87
94
 
95
+ Funlog.instance.fancyinfo_start("正在登录pgyer...")
88
96
 
89
- checksum_pass = checksum_password
90
- if checksum_pass.nil?
91
- login_passwork = ask('请输入pgger网站的密码:') || nil
92
- checksum_pass = Digest::MD5.hexdigest(login_passwork)
93
- end
94
97
 
95
- # puts "passwork: #{checksum_pass}"
98
+ result_data = do_send_code(username:login_name)
96
99
 
97
- Funlog.instance.fancyinfo_start("正在登录pgyer...")
98
100
 
99
101
  boss_url = @baseurl + @request_config["do_login"]
100
102
  body_params = {
@@ -109,26 +111,25 @@ module Pindo
109
111
 
110
112
  begin
111
113
 
112
- con = HttpClient.create_instance_with_proxy
113
- res = con.post do |req|
114
- req.url boss_url
115
- req.headers['Content-Type'] = 'application/json'
116
- req.body = body_params.to_json
117
- end
114
+ con = HttpClient.create_instance_with_proxy
115
+ res = con.post do |req|
116
+ req.url boss_url
117
+ req.headers['Content-Type'] = 'application/json'
118
+ req.body = body_params.to_json
119
+ end
118
120
 
119
-
120
- if !res.body.nil?
121
-
122
- login_response_data = JSON.parse(res.body)
123
- end
121
+ if !res.body.nil?
122
+
123
+ login_response_data = JSON.parse(res.body)
124
+ end
124
125
 
125
126
  rescue => error
126
127
  Funlog.instance.fancyinfo_error("pgyer登录失败!")
127
128
  puts "登录失败,请重试!!!"
128
- end
129
+ end
130
+
129
131
 
130
132
 
131
-
132
133
  # puts JSON.pretty_generate(login_response_data)
133
134
 
134
135
  if !login_response_data.nil? && !login_response_data["code"].nil? && login_response_data["code"].to_s.eql?("200")
@@ -143,7 +144,7 @@ module Pindo
143
144
 
144
145
  else
145
146
  if File.exist?(@pgyer_token_file)
146
- FileUtils.rm_rf(@pgyer_token_file)
147
+ FileUtils.rm_rf(@pgyer_token_file)
147
148
  end
148
149
  Funlog.instance.fancyinfo_error("pgyer登录失败!")
149
150
  end
@@ -158,7 +159,7 @@ module Pindo
158
159
  Funlog.instance.fancyinfo_success("正在读取pgyer token...")
159
160
  if File.exist?(@pgyer_token_file)
160
161
  begin
161
- data = File.read(@pgyer_token_file)
162
+ data = File.read(@pgyer_token_file)
162
163
 
163
164
  data_string = AESHelper::aes_128_ecb_decrypt(@pgyer_aes_key, data)
164
165
  temp_token = data_string
@@ -166,37 +167,37 @@ module Pindo
166
167
  if !temp_token.nil? && !temp_token["token"].nil? && !temp_token["username"].nil?
167
168
  @token = temp_token
168
169
  Funlog.instance.fancyinfo_success("读取pgyer token成功!")
169
- end
170
+ end
170
171
  rescue => error
171
172
  puts error
172
173
  # puts "加载pgyer token 失败!!! "
173
174
  if File.exist?(@pgyer_token_file)
174
- FileUtils.rm_rf(@pgyer_token_file)
175
+ FileUtils.rm_rf(@pgyer_token_file)
175
176
  end
176
177
  Funlog.instance.fancyinfo_error("pgyer token文件不存在!")
177
178
  @token = nil
178
- end
179
+ end
179
180
  else
180
181
  Funlog.instance.fancyinfo_error("pgyer token文件不存在!")
181
- end
182
+ end
182
183
 
183
- return @token
184
+ return @token
184
185
  end
185
186
 
186
187
  def store_token(token:nil)
187
188
 
188
189
  begin
189
190
  @token = token
190
-
191
+
191
192
  data_string = AESHelper::aes_128_ecb_encrypt(@pgyer_aes_key, @token.to_json)
192
193
  File.open(@pgyer_token_file, "w") do |f|
193
194
  f.write(data_string)
194
195
  end
195
196
  Funlog.instance.fancyinfo_success("token 存储成功!")
196
197
  # puts "store pgyer token---- sucess !!!"
197
- rescue => error
198
+ rescue => error
198
199
  Funlog.instance.fancyinfo_error("token存储失败!")
199
- end
200
+ end
200
201
  end
201
202
 
202
203
  def do_send_code(username:nil)
@@ -209,7 +210,7 @@ module Pindo
209
210
  }
210
211
  # puts JSON.pretty_generate(body_params)
211
212
 
212
- con = HttpClient.create_instance_with_proxy
213
+ con = HttpClient.create_instance_with_proxy
213
214
  res = con.post do |req|
214
215
  req.url boss_url
215
216
  req.headers['Content-Type'] = 'application/json'
@@ -218,13 +219,13 @@ module Pindo
218
219
 
219
220
  result_date = nil
220
221
  if !res.body.nil?
221
- result_date = JSON.parse(res.body)
222
+ result_date = JSON.parse(res.body)
222
223
  end
223
-
224
+
224
225
  # puts JSON.pretty_generate(result_date)
225
226
 
226
227
  if !result_date.nil? && !result_date["code"].nil? && result_date["code"].to_s.eql?("200")
227
-
228
+
228
229
 
229
230
  res = con.post do |req|
230
231
  req.url boss_url
@@ -233,14 +234,14 @@ module Pindo
233
234
  end
234
235
 
235
236
  if !res.body.nil?
236
- result_date = JSON.parse(res.body)
237
+ result_date = JSON.parse(res.body)
237
238
  end
238
-
239
+
239
240
  end
240
241
 
241
-
242
+
242
243
  # puts JSON.pretty_generate(result_date)
243
-
244
+
244
245
  return result_date
245
246
 
246
247
  end
@@ -261,9 +262,9 @@ module Pindo
261
262
  }
262
263
 
263
264
  params.each { |key,value| get_params[key] = value }
264
-
265
265
 
266
- con = HttpClient.create_instance_with_proxy
266
+
267
+ con = HttpClient.create_instance_with_proxy
267
268
  res = con.get do |req|
268
269
  req.url boss_url
269
270
  req.headers['Content-Type'] = 'application/json'
@@ -273,22 +274,17 @@ module Pindo
273
274
 
274
275
  result_date = nil
275
276
  if !res.body.nil?
276
- result_date = JSON.parse(res.body)
277
+ result_date = JSON.parse(res.body)
277
278
 
278
279
  if !result_date["code"].nil? && result_date["code"].to_s.eql?("401")
279
280
  do_login(force_login:true)
280
281
  end
281
282
  end
282
-
283
-
284
- # puts JSON.pretty_generate(result_date)
285
-
286
- return result_date
287
283
 
288
- end
289
284
 
290
- def do_request(method, params)
285
+ # puts JSON.pretty_generate(result_date)
291
286
 
287
+ return result_date
292
288
 
293
289
  end
294
290
 
@@ -304,9 +300,9 @@ module Pindo
304
300
  return
305
301
  end
306
302
  params.each { |key,value| body_params[key] = value }
307
-
308
303
 
309
- con = HttpClient.create_instance_with_proxy
304
+
305
+ con = HttpClient.create_instance_with_proxy
310
306
  res = con.post do |req|
311
307
  req.url boss_url
312
308
  req.headers['Content-Type'] = 'application/json'
@@ -317,18 +313,18 @@ module Pindo
317
313
 
318
314
  result_date = nil
319
315
  if !res.body.nil?
320
- result_date = JSON.parse(res.body)
316
+ result_date = JSON.parse(res.body)
321
317
  end
322
-
323
-
318
+
319
+
324
320
  # puts JSON.pretty_generate(result_date)
325
-
321
+
326
322
  return result_date
327
323
 
328
324
  end
329
325
 
330
326
 
331
-
327
+
332
328
  # def post_app_update_binary(appId:nil, key_id:nil, description:nil)
333
329
  def post_app_update_binary(appId:nil, params:nil)
334
330
 
@@ -344,14 +340,14 @@ module Pindo
344
340
  }
345
341
 
346
342
  # puts body_params.to_json
347
- #
343
+ #
348
344
 
349
345
  params.each { |key,value| body_params[key] = value }
350
346
  # puts body_params.to_json
351
-
347
+
352
348
  # puts JSON.pretty_generate(body_params)
353
349
  # puts "111"
354
- con = HttpClient.create_instance_with_proxy
350
+ con = HttpClient.create_instance_with_proxy
355
351
  res = con.post do |req|
356
352
  req.url boss_url
357
353
  req.headers['Content-Type'] = 'application/json'
@@ -362,12 +358,12 @@ module Pindo
362
358
 
363
359
  result_date = nil
364
360
  if !res.body.nil?
365
- result_date = JSON.parse(res.body)
361
+ result_date = JSON.parse(res.body)
366
362
  end
367
-
368
-
363
+
364
+
369
365
  # puts JSON.pretty_generate(result_date)
370
-
366
+
371
367
  return result_date
372
368
 
373
369
  end
@@ -382,11 +378,11 @@ module Pindo
382
378
  pageNo:1,
383
379
  pageSize:20,
384
380
  }
385
-
381
+
386
382
  params.each { |key,value| get_params[key] = value }
387
-
388
383
 
389
- con = HttpClient.create_instance_with_proxy
384
+
385
+ con = HttpClient.create_instance_with_proxy
390
386
  res = con.get do |req|
391
387
  req.url boss_url
392
388
  req.headers['Content-Type'] = 'application/json'
@@ -396,12 +392,12 @@ module Pindo
396
392
 
397
393
  result_date = nil
398
394
  if !res.body.nil?
399
- result_date = JSON.parse(res.body)
395
+ result_date = JSON.parse(res.body)
400
396
  end
401
-
402
-
397
+
398
+
403
399
  # puts JSON.pretty_generate(result_date)
404
-
400
+
405
401
  return result_date
406
402
 
407
403
  end
@@ -420,7 +416,7 @@ module Pindo
420
416
  }
421
417
 
422
418
 
423
- con = HttpClient.create_instance_with_proxy
419
+ con = HttpClient.create_instance_with_proxy
424
420
 
425
421
  res = con.post do |req|
426
422
  req.url boss_url
@@ -432,12 +428,12 @@ module Pindo
432
428
 
433
429
  result_date = nil
434
430
  if !res.body.nil?
435
- result_date = JSON.parse(res.body)
431
+ result_date = JSON.parse(res.body)
436
432
  end
437
-
438
-
433
+
434
+
439
435
  # puts JSON.pretty_generate(result_date)
440
-
436
+
441
437
  return result_date
442
438
 
443
439
  end
@@ -447,7 +443,7 @@ module Pindo
447
443
  params = {} if params.nil?
448
444
  boss_url = @baseurl + @request_config["get_cert_list"]
449
445
 
450
- con = HttpClient.create_instance_with_proxy
446
+ con = HttpClient.create_instance_with_proxy
451
447
  res = con.get do |req|
452
448
  req.url boss_url
453
449
  req.headers['Content-Type'] = 'application/json'
@@ -456,12 +452,12 @@ module Pindo
456
452
 
457
453
  result_date = nil
458
454
  if !res.body.nil?
459
- result_date = JSON.parse(res.body)
455
+ result_date = JSON.parse(res.body)
460
456
  end
461
-
462
-
457
+
458
+
463
459
  # puts JSON.pretty_generate(result_date)
464
-
460
+
465
461
  return result_date
466
462
 
467
463
  end
@@ -476,7 +472,7 @@ module Pindo
476
472
  }
477
473
 
478
474
 
479
- con = HttpClient.create_instance_with_proxy
475
+ con = HttpClient.create_instance_with_proxy
480
476
 
481
477
  res = con.post do |req|
482
478
  req.url boss_url
@@ -488,16 +484,15 @@ module Pindo
488
484
 
489
485
  result_date = nil
490
486
  if !res.body.nil?
491
- result_date = JSON.parse(res.body)
487
+ result_date = JSON.parse(res.body)
492
488
  end
493
-
494
-
489
+
490
+
495
491
  # puts JSON.pretty_generate(result_date)
496
-
492
+
497
493
  return result_date
498
494
 
499
495
  end
500
496
 
501
497
  end
502
498
  end
503
-
@@ -21,7 +21,7 @@ module Pindo
21
21
 
22
22
  def self.options
23
23
  [
24
- ['--download', '下载app的所有购买项,用法:pindo ipa output --download'],
24
+ ['--download', '下载app的所有购买项,用法:pindo appstore iap --download'],
25
25
  ].concat(super)
26
26
  end
27
27