fastlane-plugin-ding_talk_msg_push 0.1.1 → 0.1.2

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: 72d52e0c61705a32280f9ef6df44bc5bd077cc6e77f52021c1bfc4228d2d131d
4
- data.tar.gz: 4a79501d817abe0225f686641c5ac02c6b989fc8b30815c4d9b07ef190f5cb63
3
+ metadata.gz: edb019cd68228b5715ea91e5d37e4491c9ba47497ea3d900ff16349d8eda0038
4
+ data.tar.gz: 477c0d455b535b593ccdfe4ae877cb7b637e1592b92e7c43f73a10120bf62372
5
5
  SHA512:
6
- metadata.gz: 59e11305eda519527ae36159874c4752c67eff28533c95d96cb646254de17922a97af97d9232318f47dc3856e4519c0a729e424208c07cb4d812c0476cfc53f8
7
- data.tar.gz: b88e8bb4505e9fcee1cf220cb22351e3f2f962362d8eda5d66ee73d87fdba63910124f19380e5d93c5bc9aa503ca36c1162309e5081a156b08e0fd66dcb01ca4
6
+ metadata.gz: aba11509828c71ce5bc49779e9e3d00f214bc95d98380e1e596a83bce0633ffd6e7af129ea529d6eef486a3e0755d84c0d2262d4d5dca33ade76f430fd16347d
7
+ data.tar.gz: fbf25b45f58ee43d1b1b919679e7437158357a88a19265eb03e7d6fbffdbdf48f624388afcf93b19cb862df8b75c7bbe2896a8aec8b6fb50f4fc06b6aa0712f6
@@ -0,0 +1,88 @@
1
+ require 'fastlane/action'
2
+ require_relative '../helper/ding_talk_msg_push_helper'
3
+
4
+ module Fastlane
5
+ module Actions
6
+ class DingTalkMsgMdPushAction < Action
7
+ def self.run(params)
8
+ UI.message("The ding_talk_msg_push plugin is working!")
9
+ # UI.message(params.to_json)
10
+ title = params[:title] || ''
11
+ token = params[:token]
12
+ text = params[:text]
13
+ at_all = params[:at_all] == nil ? false : params[:at_all]
14
+
15
+ curl = %Q{
16
+ curl 'https://oapi.dingtalk.com/robot/send?access_token=#{token}' \
17
+ -H 'Content-Type: application/json' \
18
+ -d ' {
19
+ "msgtype": "markdown",
20
+ "markdown": {
21
+ "title": "#{title}",
22
+ "text": "#{text}"
23
+ },
24
+ "at": {
25
+ "isAtAll": #{at_all}
26
+ }
27
+ }'
28
+ }
29
+ UI.message(curl)
30
+ system curl
31
+ end
32
+ # "atMobiles": [
33
+ # #{mobiles.map { |m| %Q["#{m}"] }.join(',')}
34
+ # ],
35
+
36
+
37
+ def self.description
38
+ "dingTalk robot msg push tool"
39
+ end
40
+
41
+ def self.authors
42
+ ["lingyou"]
43
+ end
44
+
45
+ def self.return_value
46
+ # If your method provides a return value, you can describe here what it does
47
+ end
48
+
49
+ def self.details
50
+ # Optional:
51
+ "钉钉推送工具"
52
+ end
53
+
54
+ def self.available_options
55
+ [
56
+ FastlaneCore::ConfigItem.new(key: :title,
57
+ env_name: "DING_TALK_MSG_PUSH_TITLE",
58
+ description: "the dingtalk msg title",
59
+ optional: false,
60
+ type: String),
61
+ FastlaneCore::ConfigItem.new(key: :token,
62
+ env_name: "DING_TALK_MSG_PUSH_TOKEN",
63
+ description: "the dingtalk robot token",
64
+ optional: false,
65
+ type: String),
66
+ FastlaneCore::ConfigItem.new(key: :text,
67
+ env_name: "DING_TALK_MSG_PUSH_TEXT",
68
+ description: "the content text send",
69
+ optional: false,
70
+ type: String),
71
+ FastlaneCore::ConfigItem.new(key: :at_all,
72
+ env_name: "DING_TALK_MSG_PUSH_AT_ALL",
73
+ description: "at all user",
74
+ is_string: false,
75
+ default_value: false)
76
+ ]
77
+ end
78
+
79
+ def self.is_supported?(platform)
80
+ # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
81
+ # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
82
+ #
83
+ # [:ios, :mac, :android].include?(platform)
84
+ true
85
+ end
86
+ end
87
+ end
88
+ end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module DingTalkMsgPush
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-ding_talk_msg_push
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - asynclog
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-21 00:00:00.000000000 Z
11
+ date: 2019-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -145,6 +145,7 @@ files:
145
145
  - LICENSE
146
146
  - README.md
147
147
  - lib/fastlane/plugin/ding_talk_msg_push.rb
148
+ - lib/fastlane/plugin/ding_talk_msg_push/actions/ding_talk_msg_md_push_action.rb
148
149
  - lib/fastlane/plugin/ding_talk_msg_push/actions/ding_talk_msg_push_action.rb
149
150
  - lib/fastlane/plugin/ding_talk_msg_push/helper/ding_talk_msg_push_helper.rb
150
151
  - lib/fastlane/plugin/ding_talk_msg_push/version.rb