fir-cli-xsl 1.0.4 → 2.0.0

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
  SHA256:
3
- metadata.gz: 3163b3f0857a13a5f6f29e2a859d270678c8d52ca3af78290a4419feca215291
4
- data.tar.gz: 06af771c4b2636ca69daec6f06e75db3989711355e6ba8d5b6b7f89e183d406e
3
+ metadata.gz: eeef6926f6443ad2b31a7ddd0a93a18cd3c8dcdc949c8334d81525f4503e1161
4
+ data.tar.gz: 8636697ecf8312500396d143c09e156f0b90350c7d7e242033c4ff9c3affb4ea
5
5
  SHA512:
6
- metadata.gz: f4340a37136584970049f7cffb67a341ead6217a4cc40fb86f1b23b651db46069d0c20b2582a4345b256f40b36e61026c074b3530a5396c79de6367c5736e525
7
- data.tar.gz: c49b43abc04dcc8d6286f57a1e44f9fc6427c777d27f230e91701ce17e59c4057b7ec20a73a6d88bdada465c296547830a4bb49b65aa31f53dd8aca1869d45a6
6
+ metadata.gz: a44af9459519d521d1898c1b3625d3d96a13ed43051e1eee5e090cf25ed79cc78efdaa1fb8b09bf23e609aef4f54f42795a0258e7bd855f60720ab36acb8895a
7
+ data.tar.gz: 1492faf33e1670529528fcb5e66af3f0480d50653e5168d6ff06044b4fede30068892175487707fe29c56bdffa5abc3bf47fd0d71e9635da6faeac6743c743b3
@@ -44,7 +44,7 @@ module FIR
44
44
  method_option :proj, type: :string, aliases: '-P', desc: 'Project id in BugHD.com if upload app mapping file'
45
45
  method_option :open, type: :boolean, desc: 'true/false if open for everyone'
46
46
  method_option :password, type: :string, desc: 'Set password for app'
47
- method_option :content, type: :string, aliases: '-ct', desc: 'Set Dtalk robot message'
47
+
48
48
  def build_ipa(*args)
49
49
  prepare :build_ipa
50
50
 
@@ -76,7 +76,7 @@ module FIR
76
76
  method_option :qrcode, type: :boolean, aliases: '-Q', desc: 'Generate qrcode'
77
77
  method_option :open, type: :boolean, desc: 'true/false if open for everyone, the default is: true', default: true
78
78
  method_option :password, type: :string, desc: 'Set password for app'
79
- method_option :content, type: :string, aliases: '-ct', desc: 'Set Dtalk robot message'
79
+
80
80
  def build_apk(*args)
81
81
  prepare :build_apk
82
82
 
@@ -116,14 +116,6 @@ module FIR
116
116
 
117
117
  method_option :open, type: :boolean, desc: 'true/false if open for everyone'
118
118
  method_option :password, type: :string, desc: 'Set password for app'
119
- method_option :content, type: :string, aliases: '-ct', desc: 'Set Dtalk robot message'
120
- map 'dt' => :dingtalk
121
-
122
- def dingtalk(*args)
123
- prepare :dingtalk
124
-
125
- FIR.dingtalk(*args, options)
126
- end
127
119
 
128
120
  def publish(*args)
129
121
  prepare :publish
@@ -131,6 +123,17 @@ module FIR
131
123
  FIR.publish(*args, options)
132
124
  end
133
125
 
126
+ desc 'dtalk', 'dtalk robot'
127
+ map 'dt' => :dingtalk
128
+ method_option :dingtalk_robot_msg, type: :string, aliases: '-M', desc: 'Set Dtalk robot message'
129
+ method_option :dingtalk_access_token, type: :string, aliases: '-D', desc: 'Send msg to dingtalk, only need access_token, not whole url'
130
+
131
+ def dingtalk(*args)
132
+ prepare :dingtalk
133
+
134
+ FIR.dingtalk(*args, options)
135
+ end
136
+
134
137
  desc 'login', 'Login fir.im (aliases: `l`).'
135
138
  map 'l' => :login
136
139
  def login(*args)
@@ -2,17 +2,17 @@
2
2
  module FIR
3
3
  module Publish
4
4
  def dingtalk(*args, options)
5
- initialize_dtalk_options
6
- if @token
5
+ if options[:dingtalk_access_token]
7
6
  payload = {
8
7
  "msgtype": 'markdown',
9
8
  "markdown": {
10
9
  "title": "ceshi",
11
- "text": @content
10
+ "text": options[:dingtalk_robot_msg]
12
11
  }
13
12
  }
14
- url = "https://oapi.dingtalk.com/robot/send?access_token=#{@token}"
13
+ url = "https://oapi.dingtalk.com/robot/send?access_token=#{options[:dingtalk_access_token]}"
15
14
  DefaultRest.post(url, payload)
15
+ end
16
16
  end
17
17
 
18
18
  def initialize_dtalk_options(args, options)
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module FIR
4
- VERSION = '1.0.4'
4
+ VERSION = '2.0.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fir-cli-xsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - NaixSpirit