Class: OdaniaStaticPages::Config::Deploy::S3
- Inherits:
-
Object
- Object
- OdaniaStaticPages::Config::Deploy::S3
- Defined in:
- lib/odania_static_pages/config/s3.rb
Instance Attribute Summary collapse
-
#bucket_name_blue ⇒ Object
readonly
Returns the value of attribute bucket_name_blue.
-
#bucket_name_green ⇒ Object
readonly
Returns the value of attribute bucket_name_green.
-
#logging_bucket ⇒ Object
readonly
Returns the value of attribute logging_bucket.
-
#profile ⇒ Object
readonly
Returns the value of attribute profile.
-
#region ⇒ Object
readonly
Returns the value of attribute region.
-
#state_bucket ⇒ Object
readonly
Returns the value of attribute state_bucket.
Instance Method Summary collapse
-
#initialize(bucket_name_green: 'odania-http-green', bucket_name_blue: 'odania-http-blue', logging_bucket: 'odania-logging', region: 'eu-central-1', state_bucket: 'odania-state', profile: nil, tags: {deployed_by: 'odania-static-pages'}) ⇒ S3
constructor
A new instance of S3.
- #tags ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize(bucket_name_green: 'odania-http-green', bucket_name_blue: 'odania-http-blue', logging_bucket: 'odania-logging', region: 'eu-central-1', state_bucket: 'odania-state', profile: nil, tags: {deployed_by: 'odania-static-pages'}) ⇒ S3
Returns a new instance of S3.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/odania_static_pages/config/s3.rb', line 7 def initialize(bucket_name_green: 'odania-http-green', bucket_name_blue: 'odania-http-blue', logging_bucket: 'odania-logging', region: 'eu-central-1', state_bucket: 'odania-state', profile: nil, tags: {deployed_by: 'odania-static-pages'}) @bucket_name_green = bucket_name_green @bucket_name_blue = bucket_name_blue @logging_bucket = logging_bucket @state_bucket = state_bucket @region = region @profile = profile @tags = end |
Instance Attribute Details
#bucket_name_blue ⇒ Object (readonly)
Returns the value of attribute bucket_name_blue.
5 6 7 |
# File 'lib/odania_static_pages/config/s3.rb', line 5 def bucket_name_blue @bucket_name_blue end |
#bucket_name_green ⇒ Object (readonly)
Returns the value of attribute bucket_name_green.
5 6 7 |
# File 'lib/odania_static_pages/config/s3.rb', line 5 def bucket_name_green @bucket_name_green end |
#logging_bucket ⇒ Object (readonly)
Returns the value of attribute logging_bucket.
5 6 7 |
# File 'lib/odania_static_pages/config/s3.rb', line 5 def logging_bucket @logging_bucket end |
#profile ⇒ Object (readonly)
Returns the value of attribute profile.
5 6 7 |
# File 'lib/odania_static_pages/config/s3.rb', line 5 def profile @profile end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
5 6 7 |
# File 'lib/odania_static_pages/config/s3.rb', line 5 def region @region end |
#state_bucket ⇒ Object (readonly)
Returns the value of attribute state_bucket.
5 6 7 |
# File 'lib/odania_static_pages/config/s3.rb', line 5 def state_bucket @state_bucket end |
Instance Method Details
#tags ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/odania_static_pages/config/s3.rb', line 31 def result = [] @tags.each_pair do |key, val| result << {key: key, value: val} end result end |
#to_h ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/odania_static_pages/config/s3.rb', line 19 def to_h { bucket_name_green: @bucket_name_green, bucket_name_blue: @bucket_name_blue, logging_bucket: @logging_bucket, state_bucket: @state_bucket, region: @region, profile: @profile, tags: @tags.stringify_keys! }.stringify_keys! end |