exercism-config 0.45.0 → 0.46.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8059e119b7057a0972501f6f3d0921e575024f3497ffaab9b9e62fa63bd186b
4
- data.tar.gz: 1ee220aa35d61dbcf41b498ea268b21a0bd0c1cd4d72507993a759d83847faa1
3
+ metadata.gz: eb3b0fea425fb02156daa4db89fea9defa16dc54962b5c299359ada000d1f86a
4
+ data.tar.gz: ff4e9535337514761b1f09d3bb7172abd50a3a054dde0e1d7dae3347a3205433
5
5
  SHA512:
6
- metadata.gz: '048546048f8700a7156b6b791ebea79a4d622c3f77b997d9a198c975eb4d20571b59c2a97fff65f0c5d3df37179f0fec660f02cdfbb769d8728ae223b999fd55'
7
- data.tar.gz: 734e6b495e2e67405d3396e8621ee611050c75043f4a7ab2fc43085bbad45603a45777b328967ccc41eebcdd5dfd28ae7004f6b815065cd4a7b58f3f9764f47f
6
+ metadata.gz: d59a574a95d289b4d37260e8c442b4351f8a176ba2528af98329c9cdd0e0e75b74410be73a239c707343a207fdc9425af3d2eb7300836506bfcba06ff35acfa4
7
+ data.tar.gz: 7f223275f782bd6113a1a1d973f550c3d08e511d6da64eddad8754ca48f3d267304faf4c00a7651aae4d6556d15242bb5d7b865eab0fdb15d05609c0fd94db80
@@ -28,10 +28,13 @@ unless ENV["EXERCISM_SKIP_S3"]
28
28
  end
29
29
  end
30
30
 
31
- ########################
32
- # Setup local dynamodb #
33
- ########################
34
- %w[tooling_jobs tooling_jobs-test].each do |table_name|
31
+ ###########################################
32
+ # Setup local dynamodb tooling jobs table #
33
+ ###########################################
34
+ [
35
+ Exercism.config.dynamodb_tooling_jobs_table,
36
+ Exercism.config.dynamodb_tooling_jobs_table + "-test"
37
+ ].each do |table_name|
35
38
  begin
36
39
  Exercism.config.dynamodb_client.delete_table(
37
40
  table_name: table_name
@@ -137,3 +140,40 @@ end
137
140
  ]
138
141
  )
139
142
  end
143
+
144
+ ##############################################
145
+ # Setup local dynamodb language groups table #
146
+ ##############################################
147
+ [
148
+ Exercism.config.dynamodb_tooling_language_groups_table,
149
+ Exercism.config.dynamodb_tooling_language_groups_table + "-test"
150
+ ].each do |table_name|
151
+ begin
152
+ Exercism.config.dynamodb_client.delete_table(
153
+ table_name: table_name
154
+ )
155
+ rescue Aws::DynamoDB::Errors::ResourceNotFoundException
156
+ end
157
+ puts "[x] #{table_name}"
158
+
159
+ Exercism.config.dynamodb_client.create_table(
160
+ table_name: table_name,
161
+ attribute_definitions: [
162
+ {
163
+ attribute_name: "group",
164
+ attribute_type: "S"
165
+ }
166
+ ],
167
+ key_schema: [
168
+ {
169
+ attribute_name: "group",
170
+ key_type: "HASH"
171
+ }
172
+ ],
173
+ provisioned_throughput: {
174
+ read_capacity_units: 1,
175
+ write_capacity_units: 1
176
+ }
177
+ )
178
+ end
179
+
@@ -7,6 +7,7 @@ require_relative 'exercism_config/environment'
7
7
  require_relative 'exercism_config/determine_environment'
8
8
  require_relative 'exercism_config/generate_aws_settings'
9
9
  require_relative 'exercism_config/setup_dynamodb_client'
10
+ require_relative 'exercism_config/setup_ecr_client'
10
11
  require_relative 'exercism_config/setup_s3_client'
11
12
  require_relative 'exercism_config/retrieve'
12
13
  require_relative 'exercism_config/generate_aws_settings'
@@ -2,6 +2,7 @@ module Exercism
2
2
  class Config < OpenStruct
3
3
  PROPS_WITH_TEST_SUFFIX = %i[
4
4
  dynamodb_tooling_jobs_table
5
+ dynamodb_tooling_language_groups_table
5
6
  ].freeze
6
7
 
7
8
  def initialize(data, aws_settings)
@@ -0,0 +1,18 @@
1
+ module ExercismConfig
2
+ class SetupECRClient
3
+ include Mandate
4
+
5
+ def call
6
+ aws_settings = GenerateAwsSettings.().merge(
7
+ # endpoint: config_endpoint,
8
+
9
+ # We don't want a profile for this AWS service
10
+ # as we run it locally. But we do normally, so
11
+ # we locally override this here.
12
+ profile: nil
13
+ ).select { |_k, v| v }
14
+
15
+ Aws::ECR::Client.new(aws_settings)
16
+ end
17
+ end
18
+ end
@@ -1,3 +1,3 @@
1
1
  module ExercismConfig
2
- VERSION = '0.45.0'.freeze
2
+ VERSION = '0.46.0'.freeze
3
3
  end
@@ -3,6 +3,7 @@ anycable_rpc_host: 127.0.0.1:50051
3
3
  aws_submissions_bucket: exercism-staging-submissions
4
4
  aws_tooling_jobs_bucket: exercism-staging-tooling-jobs
5
5
  dynamodb_tooling_jobs_table: tooling_jobs
6
+ dynamodb_tooling_language_groups_table: tooling_language_groups
6
7
  spi_url: http://127.0.0.1:3020
7
8
  tooling_orchestrator_url: http://127.0.0.1:3021
8
9
 
@@ -3,6 +3,7 @@ anycable_rpc_host: 0.0.0.0:50051
3
3
  aws_submissions_bucket: exercism-staging-submissions
4
4
  aws_tooling_jobs_bucket: exercism-staging-tooling-jobs
5
5
  dynamodb_tooling_jobs_table: tooling_jobs
6
+ dynamodb_tooling_language_groups_table: tooling_language_groups
6
7
  mysql_master_endpoint: mysql
7
8
  mysql_port: 3306
8
9
  spi_url: http://website:3020
@@ -3,6 +3,7 @@ anycable_rpc_host: 127.0.0.1:50051
3
3
  aws_submissions_bucket: exercism-staging-submissions
4
4
  aws_tooling_jobs_bucket: exercism-staging-tooling-jobs
5
5
  dynamodb_tooling_jobs_table: tooling_jobs
6
+ dynamodb_tooling_language_groups_table: tooling_language_groups
6
7
  mysql_master_endpoint: localhost
7
8
  mysql_socket: /tmp/mysql.sock
8
9
  spi_url: http://127.0.0.1:3020
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.45.0
4
+ version: 0.46.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-10-07 00:00:00.000000000 Z
11
+ date: 2020-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-dynamodb
@@ -153,6 +153,7 @@ files:
153
153
  - lib/exercism_config/generate_aws_settings.rb
154
154
  - lib/exercism_config/retrieve.rb
155
155
  - lib/exercism_config/setup_dynamodb_client.rb
156
+ - lib/exercism_config/setup_ecr_client.rb
156
157
  - lib/exercism_config/setup_s3_client.rb
157
158
  - lib/exercism_config/version.rb
158
159
  - package.json