Exercism Config

Tests Maintainability Test Coverage Gem Version

Usage

This gem provides you with the following config, secrets and helper methods:

# Config

Exercism.config.anycable_redis_url
Exercism.config.anycable_rpc_host
Exercism.config.aws_submissions_bucket
Exercism.config.aws_tooling_jobs_bucket
Exercism.config.dynamodb_tooling_jobs_table
Exercism.config.dynamodb_tooling_language_groups_table
Exercism.config.mysql_master_endpoint
Exercism.config.mysql_port
Exercism.config.spi_url
Exercism.config.tooling_orchestrator_url
Exercism.config.language_server_url
Exercism.config.opensearch_host

# Secrets
Exercism.secrets.github_access_token
Exercism.secrets.github_omniauth_app_id
Exercism.secrets.github_omniauth_app_secret
Exercism.secrets.github_webhooks_secret
Exercism.secrets.hcaptcha_site_key
Exercism.secrets.hcaptcha_secret

# Helper methods (create new clients)
Exercism.dynamodb_client
Exercism.s3_client
Exercism.ecr_client
Exercism.octokit_client
Exercism.opensearch_client
Exercism.discourse_client

Explanation

When terraform creates Exercism's infrastructure, it writes endpoints and DNS entries to DynamoDB. This gem allows you to trivially retrieve that data.

When running on AWS, simply ensure the machine has read-access to the relevant table (currently hardcoded to config).

Local AWS

This requires a local version of AWS to work. We use localstack for this. To start localstack use the following command:

docker run -dp 3042:8080 -p 3040:4566 -p 3041:4566 localstack/localstack

Usage

Simply include this gem in your Gemfile, require it, and then refer to the object:

# Gemfile
gem 'exercism-config'

# Your code
require 'exercism-config'
ExercismConfig.config.webservers_alb_dns_name