Class: AwsDeploy::NotificationsController

Inherits:
AwsDeployApplicationController show all
Defined in:
app/controllers/aws_deploy/notifications_controller.rb

Instance Method Summary collapse

Methods inherited from AwsDeployApplicationController

#_aws_access_key_id, #_aws_bucket, #_aws_secret_access_key, #_exist_config?, #_md5_file, #_zip_file, #authenticate, #aws_secret?

Instance Method Details

#indexObject



8
9
10
# File 'app/controllers/aws_deploy/notifications_controller.rb', line 8

def index

end

#sendnObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'app/controllers/aws_deploy/notifications_controller.rb', line 15

def sendn

  @errors = []
  params.keys.each do |k|
    if k.starts_with?("item_")

      vals = params[k].split("|")

      begin
        _sendn(vals[0], vals[1])
      rescue Exception => e
        @errors << "Problem sending to: #{vals[0]}|#{vals[1]}|#{vals[2]} ... #{e}"
      end

    end
  end

  flash[:message] = "Push sent! - #{Time.now.strftime('%Y/%m/%d %H:%M:%S')}"
  flash[:errors] = @errors
  redirect_to :action => :index
end