Class: AmazonStaticSite::Service
- Inherits:
-
Object
- Object
- AmazonStaticSite::Service
- Defined in:
- lib/amazon_static_site/service.rb
Instance Attribute Summary collapse
-
#cloudflare ⇒ Object
readonly
Returns the value of attribute cloudflare.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#s3 ⇒ Object
readonly
Returns the value of attribute s3.
-
#uploader ⇒ Object
readonly
Returns the value of attribute uploader.
Instance Method Summary collapse
-
#initialize(config) ⇒ Service
constructor
A new instance of Service.
- #run_cloudflare ⇒ Object
- #run_s3 ⇒ Object
- #run_upload ⇒ Object
Constructor Details
Instance Attribute Details
#cloudflare ⇒ Object (readonly)
Returns the value of attribute cloudflare.
3 4 5 |
# File 'lib/amazon_static_site/service.rb', line 3 def cloudflare @cloudflare end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
3 4 5 |
# File 'lib/amazon_static_site/service.rb', line 3 def config @config end |
#s3 ⇒ Object (readonly)
Returns the value of attribute s3.
3 4 5 |
# File 'lib/amazon_static_site/service.rb', line 3 def s3 @s3 end |
#uploader ⇒ Object (readonly)
Returns the value of attribute uploader.
3 4 5 |
# File 'lib/amazon_static_site/service.rb', line 3 def uploader @uploader end |
Instance Method Details
#run_cloudflare ⇒ Object
21 22 23 |
# File 'lib/amazon_static_site/service.rb', line 21 def run_cloudflare cloudflare.configure_dns end |
#run_s3 ⇒ Object
12 13 14 15 |
# File 'lib/amazon_static_site/service.rb', line 12 def run_s3 s3.create_buckets s3.publish_static_website_on_s3 end |
#run_upload ⇒ Object
17 18 19 |
# File 'lib/amazon_static_site/service.rb', line 17 def run_upload uploader.upload_to(s3.primary) end |