exercism-config 0.44.0 → 0.49.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 +4 -4
- data/bin/setup_exercism_local_aws +83 -4
- data/lib/exercism-config.rb +1 -1
- data/lib/exercism/config.rb +1 -0
- data/lib/exercism_config/setup_ecr_client.rb +18 -0
- data/lib/exercism_config/version.rb +1 -1
- data/settings/ci.yml +2 -0
- data/settings/docker.yml +2 -0
- data/settings/local.yml +2 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 224c5927e09f51966d034574633f1eb6b619aede19c2cb8fda266a40889043ac
|
4
|
+
data.tar.gz: d303fffd158b48bb0483999d9b8764fd762afc67c39db3a10c52826f8817f631
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89c490c51ce18d2ac97e3d44a2c370b2172e8bc5b2252207af68a5f5e37c7a7bdc60ac0013aae2e0f716a8ea7dc19f1621fc70c00dadfa2e1847c2d11e1f6a4c
|
7
|
+
data.tar.gz: be77929daeb9ba16b7a1223b4481b903446fc12b634efb86daf6629ce5f5f2a0532e325d1dc9ff90e215c83a03b4b9988f245fa745460596acb6b580bb1bab68
|
@@ -28,10 +28,13 @@ unless ENV["EXERCISM_SKIP_S3"]
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
|
32
|
-
# Setup local dynamodb #
|
33
|
-
|
34
|
-
|
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
|
@@ -97,4 +100,80 @@ end
|
|
97
100
|
}
|
98
101
|
]
|
99
102
|
)
|
103
|
+
|
104
|
+
Exercism.config.dynamodb_client.update_table(
|
105
|
+
table_name: table_name,
|
106
|
+
attribute_definitions: [
|
107
|
+
{
|
108
|
+
attribute_name: "submission_uuid",
|
109
|
+
attribute_type: "S"
|
110
|
+
},
|
111
|
+
{
|
112
|
+
attribute_name: "type",
|
113
|
+
attribute_type: "S"
|
114
|
+
}
|
115
|
+
],
|
116
|
+
global_secondary_index_updates: [
|
117
|
+
{
|
118
|
+
create: {
|
119
|
+
index_name: "submission_type", # required
|
120
|
+
key_schema: [ # required
|
121
|
+
{
|
122
|
+
attribute_name: "submission_uuid", # required
|
123
|
+
key_type: "HASH" # required, accepts HASH, RANGE
|
124
|
+
},
|
125
|
+
{
|
126
|
+
attribute_name: "type", # required
|
127
|
+
key_type: "RANGE" # required, accepts HASH, RANGE
|
128
|
+
}
|
129
|
+
],
|
130
|
+
projection: { # required
|
131
|
+
projection_type: "INCLUDE",
|
132
|
+
non_key_attributes: ["id", "job_status"]
|
133
|
+
},
|
134
|
+
provisioned_throughput: {
|
135
|
+
read_capacity_units: 1, # required
|
136
|
+
write_capacity_units: 1 # required
|
137
|
+
}
|
138
|
+
}
|
139
|
+
}
|
140
|
+
]
|
141
|
+
)
|
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
|
+
)
|
100
178
|
end
|
179
|
+
|
data/lib/exercism-config.rb
CHANGED
@@ -7,9 +7,9 @@ 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
|
-
require_relative 'exercism_config/generate_aws_settings'
|
13
13
|
require_relative 'exercism_config/version'
|
14
14
|
|
15
15
|
require_relative 'exercism/config'
|
data/lib/exercism/config.rb
CHANGED
@@ -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
|
data/settings/ci.yml
CHANGED
@@ -3,8 +3,10 @@ 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
|
9
|
+
language_server_url: ws://127.0.0.1:3023
|
8
10
|
|
9
11
|
mysql_master_endpoint: 127.0.0.1
|
10
12
|
mysql_port: <%= ENV["MYSQL_PORT"] %>
|
data/settings/docker.yml
CHANGED
@@ -3,7 +3,9 @@ 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
|
9
10
|
tooling_orchestrator_url: http://tooling-orchestrator:3021
|
11
|
+
language_server_url: ws://localhost:3023
|
data/settings/local.yml
CHANGED
@@ -3,7 +3,9 @@ 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
|
9
10
|
tooling_orchestrator_url: http://127.0.0.1:3021
|
11
|
+
language_server_url: ws://127.0.0.1:3023
|
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.
|
4
|
+
version: 0.49.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-
|
11
|
+
date: 2020-11-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
|