Sha256: 59329a74070ba4d9cf7602c3e6120f284cdc0b8e7e1e407efb9451e518ed9b7d

Contents?: true

Size: 1.38 KB

Versions: 19

Compression:

Stored size: 1.38 KB

Contents

# Hndle Option values.
#
# http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html

module Ebfly
  module Options
    NAMESPACES = {
      "asg" => "aws:autoscaling:asg",
      "launchconfiguration" => "aws:autoscaling:launchconfiguration",
      "trigger" => "aws:autoscaling:trigger",
      "rollingupdate" => "aws:autoscaling:updatepolicy:rollingupdate",
      "vpc" => "aws:ec2:vpc",
      "application" => "aws:elasticbeanstalk:application",
      "command" => "aws:elasticbeanstalk:command",
      "environment" => "aws:elasticbeanstalk:environment",
      "monitoring" => "aws:elasticbeanstalk:monitoring",
      "topics" => "aws:elasticbeanstalk:sns:topics",
      "sqsd" => "aws:elasticbeanstalk:sqsd",
      "healthcheck" => "aws:elb:healthcheck",
      "loadbalancer" => "aws:elb:loadbalancer",
      "policies" => "aws:elb:policies",
      "dbinstance" => "aws:rds:dbinstance",
      "hostmanager" => "aws:elasticbeanstalk:hostmanager"
    }

    def parse_option_values(option_values)
      ret = []
      option_values.each do |ov|
        k, value = ov.split('=')
        next if value.nil?
      
        ns, key = k.split('-')
        namespace = NAMESPACES[ns.strip]
        namespace = ns unless namespace
      
        ret << {
          namespace: namespace,
          option_name: key.strip,
          value: value.strip
        }
      end
      ret
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
ebfly-0.1.10 lib/ebfly/options.rb
ebfly-0.1.9 lib/ebfly/options.rb
ebfly-0.1.8 lib/ebfly/options.rb
ebfly-0.1.7 lib/ebfly/options.rb
ebfly-0.1.6 lib/ebfly/options.rb
ebfly-0.1.5 lib/ebfly/options.rb
ebfly-0.1.4 lib/ebfly/options.rb
ebfly-0.1.3 lib/ebfly/options.rb
ebfly-0.1.2 lib/ebfly/options.rb
ebfly-0.1.1 lib/ebfly/options.rb
ebfly-0.1.0 lib/ebfly/options.rb
ebfly-0.0.10 lib/ebfly/options.rb
ebfly-0.0.9 lib/ebfly/options.rb
ebfly-0.0.8 lib/ebfly/options.rb
ebfly-0.0.7 lib/ebfly/options.rb
ebfly-0.0.6 lib/ebfly/options.rb
ebfly-0.0.5 lib/ebfly/options.rb
ebfly-0.0.4 lib/ebfly/options.rb
ebfly-0.0.3 lib/ebfly/options.rb