Class: Fastlane::Actions::AwsSnsTopicAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::AwsSnsTopicAction
- Defined in:
- lib/fastlane/plugin/aws_sns_topic/actions/aws_sns_topic_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .return_value ⇒ Object
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
31 32 33 |
# File 'lib/fastlane/plugin/aws_sns_topic/actions/aws_sns_topic_action.rb', line 31 def self. ["Levi Bostian"] end |
.available_options ⇒ Object
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 |
# File 'lib/fastlane/plugin/aws_sns_topic/actions/aws_sns_topic_action.rb', line 43 def self. [ FastlaneCore::ConfigItem.new(key: :access_key, env_name: "AWS_SNS_ACCESS_KEY", description: "AWS Access Key ID", optional: false, default_value: ENV['AWS_ACCESS_KEY_ID']), FastlaneCore::ConfigItem.new(key: :secret_access_key, env_name: "AWS_SNS_SECRET_ACCESS_KEY", description: "AWS Secret Access Key", optional: false, default_value: ENV['AWS_SECRET_ACCESS_KEY']), FastlaneCore::ConfigItem.new(key: :region, env_name: "AWS_SNS_REGION", description: "AWS Region", optional: false, default_value: ENV['AWS_REGION']), FastlaneCore::ConfigItem.new(key: :topic_arn, env_name: "AWS_SNS_TOPIC_ARN", description: "AWS SNS topic ARN for the topic to send message to", optional: false, default_value: ENV['AWS_SNS_TOPIC_ARN']), FastlaneCore::ConfigItem.new(key: :message, env_name: "AWS_SNS_TOPIC_MESSAGE", description: "The message you want to send to the AWS SNS topic", optional: false, default_value: ENV['AWS_SNS_TOPIC_MESSAGE']), FastlaneCore::ConfigItem.new(key: :subject, env_name: "AWS_SNS_TOPIC_SUBJECT", description: "The subject you want to send to the AWS SNS topic", optional: false, default_value: ENV['AWS_SNS_TOPIC_SUBJECT']) ] end |
.description ⇒ Object
27 28 29 |
# File 'lib/fastlane/plugin/aws_sns_topic/actions/aws_sns_topic_action.rb', line 27 def self.description "Public a message to a AWS SNS topic." end |
.details ⇒ Object
39 40 41 |
# File 'lib/fastlane/plugin/aws_sns_topic/actions/aws_sns_topic_action.rb', line 39 def self.details "Public a new message to an AWS SNS topic. Created with the original intent of notifying a SNS topic about a new app release." end |
.is_supported?(platform) ⇒ Boolean
78 79 80 81 82 83 84 |
# File 'lib/fastlane/plugin/aws_sns_topic/actions/aws_sns_topic_action.rb', line 78 def self.is_supported?(platform) # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example) # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform # # [:ios, :mac, :android].include?(platform) true end |
.return_value ⇒ Object
35 36 37 |
# File 'lib/fastlane/plugin/aws_sns_topic/actions/aws_sns_topic_action.rb', line 35 def self.return_value # If your method provides a return value, you can describe here what it does end |
.run(params) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/fastlane/plugin/aws_sns_topic/actions/aws_sns_topic_action.rb', line 9 def self.run(params) access_key = params[:access_key] secret_access_key = params[:secret_access_key] region = params[:region] topic_arn = params[:topic_arn] = params[:message] subject = params[:subject] Helper::AwsSnsTopicHelper.verify_params(params, [:access_key, :secret_access_key, :region, :topic_arn, :message, :subject]) topic_sender = Helper::AwsSns.new(access_key, secret_access_key, region, topic_arn) UI.("Sending message to SNS topic...") topic_sender.(, subject) UI.success("AWS SNS Topic message sent!") end |