fastlane-plugin-testbm 0.1.8 → 0.1.13

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: 9e299d62d1716ed3f51df83da6c313651a33549ed83ce5f98813b269e61927ce
4
- data.tar.gz: 6ffed1298fb5da24e9e53aca34b648b9e624dda513329a8215b7f997564c43f2
3
+ metadata.gz: 8d51ae44fdcb2eb4ce01781ae9c112d19e331c678eddf087af0907aeda972035
4
+ data.tar.gz: 1960915e2f76f09aeea0655688e13a639a79d20d9ee74969307b11da5ba71542
5
5
  SHA512:
6
- metadata.gz: 527a92670ae9b9faa49eb5514fb047f877623d3c273a83bb3148f5d450b4c7afba6a342b3dc562088152653c2672c24012e27bf03e005c4fcf35137526a2d0fc
7
- data.tar.gz: 4dcb675f63af1b2d56a378ee59c971ca03fb5f10f74278eb5b2e227e5a3fc7d412e29e579781090c8b60849136cce5ac1151c9b405a12bd61b8b41a0a90e27f3
6
+ metadata.gz: 258ce81e49b7177aade18b043cd21245f24126193236c07d295e077637d4753e9deaedbbd7a05db5676fb11178b4658eb88d7edda2630ea35b9538ddadd44149
7
+ data.tar.gz: b45d94f896700da2ccaab3f7d10aff039ad14f067bb1998de7396b5c9e02d14999f7ae2cf379910bf46c899b8a63faf295102d7cf718da15ed6a31545f54674a
@@ -0,0 +1,58 @@
1
+ require 'fastlane/action'
2
+
3
+ module Fastlane
4
+ module Actions
5
+ class BmslackAction < Action
6
+ def self.run(params)
7
+ slack_icon = params[:slack_icon]
8
+ message_text = params[:message_text]
9
+ other_action.slack(
10
+ message: message_text,
11
+ success: true,
12
+ icon_url: slack_icon,
13
+ default_payloads: [:lane, :git_branch, :git_author],
14
+ username: "Bemobile Fastlane Plugin - #{ENV["PRIVATE_APP_NAME"]}"
15
+ )
16
+ UI.message("Message sent to Slack!")
17
+ end
18
+
19
+ def self.description
20
+ "Sends a message to a Slack chat specified in the SLACK_URL environment variable."
21
+ end
22
+
23
+ def self.authors
24
+ ["Erick, Legna @ Bemobile."]
25
+ end
26
+
27
+ def self.return_value
28
+ # If your method provides a return value, you can describe here what it does
29
+ end
30
+
31
+ def self.details
32
+ "Sends a message to a Slack webhook. The message must be passed to the function as a parameter named message_text.
33
+ An icon must be specified as a param named slack_icon, or as an environment variable named SLACK_ICON.
34
+ The webhook URL must be specified as an environment variable called SLACK_URL.
35
+ The username which sends the message can be appendend with the environment variable called PRIVATE_APP_NAME."
36
+ end
37
+
38
+ def self.available_options
39
+ [
40
+ FastlaneCore::ConfigItem.new(key: :message_text,
41
+ env_name: "MESSAGE_TEXT",
42
+ description: "The chat message to be sent to Slack",
43
+ optional: false,
44
+ type: String),
45
+ FastlaneCore::ConfigItem.new(key: :slack_icon,
46
+ env_name: "SLACK_ICON",
47
+ description: "The user icon to be posted to Slack",
48
+ optional: false,
49
+ type: String)
50
+ ]
51
+ end
52
+
53
+ def self.is_supported?(platform)
54
+ true
55
+ end
56
+ end
57
+ end
58
+ end
@@ -11,6 +11,17 @@ module Fastlane
11
11
  def self.show_message
12
12
  UI.message("Hello from the testbm plugin helper!")
13
13
  end
14
+
15
+ #Notify via slack channel a generic message with the default payloads
16
+ def self.slack_func_notify(message_text)
17
+ other_action.slack(
18
+ message: message_text,
19
+ success: true,
20
+ default_payloads: [:lane, :git_branch, :git_author],
21
+ icon_url: ENV["SLACK_ICON"],
22
+ username: "fastlane - #{ENV["PRIVATE_APP_NAME"]}")
23
+ end
24
+
14
25
  end
15
26
  end
16
27
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Testbm
3
- VERSION = "0.1.8"
3
+ VERSION = "0.1.13"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-testbm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bemobile
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-18 00:00:00.000000000 Z
11
+ date: 2021-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -145,7 +145,7 @@ files:
145
145
  - LICENSE
146
146
  - README.md
147
147
  - lib/fastlane/plugin/testbm.rb
148
- - lib/fastlane/plugin/testbm/actions/chat_action.rb
148
+ - lib/fastlane/plugin/testbm/actions/bmslack_action.rb
149
149
  - lib/fastlane/plugin/testbm/actions/salutation_action.rb
150
150
  - lib/fastlane/plugin/testbm/actions/testbm_action.rb
151
151
  - lib/fastlane/plugin/testbm/helper/testbm_helper.rb
@@ -1,66 +0,0 @@
1
- require 'fastlane/action'
2
-
3
- module Fastlane
4
- module Actions
5
- class ChatAction < Action
6
- def self.run(params)
7
- slack_icon = params[:slack_icon]
8
- chat_message = params[:chat_message]
9
- slack_url = params[:slack_url]
10
- other_action.slack(
11
- message: chat_message,
12
- success: true,
13
- slack_url: slack_url,
14
- icon_url: slack_icon,
15
- username: "Bemobile Fastlane Plugin - #{ENV["PRIVATE_APP_NAME"]}"
16
- )
17
- UI.message("Message sent to Slack!")
18
- end
19
-
20
- def self.description
21
- "Returns hello world"
22
- end
23
-
24
- def self.authors
25
- ["Bemobile"]
26
- end
27
-
28
- def self.return_value
29
- # If your method provides a return value, you can describe here what it does
30
- end
31
-
32
- def self.details
33
- # Optional:
34
- "Just a test plugin"
35
- end
36
-
37
- def self.available_options
38
- [
39
- FastlaneCore::ConfigItem.new(key: :chat_message,
40
- env_name: "CHAT_MESSAGE",
41
- description: "The chat message to be sent to Slack",
42
- optional: false,
43
- type: String),
44
- FastlaneCore::ConfigItem.new(key: :slack_icon,
45
- env_name: "SLACK_ICON",
46
- description: "The icon to be posted to Slack",
47
- optional: false,
48
- type: String),
49
- FastlaneCore::ConfigItem.new(key: :slack_url,
50
- env_name: "SLACK_URL",
51
- description: "The webhook's url to where we will post in Slack",
52
- optional: false,
53
- type: String),
54
- ]
55
- end
56
-
57
- def self.is_supported?(platform)
58
- # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
59
- # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
60
- #
61
- # [:ios, :mac, :android].include?(platform)
62
- true
63
- end
64
- end
65
- end
66
- end