exercism-config 0.56.0 → 0.62.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86c955fbfc003d784f274dabab804fa47c9e650a9377e6ae27d500b792a3b4d4
4
- data.tar.gz: 5b242eddb88013e13cec926c47f9b2c4d96f0bd1f04561c28730798535be0680
3
+ metadata.gz: 26c206200029004a586bc08f460963d7322b79879f509355ee07f8779a47f50a
4
+ data.tar.gz: 6d509382e780e761f40675d9fafca48ac1b7cd27f69091cede67c85ba83b4192
5
5
  SHA512:
6
- metadata.gz: d39665cd20bba4db82995357ebfe5eb430ba11f8a8b4640dfa620d6736accc3138ebda253b36d3266c7c3f6bc788c18af6c266c63a51ef9dade00e398e9c32ca
7
- data.tar.gz: bbb85e8979746b342f5b923719e172addb3e6cfcd56d4a5cf1ecc4d1feb942cd09ad7b79812b0da88d3cc34b8fa5f7450f4bdbba51789386d33ab14e375ea232
6
+ metadata.gz: 202cc6f2da70889a2e9c78432c035eebb5f1c5e2dc7871990319bfcedca24a4f09c78c32e4c1797471e50441878358fa82c007530b59ff6737299739a53b70c0
7
+ data.tar.gz: 9a11d20db3c9c16dd96686003aabc9215a3dd4041f22d3f899805167f93136e431c263744436656ed3fe3b5a50451de984db465c69c9c9cc26f07490d04bdf10
data/Gemfile CHANGED
@@ -10,3 +10,5 @@ gem 'gem-release'
10
10
  gem 'rubocop'
11
11
  gem 'rubocop-minitest'
12
12
  gem 'rubocop-performance'
13
+
14
+ gem 'octokit'
data/README.md CHANGED
@@ -25,6 +25,7 @@ Exercism.config.tooling_orchestrator_url
25
25
  Exercism.config.language_server_url
26
26
 
27
27
  # Secrets
28
+ Exercism.secrets.github_access_token
28
29
  Exercism.secrets.github_omniauth_app_id
29
30
  Exercism.secrets.github_omniauth_app_secret
30
31
  Exercism.secrets.github_webhooks_secret
@@ -35,9 +36,10 @@ Exercism.secrets.hcaptcha_secret
35
36
  Exercism.dynamodb_client
36
37
  Exercism.s3_client
37
38
  Exercism.ecr_client
