Class: Helios::Sitemap::Configuration
- Inherits:
-
Object
- Object
- Helios::Sitemap::Configuration
- Defined in:
- lib/helios/sitemap/configuration.rb
Instance Attribute Summary collapse
-
#aws_access_key_id ⇒ Object
Returns the value of attribute aws_access_key_id.
-
#aws_bucket ⇒ Object
Returns the value of attribute aws_bucket.
-
#aws_region ⇒ Object
Returns the value of attribute aws_region.
-
#aws_secret_access_key ⇒ Object
Returns the value of attribute aws_secret_access_key.
-
#default_host ⇒ Object
Returns the value of attribute default_host.
-
#indexnow_api_key ⇒ Object
Returns the value of attribute indexnow_api_key.
-
#indexnow_domain ⇒ Object
Returns the value of attribute indexnow_domain.
-
#indexnow_urls ⇒ Object
Returns the value of attribute indexnow_urls.
-
#s3_object_key ⇒ Object
Returns the value of attribute s3_object_key.
-
#sitemap_entries ⇒ Object
Returns the value of attribute sitemap_entries.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #s3_client ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
15 16 17 18 19 20 21 22 23 |
# File 'lib/helios/sitemap/configuration.rb', line 15 def initialize @s3_object_key = "sitemaps/sitemap.xml.gz" @aws_region = ENV["AWS_REGION"] @aws_bucket = ENV["AWS_SITEMAP_BUCKET"] @aws_access_key_id = ENV["AWS_ACCESS_KEY_ID"] @aws_secret_access_key = ENV["AWS_SECRET_ACCESS_KEY"] @indexnow_domain = ENV["INDEXNOW_DOMAIN"] @indexnow_api_key = ENV["INDEXNOW_API_KEY"] end |
Instance Attribute Details
#aws_access_key_id ⇒ Object
Returns the value of attribute aws_access_key_id.
4 5 6 |
# File 'lib/helios/sitemap/configuration.rb', line 4 def aws_access_key_id @aws_access_key_id end |
#aws_bucket ⇒ Object
Returns the value of attribute aws_bucket.
4 5 6 |
# File 'lib/helios/sitemap/configuration.rb', line 4 def aws_bucket @aws_bucket end |
#aws_region ⇒ Object
Returns the value of attribute aws_region.
4 5 6 |
# File 'lib/helios/sitemap/configuration.rb', line 4 def aws_region @aws_region end |
#aws_secret_access_key ⇒ Object
Returns the value of attribute aws_secret_access_key.
4 5 6 |
# File 'lib/helios/sitemap/configuration.rb', line 4 def aws_secret_access_key @aws_secret_access_key end |
#default_host ⇒ Object
Returns the value of attribute default_host.
4 5 6 |
# File 'lib/helios/sitemap/configuration.rb', line 4 def default_host @default_host end |
#indexnow_api_key ⇒ Object
Returns the value of attribute indexnow_api_key.
4 5 6 |
# File 'lib/helios/sitemap/configuration.rb', line 4 def indexnow_api_key @indexnow_api_key end |
#indexnow_domain ⇒ Object
Returns the value of attribute indexnow_domain.
4 5 6 |
# File 'lib/helios/sitemap/configuration.rb', line 4 def indexnow_domain @indexnow_domain end |
#indexnow_urls ⇒ Object
Returns the value of attribute indexnow_urls.
4 5 6 |
# File 'lib/helios/sitemap/configuration.rb', line 4 def indexnow_urls @indexnow_urls end |
#s3_object_key ⇒ Object
Returns the value of attribute s3_object_key.
4 5 6 |
# File 'lib/helios/sitemap/configuration.rb', line 4 def s3_object_key @s3_object_key end |
#sitemap_entries ⇒ Object
Returns the value of attribute sitemap_entries.
4 5 6 |
# File 'lib/helios/sitemap/configuration.rb', line 4 def sitemap_entries @sitemap_entries end |
Instance Method Details
#s3_client ⇒ Object
25 26 27 28 29 30 |
# File 'lib/helios/sitemap/configuration.rb', line 25 def s3_client Aws::S3::Client.new( region: aws_region, credentials: Aws::Credentials.new(aws_access_key_id, aws_secret_access_key) ) end |