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 +4 -4
- data/lib/fir/cli.rb +13 -10
- data/lib/fir/util/publish.rb +4 -4
- data/lib/fir/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eeef6926f6443ad2b31a7ddd0a93a18cd3c8dcdc949c8334d81525f4503e1161
|
4
|
+
data.tar.gz: 8636697ecf8312500396d143c09e156f0b90350c7d7e242033c4ff9c3affb4ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a44af9459519d521d1898c1b3625d3d96a13ed43051e1eee5e090cf25ed79cc78efdaa1fb8b09bf23e609aef4f54f42795a0258e7bd855f60720ab36acb8895a
|
7
|
+
data.tar.gz: 1492faf33e1670529528fcb5e66af3f0480d50653e5168d6ff06044b4fede30068892175487707fe29c56bdffa5abc3bf47fd0d71e9635da6faeac6743c743b3
|
data/lib/fir/cli.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
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)
|
data/lib/fir/util/publish.rb
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
module FIR
|
3
3
|
module Publish
|
4
4
|
def dingtalk(*args, options)
|
5
|
-
|
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":
|
10
|
+
"text": options[:dingtalk_robot_msg]
|
12
11
|
}
|
13
12
|
}
|
14
|
-
url = "https://oapi.dingtalk.com/robot/send?access_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)
|
data/lib/fir/version.rb
CHANGED