39
+ Exercism.octokit_client
38
40
  ```
39
41
 
40
- ## Explaination
42
+ ## Explanation
41
43
 
42
44
  When terraform creates Exercism's infrastructure, it writes endpoints and DNS entries to DynamoDB.
43
45
  This gem allows you to trivially retrieve that data.
@@ -49,4 +49,19 @@ module Exercism
49
49
  require 'aws-sdk-ecr'
50
50
  Aws::ECR::Client.new(ExercismConfig::GenerateAwsSettings.())
51
51
  end
52
+
53
+ def self.octokit_client
54
+ require 'octokit'
55
+
56
+ access_token = ENV.fetch(
57
+ "GITHUB_ACCESS_TOKEN",
58
+ self.secrets.github_access_token
59
+ )
60
+
61
+ @octokit_client ||= Octokit::Client.new(
62
+ access_token: access_token
63
+ ).tap do |c|
64
+ c.auto_paginate = true
65
+ end
66
+ end
52
67
  end
@@ -10,6 +10,22 @@ module Exercism
10
10
  self.aws_settings = aws_settings
11
11
  end
12
12
 
13
+ def method_missing(name, *args)
14
+ super.tap do |val|
15
+ next unless val.nil?
16
+
17
+ keys = to_h.keys
18
+ raise NoMethodError, name unless keys.include?(name.to_s) || keys.include?(name.to_sym)
19
+ end
20
+ end
21
+
22
+ def respond_to_missing?(*args)
23
+ super
24
+ true
25
+ rescue NoMethodError
26
+ false
27
+ end
28
+
13
29
  PROPS_WITH_TEST_SUFFIX.each do |prop|
14
30
  define_method prop do
15
31
  Exercism.env.test? ? "#{super()}-test" : super()
@@ -20,6 +36,8 @@ module Exercism
20
36
  hash = to_h
21
37
  PROPS_WITH_TEST_SUFFIX.each do |prop|
22
38
  hash[prop] = send(prop)
39
+ rescue NoMethodError
40
+ # We don't want to show nil or empty string values in the JSON output
23
41
  end
24
42
  hash.to_json
25
43
  end
@@ -1,3 +1,3 @@
1
1
  module ExercismConfig
2
- VERSION = '0.56.0'.freeze
2
+ VERSION = '0.62.0'.freeze
3
3
  end
data/settings/ci.yml CHANGED
@@ -1,12 +1,28 @@
1
+ # Anycable
1
2
  anycable_redis_url: redis://127.0.0.1:6379/1
2
3
  anycable_rpc_host: 127.0.0.1:50051
3
- aws_submissions_bucket: exercism-staging-submissions
4
- aws_tooling_jobs_bucket: exercism-staging-tooling-jobs
4
+
5
+ # DynamoDB config
5
6
  dynamodb_tooling_jobs_table: tooling_jobs
6
7
  dynamodb_tooling_language_groups_table: tooling_language_groups
8
+
9
+ # Internal Routes
10
+ language_server_url: ws://127.0.0.1:3023
7
11
  spi_url: http://127.0.0.1:3020
8
12
  tooling_orchestrator_url: http://127.0.0.1:3021
9
- language_server_url: ws://127.0.0.1:3023
10
13
 
14
+ # MySQL
11
15
  mysql_master_endpoint: 127.0.0.1
16
+ mysql_socket: /tmp/mysql.
12
17
  mysql_port: <%= ENV["MYSQL_PORT"] %>
18
+
19
+ # S3 Config
20
+ aws_submissions_bucket: exercism-staging-submissions
21
+ aws_tooling_jobs_bucket: exercism-staging-tooling-jobs
22
+
23
+ # Sidekiq Config
24
+ sidekiq_redis_url: redis://127.0.0.1:6379/2
25
+
26
+ # EFS Config
27
+ efs_submissions_mount_point: "/tmp/exercism/efs/submissions"
28
+ efs_repositories_mount_point: "/tmp/exercism/efs/repos"
data/settings/docker.yml CHANGED
@@ -1,11 +1,28 @@
1
+ # Anycable
1
2
  anycable_redis_url: redis://redis:6379/1
2
3
  anycable_rpc_host: 0.0.0.0:50051
3
- aws_submissions_bucket: exercism-staging-submissions
4
- aws_tooling_jobs_bucket: exercism-staging-tooling-jobs
4
+
5
+ # DynamoDB config
5
6
  dynamodb_tooling_jobs_table: tooling_jobs
6
7
  dynamodb_tooling_language_groups_table: tooling_language_groups
7
- mysql_master_endpoint: mysql
8
- mysql_port: 3306
8
+
9
+ # Internal Routes
9
10
  spi_url: http://website:3020
10
11
  tooling_orchestrator_url: http://tooling-orchestrator:3021
11
- language_server_url: ws://localhost:3023
12
+ language_server_url: ws://local.exercism.io:3023
13
+
14
+ # MySQL
15
+ mysql_master_endpoint: mysql
16
+ mysql_socket: null
17
+ mysql_port: 3306
18
+
19
+ # S3 Config
20
+ aws_submissions_bucket: exercism-staging-submissions
21
+ aws_tooling_jobs_bucket: exercism-staging-tooling-jobs
22
+
23
+ # Sidekiq Config
24
+ sidekiq_redis_url: redis://redis:6379/2
25
+
26
+ # EFS Config
27
+ efs_submissions_mount_point: "/tmp/exercism/efs/submissions"
28
+ efs_repositories_mount_point: "/tmp/exercism/efs/repos"
data/settings/local.yml CHANGED
@@ -1,11 +1,28 @@
1
+ # Anycable
1
2
  anycable_redis_url: redis://127.0.0.1:6379/1
2
3
  anycable_rpc_host: 127.0.0.1:50051
3
- aws_submissions_bucket: exercism-staging-submissions
4
- aws_tooling_jobs_bucket: exercism-staging-tooling-jobs
4
+
5
+ # DynamoDB config
5
6
  dynamodb_tooling_jobs_table: tooling_jobs
6
7
  dynamodb_tooling_language_groups_table: tooling_language_groups
8
+
9
+ # Internal Routes
10
+ language_server_url: ws://local.exercism.io:3023
11
+ spi_url: http://local.exercism.io:3020
12
+ tooling_orchestrator_url: http://local.exercism.io:3021
13
+
14
+ # MySQL
7
15
  mysql_master_endpoint: localhost
8
16
  mysql_socket: /tmp/mysql.sock
9
- spi_url: http://localhost:3020
10
- tooling_orchestrator_url: http://localhost:3021
11
- language_server_url: ws://localhost:3023
17
+ mysql_port: null
18
+
19
+ # S3 Config
20
+ aws_submissions_bucket: exercism-staging-submissions
21
+ aws_tooling_jobs_bucket: exercism-staging-tooling-jobs
22
+
23
+ # Sidekiq Config
24
+ sidekiq_redis_url: redis://127.0.0.1:6379/2
25
+
26
+ # EFS Config
27
+ efs_submissions_mount_point: "/tmp/exercism/efs/submissions"
28
+ efs_repositories_mount_point: "/tmp/exercism/efs/repos"
data/settings/secrets.yml CHANGED
@@ -1,5 +1,7 @@
1
+ github_access_token: "some-github-access-token"
1
2
  github_omniauth_app_id: "some-github-app-id"
2
3
  github_omniauth_app_secret: "some-github-app-exercism-secret"
3
4
  github_webhooks_secret: "some-github-webhooks-secret"
4
5
  hcaptcha_site_key: "some-hcaptcha-site-key"
5
6
  hcaptcha_secret: "some-hcaptcha-secret"
7
+ website_secret_key_base: "74732f062c60ffc4f2898b1ed36d1876cd34bb83ba3928bc14c1fd61a189179728a305b02b7de01a1f0a7627864d28cb410d64a8952465e5dd681522d8afc8d7"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exercism-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.56.0
4
+ version: 0.62.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Walker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-08 00:00:00.000000000 Z
11
+ date: 2021-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-dynamodb