Class: Fastlane::Actions::SlackTrainCrashAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/slack_train/actions/slack_train_crash_action.rb

Class Method Summary collapse

Class Method Details

.authorsObject



16
17
18
# File 'lib/fastlane/plugin/slack_train/actions/slack_train_crash_action.rb', line 16

def self.authors
  ["@KrauseFx"]
end

.descriptionObject



12
13
14
# File 'lib/fastlane/plugin/slack_train/actions/slack_train_crash_action.rb', line 12

def self.description
  ""
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/fastlane/plugin/slack_train/actions/slack_train_crash_action.rb', line 20

def self.is_supported?(platform)
  true
end

.run(params) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/fastlane/plugin/slack_train/actions/slack_train_crash_action.rb', line 4

def self.run(params)
  total_distance = lane_context[SharedValues::SLACK_TRAIN_DISTANCE]
  return if total_distance.nil? # train hasn't started yet

  message = "💥" * total_distance
  other_action.slack(message: message, success: false, default_payloads: [])
end