fastlane-plugin-discord_notifier 0.1.0 → 0.1.1

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: a03f0186cddc2c1e82f77667da84e996939c2c7bf391de8ce5036d5426b75e83
4
- data.tar.gz: d85a8192ad78f2f1e247c3cfe9c922604c35fbcc417be7fd1931ee0e9c1727c6
3
+ metadata.gz: 3001a33edbdf017d3f5c0e0b27042bad5faed8b868c9d411f062a92f5a93937b
4
+ data.tar.gz: 484b513d6f1da18ca2564d20587fc632b40551ab7e307125a44ae4fca57c7e3e
5
5
  SHA512:
6
- metadata.gz: 0c5958d661e8ca204d5667839bedc881d7cba218820dd37514937181a5b1a5d210fec96197f343d18bf2715fc52314ab61b70b75c383d805156bc574eec72c5b
7
- data.tar.gz: '08c7510ca768882c49801266912a633b26fe68232635014a5e206d0de4fd736c21a55f463da33cc5805ada919ae6b690076b00834ad6a470b604b3b34af80f17'
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 = "Title"
16
- embed.description = "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
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module DiscordNotifier
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  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.0
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-17 00:00:00.000000000 Z
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
- rubygems_version: 3.0.1
170
+ rubyforge_project:
171
+ rubygems_version: 2.7.10
171
172
  signing_key:
172
173
  specification_version: 4
173
174
  summary: Discord Notifier