fastlane-plugin-discord_notifier 0.1.0 → 0.1.1
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3001a33edbdf017d3f5c0e0b27042bad5faed8b868c9d411f062a92f5a93937b
|
|
4
|
+
data.tar.gz: 484b513d6f1da18ca2564d20587fc632b40551ab7e307125a44ae4fca57c7e3e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ff1a4850e14eb14761965adbcc50b89342e62f7e6fd0d5d6261556e06bd110064340e418cee9d5020ff481c1b4edd69fa93387dbc308b6ff24325c8fa2080ed0
|
|
7
|
+
data.tar.gz: ab56eadd8fca161bef9914b8668949b428b08710e7c3c7a14c5e2bb640f9d358f7a781eae42bd9eabfff91eed2c3d8da11cc7adf6d4ab0e3ae8ff935caba77b0
|
|
@@ -6,14 +6,31 @@ module Fastlane
|
|
|
6
6
|
module Actions
|
|
7
7
|
class DiscordNotifierAction < Action
|
|
8
8
|
def self.run(params)
|
|
9
|
+
|
|
9
10
|
UI.message("Notifying Discord")
|
|
10
11
|
|
|
12
|
+
color = params[:success] ? "4BB543" : "CC0000"
|
|
11
13
|
|
|
14
|
+
unless params[:color].nil? || params[:color] == 0
|
|
15
|
+
color = params[:color]
|
|
16
|
+
end
|
|
17
|
+
|
|
12
18
|
client = Discordrb::Webhooks::Client.new(url: params[:webhook_url])
|
|
13
19
|
client.execute do |builder|
|
|
14
20
|
builder.add_embed do |embed|
|
|
15
|
-
embed.title =
|
|
16
|
-
embed.description =
|
|
21
|
+
embed.title = params[:title]
|
|
22
|
+
embed.description = params[:description]
|
|
23
|
+
embed.thumbnail = Discordrb::Webhooks::EmbedThumbnail.new(
|
|
24
|
+
url: params[:thumbnail_url]
|
|
25
|
+
)
|
|
26
|
+
embed.image = Discordrb::Webhooks::EmbedImage.new(
|
|
27
|
+
url: params[:image_url]
|
|
28
|
+
)
|
|
29
|
+
embed.author = Discordrb::Webhooks::EmbedAuthor.new(
|
|
30
|
+
name: params[:author]
|
|
31
|
+
)
|
|
32
|
+
embed.colour = color
|
|
33
|
+
embed.timestamp = Time.now
|
|
17
34
|
end
|
|
18
35
|
end
|
|
19
36
|
end
|
|
@@ -43,6 +60,42 @@ module Fastlane
|
|
|
43
60
|
description: "Discord Webhook URL",
|
|
44
61
|
optional: false,
|
|
45
62
|
type: String
|
|
63
|
+
),
|
|
64
|
+
FastlaneCore::ConfigItem.new(
|
|
65
|
+
key: :title,
|
|
66
|
+
optional: false,
|
|
67
|
+
type: String
|
|
68
|
+
),
|
|
69
|
+
FastlaneCore::ConfigItem.new(
|
|
70
|
+
key: :description,
|
|
71
|
+
optional: false,
|
|
72
|
+
type: String
|
|
73
|
+
),
|
|
74
|
+
FastlaneCore::ConfigItem.new(
|
|
75
|
+
key: :thumbnail_url,
|
|
76
|
+
optional: true,
|
|
77
|
+
type: String
|
|
78
|
+
),
|
|
79
|
+
FastlaneCore::ConfigItem.new(
|
|
80
|
+
key: :image_url,
|
|
81
|
+
optional: true,
|
|
82
|
+
type: String
|
|
83
|
+
),
|
|
84
|
+
FastlaneCore::ConfigItem.new(
|
|
85
|
+
key: :author,
|
|
86
|
+
optional: true,
|
|
87
|
+
type: String
|
|
88
|
+
),
|
|
89
|
+
FastlaneCore::ConfigItem.new(
|
|
90
|
+
key: :success,
|
|
91
|
+
optional: true,
|
|
92
|
+
default_value: true,
|
|
93
|
+
is_string: false
|
|
94
|
+
),
|
|
95
|
+
FastlaneCore::ConfigItem.new(
|
|
96
|
+
key: :color,
|
|
97
|
+
optional: true,
|
|
98
|
+
type: String
|
|
46
99
|
)
|
|
47
100
|
]
|
|
48
101
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fastlane-plugin-discord_notifier
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nikos Theodosis
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-04-
|
|
11
|
+
date: 2020-04-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pry
|
|
@@ -167,7 +167,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
167
167
|
- !ruby/object:Gem::Version
|
|
168
168
|
version: '0'
|
|
169
169
|
requirements: []
|
|
170
|
-
|
|
170
|
+
rubyforge_project:
|
|
171
|
+
rubygems_version: 2.7.10
|
|
171
172
|
signing_key:
|
|
172
173
|
specification_version: 4
|
|
173
174
|
summary: Discord Notifier
|