Class: Postnhost::Configuration
- Inherits:
-
Object
- Object
- Postnhost::Configuration
- Defined in:
- lib/postnhost/configuration.rb
Constant Summary collapse
- PUBLIC_PAGE_SIZE_RANGE =
(1..100)
Instance Attribute Summary collapse
-
#aws_access_key_id ⇒ Object
AWS/S3 Storage.
-
#aws_bucket ⇒ Object
AWS/S3 Storage.
-
#aws_endpoint_url_s3 ⇒ Object
AWS/S3 Storage.
-
#aws_region ⇒ Object
AWS/S3 Storage.
-
#aws_secret_access_key ⇒ Object
AWS/S3 Storage.
-
#default_timezone ⇒ Object
Integrations.
-
#openai_api_key ⇒ Object
Integrations.
-
#openai_gpt_model ⇒ Object
Integrations.
-
#public_page_size ⇒ Object
Site defaults.
-
#site_url ⇒ Object
Site defaults.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/postnhost/configuration.rb', line 17 def initialize # Integrations @default_timezone = rails_default_timezone @site_url = nil @public_page_size = 12 @openai_api_key = credentials_dig(:postnhost, :openai_access_token) @openai_gpt_model = credentials_dig(:postnhost, :openai_gpt_model) # AWS/S3 (from Rails credentials) @aws_access_key_id = credentials_dig(:postnhost, :aws_access_key_id) @aws_secret_access_key = credentials_dig(:postnhost, :aws_secret_access_key) @aws_region = credentials_dig(:postnhost, :aws_region) @aws_bucket = credentials_dig(:postnhost, :aws_bucket_name) @aws_endpoint_url_s3 = credentials_dig(:postnhost, :aws_endpoint_url_s3) end |
Instance Attribute Details
#aws_access_key_id ⇒ Object
AWS/S3 Storage
14 15 16 |
# File 'lib/postnhost/configuration.rb', line 14 def aws_access_key_id @aws_access_key_id end |
#aws_bucket ⇒ Object
AWS/S3 Storage
14 15 16 |
# File 'lib/postnhost/configuration.rb', line 14 def aws_bucket @aws_bucket end |
#aws_endpoint_url_s3 ⇒ Object
AWS/S3 Storage
14 15 16 |
# File 'lib/postnhost/configuration.rb', line 14 def aws_endpoint_url_s3 @aws_endpoint_url_s3 end |
#aws_region ⇒ Object
AWS/S3 Storage
14 15 16 |
# File 'lib/postnhost/configuration.rb', line 14 def aws_region @aws_region end |
#aws_secret_access_key ⇒ Object
AWS/S3 Storage
14 15 16 |
# File 'lib/postnhost/configuration.rb', line 14 def aws_secret_access_key @aws_secret_access_key end |
#default_timezone ⇒ Object
Integrations
8 9 10 |
# File 'lib/postnhost/configuration.rb', line 8 def default_timezone @default_timezone end |
#openai_api_key ⇒ Object
Integrations
8 9 10 |
# File 'lib/postnhost/configuration.rb', line 8 def openai_api_key @openai_api_key end |
#openai_gpt_model ⇒ Object
Integrations
8 9 10 |
# File 'lib/postnhost/configuration.rb', line 8 def openai_gpt_model @openai_gpt_model end |
#public_page_size ⇒ Object
Site defaults
11 12 13 |
# File 'lib/postnhost/configuration.rb', line 11 def public_page_size @public_page_size end |
#site_url ⇒ Object
Site defaults
11 12 13 |
# File 'lib/postnhost/configuration.rb', line 11 def site_url @site_url end |