Class: FontProcessor::Config
- Inherits:
-
Object
- Object
- FontProcessor::Config
- Defined in:
- lib/fontprocessor/config.rb
Class Method Summary collapse
-
.airbrake_api_key ⇒ Object
Public: The Airbrake API key from from /etc/typekit.yml.
-
.environment ⇒ Object
Public: The environment fontprocessor is running in.
-
.flex_sdk_path ⇒ Object
Public: The environment fontprocessor is running in.
-
.logger ⇒ Object
Public: The logger to write messages to.
-
.mongo_db ⇒ Object
Public: The mongo database name from config/environment.yml.
-
.mongo_host ⇒ Object
Public: The mongo server.
-
.redis_server ⇒ Object
Public: The redis server and port.
- .s3_client ⇒ Object
-
.s3_processed_bucket ⇒ Object
Public: The S3 processed font file bucket from config/environment.yml.
-
.s3_source_bucket ⇒ Object
Public: The S3 source font file bucket from config/environment.yml.
Class Method Details
.airbrake_api_key ⇒ Object
Public: The Airbrake API key from from /etc/typekit.yml
38 39 40 |
# File 'lib/fontprocessor/config.rb', line 38 def airbrake_api_key config["airbrake_api_key"] end |
.environment ⇒ Object
Public: The environment fontprocessor is running in. One of “development”, “test”, “staging” or “production”
44 45 46 |
# File 'lib/fontprocessor/config.rb', line 44 def environment ENV['ENV'] || 'development' end |
.flex_sdk_path ⇒ Object
Public: The environment fontprocessor is running in. One of “development”, “test”, “staging” or “production”
50 51 52 |
# File 'lib/fontprocessor/config.rb', line 50 def flex_sdk_path ENV['FLEX_SDK_HOME'] or raise "Environment variable 'FLEX_SDK_HOME' is undefined but is required." end |
.logger ⇒ Object
Public: The logger to write messages to. In production and development it’s STDOUT and during testing its an in memory buffer.
60 61 62 63 64 65 66 |
# File 'lib/fontprocessor/config.rb', line 60 def logger if defined? RSpec StringIO.new else STDOUT end end |
.mongo_db ⇒ Object
Public: The mongo database name from config/environment.yml
22 23 24 |
# File 'lib/fontprocessor/config.rb', line 22 def mongo_db typekit_config['mongo_db'] || config['mongo_db'] end |
.mongo_host ⇒ Object
Public: The mongo server. typekit.yml will override config/environment.yml
17 18 19 |
# File 'lib/fontprocessor/config.rb', line 17 def mongo_host typekit_config['mongo_host'] || config['mongo_host'] end |
.redis_server ⇒ Object
Public: The redis server and port. typekit.yml will override config/environment.yml
11 12 13 |
# File 'lib/fontprocessor/config.rb', line 11 def redis_server typekit_config['redis_server'] || config['redis_server'] end |
.s3_client ⇒ Object
54 55 56 |
# File 'lib/fontprocessor/config.rb', line 54 def s3_client @s3_client ||= Aws::S3::Client.new(region: 'us-east-1') end |
.s3_processed_bucket ⇒ Object
Public: The S3 processed font file bucket from config/environment.yml
32 33 34 |
# File 'lib/fontprocessor/config.rb', line 32 def s3_processed_bucket typekit_config['s3_processed_bucket'] || config['s3_processed_bucket'] end |
.s3_source_bucket ⇒ Object
Public: The S3 source font file bucket from config/environment.yml
27 28 29 |
# File 'lib/fontprocessor/config.rb', line 27 def s3_source_bucket typekit_config['s3_source_bucket'] || config['s3_source_bucket'] end |