Class: Fastlane::Actions::MailgunAction

Inherits:
Fastlane::Action show all
Defined in:
lib/fastlane/actions/mailgun.rb

Class Method Summary collapse

Methods inherited from Fastlane::Action

action_name, authors, details, output, sh, step_text

Class Method Details

.authorObject



79
80
81
# File 'lib/fastlane/actions/mailgun.rb', line 79

def self.author
  "thiagolioy"
end

.available_optionsObject



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/fastlane/actions/mailgun.rb', line 22

def self.available_options
  [
    #This is here just for while due to the transition, not needed anymore
    FastlaneCore::ConfigItem.new(key: :mailgun_sandbox_domain,
                                 env_name: "MAILGUN_SANDBOX_POSTMASTER",
                                 optional: true,
                                 description: "Mailgun sandbox domain postmaster for your mail. Please use postmaster instead"),
    #This is here just for while due to the transition, should use postmaster instead
    FastlaneCore::ConfigItem.new(key: :mailgun_sandbox_postmaster,
                                 env_name: "MAILGUN_SANDBOX_POSTMASTER",
                                 optional: true,
                                 description: "Mailgun sandbox domain postmaster for your mail. Please use postmaster instead"),
    #This is here just for while due to the transition, should use apikey instead
    FastlaneCore::ConfigItem.new(key: :mailgun_apikey,
                                 env_name: "MAILGUN_APIKEY",
                                 optional: true,
                                 description: "Mailgun apikey for your mail. Please use postmaster instead"),

    FastlaneCore::ConfigItem.new(key: :postmaster,
                                 env_name: "MAILGUN_SANDBOX_POSTMASTER",
                                 description: "Mailgun sandbox domain postmaster for your mail"),
    FastlaneCore::ConfigItem.new(key: :apikey,
                                 env_name: "MAILGUN_APIKEY",
                                 description: "Mailgun apikey for your mail"),
    FastlaneCore::ConfigItem.new(key: :to,
                                 env_name: "MAILGUN_TO",
                                 description: "Destination of your mail"),
    FastlaneCore::ConfigItem.new(key: :message,
                                 env_name: "MAILGUN_MESSAGE",
                                 description: "Message of your mail"),
    FastlaneCore::ConfigItem.new(key: :subject,
                                 env_name: "MAILGUN_SUBJECT",
                                 description: "Subject of your mail",
                                 optional: true,
                                 is_string: true,
                                 default_value: "fastlane build"),
    FastlaneCore::ConfigItem.new(key: :success,
                                env_name: "MAILGUN_SUCCESS",
                                description: "Was this build successful? (true/false)",
                                optional: true,
                                default_value: true,
                                is_string: false),
    FastlaneCore::ConfigItem.new(key: :app_link,
                                env_name: "MAILGUN_APP_LINK",
                                description: "App Release link",
                                optional: false,
                                is_string: true),
    FastlaneCore::ConfigItem.new(key: :ci_build_link,
                                env_name: "MAILGUN_CI_BUILD_LINK",
                                description: "CI Build Link",
                                optional: true,
                                is_string: true)


  ]
end

.descriptionObject



18
19
20
# File 'lib/fastlane/actions/mailgun.rb', line 18

def self.description
  "Send a success/error message to an email group"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/fastlane/actions/mailgun.rb', line 7

def self.is_supported?(platform)
  true
end

.run(options) ⇒ Object



11
12
13
14
15
16
# File 'lib/fastlane/actions/mailgun.rb', line 11

def self.run(options)
  require 'rest_client'
  handle_params_transition(options)
  handle_exceptions(options)
  mailgunit(options)
end