exercism-config 0.57.0 → 0.63.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: dd3a2e75d9a25001f206eea0ebf0176e29feeb5f19e5a2452abe2e0727c59eeb
4
- data.tar.gz: 4f941cdab42013d7b4e494d3b3e694adc10fc30824e76519ad4ed8abe8b88f1f
3
+ metadata.gz: 2885e2be67c5b8c19538402917bf67b22ffa283e54291ba2244f286ffc273332
4
+ data.tar.gz: 9b2489153000d0552976ec9fb9bd60657488ac63e20212d1fc89ea9f2924859d
5
5
  SHA512:
6
- metadata.gz: 25dab7f25a4e679c960a759b73eb7a2b701f80dbcf8127ff149dba8f5debf641c29131a8eea77989099385dce51b0eaee1d61ac46b90bb074599eef0b55c33c0
7
- data.tar.gz: 5f971478ed4937d055c1563a974c8c884f52a1aee228ca8129b100bfa96473f9ee2d7d66d00d069ba6d2d9372fde7138b3fb84b18528ec8cf88c851ae6aa42f2
6
+ metadata.gz: 96f62b62af1d81c90be6245335f82ef4323ceedfe5bbc495e552427744f03b7607372cc0cbe2155936c42935be8347d3b5b76b2132a3441d279b3bb1c6bfb9e9
7
+ data.tar.gz: 8caaf0d56a6be6fd139c4dfe075fd17e5d5929368482ae466f5b4c81c05f6d50bd29d3759f81111969d8e700dc83c701b77216c5a0d469e0b9811c136552ef66
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.57.0'.freeze
2
+ VERSION = '0.63.0'.freeze
3
3
  end
data/settings/ci.yml CHANGED
@@ -13,11 +13,19 @@ tooling_orchestrator_url: http://127.0.0.1:3021
13
13
 
14
14
  # MySQL
15
15
  mysql_master_endpoint: 127.0.0.1
16
+ mysql_socket: /tmp/mysql.
16
17
  mysql_port: <%= ENV["MYSQL_PORT"] %>
17
18
 
18
19
  # S3 Config
19
20
  aws_submissions_bucket: exercism-staging-submissions
20
21
  aws_tooling_jobs_bucket: exercism-staging-tooling-jobs
21
22
 
23
+ # Hosts
24
+ website_icons_host: https://exercism-icons-staging.s3.eu-west-2.amazonaws.com
25
+
22
26
  # Sidekiq Config
23
27
  sidekiq_redis_url: redis://127.0.0.1:6379/2
28
+
29
+ # EFS Config
30
+ efs_submissions_mount_point: "/tmp/exercism/efs/submissions"
31
+ efs_repositories_mount_point: "/tmp/exercism/efs/repos"
data/settings/docker.yml CHANGED
@@ -9,15 +9,23 @@ dynamodb_tooling_language_groups_table: tooling_language_groups
9
9
  # Internal Routes
10
10
  spi_url: http://website:3020
11
11
  tooling_orchestrator_url: http://tooling-orchestrator:3021
12
- language_server_url: ws://localhost:3023
12
+ language_server_url: ws://local.exercism.io:3023
13
13
 
14
14
  # MySQL
15
15
  mysql_master_endpoint: mysql
16
+ mysql_socket: null
16
17
  mysql_port: 3306
17
18
 
18
19
  # S3 Config
19
20
  aws_submissions_bucket: exercism-staging-submissions
20
21
  aws_tooling_jobs_bucket: exercism-staging-tooling-jobs
21
22
 
23
+ # Hosts
24
+ website_icons_host: https://exercism-icons-staging.s3.eu-west-2.amazonaws.com
25
+
22
26
  # Sidekiq Config
23
27
  sidekiq_redis_url: redis://redis:6379/2
28
+
29
+ # EFS Config
30
+ efs_submissions_mount_point: "/tmp/exercism/efs/submissions"
31
+ efs_repositories_mount_point: "/tmp/exercism/efs/repos"
data/settings/local.yml CHANGED
@@ -7,17 +7,31 @@ dynamodb_tooling_jobs_table: tooling_jobs
7
7
  dynamodb_tooling_language_groups_table: tooling_language_groups
8
8
 
9
9
  # Internal Routes
10
- language_server_url: ws://localhost:3023
11
- spi_url: http://localhost:3020
12
- tooling_orchestrator_url: http://localhost:3021
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
13
 
14
14
  # MySQL
15
15
  mysql_master_endpoint: localhost
16
16
  mysql_socket: /tmp/mysql.sock
17
+ mysql_port: null
17
18
 
18
19
  # S3 Config
19
20
  aws_submissions_bucket: exercism-staging-submissions
20
21
  aws_tooling_jobs_bucket: exercism-staging-tooling-jobs
21
22
 
23
+ # Hosts
24
+ website_icons_host: https://exercism-icons-staging.s3.eu-west-2.amazonaws.com
25
+
22
26
  # Sidekiq Config
23
27
  sidekiq_redis_url: redis://127.0.0.1:6379/2
28
+
29
+ # EFS Config
30
+ efs_submissions_mount_point: "/tmp/exercism/efs/submissions"
31
+ efs_repositories_mount_point: "/tmp/exercism/efs/repos"
32
+
33
+ # Extra things not used in development, but here
34
+ # so that this file can provide a reference
35
+ website_assets_host:
36
+ aws_attachments_bucket:
37
+ aws_attachments_region:
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.57.0
4
+ version: 0.63.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-09 00:00:00.000000000 Z
11
+ date: 2021-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-dynamodb