fir-cli 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 168494b14a66d4a451ff3885189334dbc59312a0
4
- data.tar.gz: 2f27a02eae78aa3d096b61d942b74a6e0150cfa2
3
+ metadata.gz: 396c52a907f43e7660bb4bd1b89c3b7b212b1ff7
4
+ data.tar.gz: 142be775b960115d50f38c14e0e396fedea9b6ed
5
5
  SHA512:
6
- metadata.gz: c860cdc6bb17e07a579f4444bbd735cecb51b64dab3f1b20860f3730540a544fdcd84fa3ee2d9cd07b145193940945bf1cd31b1ba2521973d3bd38a3f2cf2ddd
7
- data.tar.gz: b96efe27557fa31ae5418c2c593e883cc93e3724485bd278bf5081ff78e94aec143d36c94236bd994d1e515d8709470616974d32b5600b0e3a9ca3cdaa1df14f
6
+ metadata.gz: aa2ac76360fcb3f0ded94fc206c9762bf40befa0d374ad72c9e9eb193938345dcdc14b8b80fcb8a22a88332e2fc8fccf79ea91e551de5cd951644d63d2a993d0
7
+ data.tar.gz: d225bea3e6cbd4afc81325a61478b36a61a1e2c1a65f27604d1c17bcdd90fb478806ba1bbd770cc8db98ceb5824eab3799cf6bae2964ae548ab20f5ac3d1a494
data/fir-cli.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = 'fir-cli'
7
- s.version = '0.1.2'
7
+ s.version = '0.1.3'
8
8
  s.date = '2014-11-20'
9
9
  s.summary = 'FIR.im 命令行工具'
10
10
  s.description = 'FIR.im 命令行工具,支持 ios 和 android'
@@ -24,8 +24,8 @@ module Fir
24
24
  exit 1
25
25
  end
26
26
  end
27
- if !/\.ipa$/.match ipath
28
- _puts Paint['! 只能给以 ipa 为扩展名的文件签名', :red]
27
+ if !_is_ipa ipath
28
+ _puts "! #{ Paint['只能给以 ipa 为扩展名的文件签名', :red] }"
29
29
  exit 1
30
30
  end
31
31
  _puts '> 正在申请上传令牌...'
@@ -55,12 +55,16 @@ module Fir
55
55
  info = {}
56
56
  loop do
57
57
  res = RestClient.get "http://api.resign.tapbeta.com/public/#{ tapbeta[:tb_upload_key] }",
58
- :params => { :__mr => 'eyJ1cmwiOiIkKHVybCkiLCAicmVzaWduU3RhdHVzIjogIiQocmVzaWduU3RhdHVzKSJ9' }
58
+ :params => { :__mr => 'eyJ1cmwiOiIkKHVybCkiLCAicmVzaWduU3RhdHVzIjogIiQocmVzaWduU3RhdHVzKSIsICJzdGF0dXMiOiAiJChzdGF0dXMpIn0=' }
59
59
  info = JSON.parse res.body, :symbolize_names => true
60
60
  if nped && info[:resignStatus] == 'doing'
61
61
  _puts '> 正在签名...'
62
62
  nped = false
63
63
  end
64
+ if info[:status] == 'error'
65
+ _puts "! #{ Paint['签名失败', :red] }"
66
+ exit 1
67
+ end
64
68
  break if info[:url] != ''
65
69
  sleep 5
66
70
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fir-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - FIR.im