Module: Alephant::Harness::AWS
- Defined in:
- lib/alephant/harness/aws.rb
Class Method Summary collapse
- .config=(environment) ⇒ Object
- .dynamo_config ⇒ Object
- .environment ⇒ Object
- .s3_config ⇒ Object
- .sqs_config ⇒ Object
Class Method Details
.config=(environment) ⇒ Object
13 14 15 |
# File 'lib/alephant/harness/aws.rb', line 13 def config=(environment) @environment = environment end |
.dynamo_config ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/alephant/harness/aws.rb', line 33 def dynamo_config environment.select do |key, _| (ACCESS_CONFIG_KEYS + DYNAMO_CONFIG_KEYS).include?(key) end.map do |key, value| [key.to_s.gsub('dynamo_db_', '').to_sym, value] end.to_h end |
.environment ⇒ Object
9 10 11 |
# File 'lib/alephant/harness/aws.rb', line 9 def environment aws_properties_from(@environment || ENV) end |
.s3_config ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/alephant/harness/aws.rb', line 17 def s3_config environment.select do |key, _| (ACCESS_CONFIG_KEYS + S3_CONFIG_KEYS).include?(key) end.map do |key, value| [key.to_s.gsub('s3_', '').to_sym, value] end.to_h end |
.sqs_config ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/alephant/harness/aws.rb', line 25 def sqs_config environment.select do |key, _| (ACCESS_CONFIG_KEYS + SQS_CONFIG_KEYS).include?(key) end.map do |key, value| [key.to_s.gsub('sqs_', '').to_sym, value] end.to_h end |