exercism-config 0.79.0 → 0.82.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/tests.yml +2 -2
- data/.ruby-version +1 -1
- data/exercism_config.gemspec +1 -1
- data/lib/exercism/config.rb +2 -2
- data/lib/exercism/tooling_job.rb +21 -21
- data/lib/exercism_config/version.rb +1 -1
- data/settings/ci.yml +1 -1
- data/settings/docker.yml +1 -1
- data/settings/local.yml +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88f254f6ea4948dd7505c072ced7fac03df36886fefc0b9fa2f17f7b03caca2d
|
4
|
+
data.tar.gz: 83368b9da78d987a4f1dfdf678e4871bc023347747fb264346ec8a26c6183e4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd43569d09311af253e1c6f8979db1dcd4357b4dc5519f34316c6adf2faa740ae86186a7e01b8a7780480aebc1add8dc6bb6720da3171cc4012ab0492d9b6981
|
7
|
+
data.tar.gz: 00025a7185b9371a8f009dbc45fbf2b807599964a7e166eb2b21999d8e7b5524adb801d8fcb6cfc33121259bcc490218861b6f993f0d39c0d5afa8eafa346a90
|
data/.github/workflows/tests.yml
CHANGED
@@ -34,9 +34,9 @@ jobs:
|
|
34
34
|
###
|
35
35
|
# Setup Ruby - this needs to match the version in the Gemfile
|
36
36
|
- name: Set up Ruby
|
37
|
-
uses: ruby/setup-ruby@
|
37
|
+
uses: ruby/setup-ruby@168d6a54b412713c0ed60998a78093a270ca8d84
|
38
38
|
with:
|
39
|
-
ruby-version:
|
39
|
+
ruby-version: '3.0'
|
40
40
|
bundler-cache: true
|
41
41
|
|
42
42
|
###
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-
|
1
|
+
ruby-3.0.3
|
data/exercism_config.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
|
9
9
|
spec.summary = 'Retrieves stored config for Exercism'
|
10
10
|
spec.homepage = 'https://exercism.io'
|
11
|
-
spec.required_ruby_version = Gem::Requirement.new('>=
|
11
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 3.0.3')
|
12
12
|
|
13
13
|
spec.metadata['homepage_uri'] = spec.homepage
|
14
14
|
spec.metadata['source_code_uri'] = 'https://github.com/exercism/config'
|
data/lib/exercism/config.rb
CHANGED
@@ -21,14 +21,14 @@ module Exercism
|
|
21
21
|
|
22
22
|
def respond_to_missing?(*args)
|
23
23
|
super
|
24
|
-
true
|
25
24
|
rescue NoMethodError
|
26
25
|
false
|
27
26
|
end
|
28
27
|
|
29
28
|
PROPS_WITH_TEST_SUFFIX.each do |prop|
|
30
29
|
define_method prop do
|
31
|
-
|
30
|
+
val = to_h[prop.to_sym]
|
31
|
+
Exercism.env.test? ? "#{val}-test" : val
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
data/lib/exercism/tooling_job.rb
CHANGED
@@ -18,15 +18,15 @@ module Exercism
|
|
18
18
|
created_at: Time.now.utc.to_i
|
19
19
|
)
|
20
20
|
|
21
|
-
queue_key = run_in_background ?
|
21
|
+
queue_key = run_in_background ? key_for_queued_for_background_processing : key_for_queued
|
22
22
|
redis = Exercism.redis_tooling_client
|
23
|
-
redis.multi do
|
24
|
-
|
23
|
+
redis.multi do |transaction|
|
24
|
+
transaction.set(
|
25
25
|
"job:#{job_id}",
|
26
26
|
data.to_json
|
27
27
|
)
|
28
|
-
|
29
|
-
|
28
|
+
transaction.rpush(queue_key, job_id)
|
29
|
+
transaction.set("submission:#{submission_uuid}:#{type}", job_id)
|
30
30
|
end
|
31
31
|
new(job_id, data)
|
32
32
|
end
|
@@ -66,20 +66,20 @@ module Exercism
|
|
66
66
|
|
67
67
|
def locked!
|
68
68
|
redis = Exercism.redis_tooling_client
|
69
|
-
redis.multi do
|
70
|
-
|
71
|
-
|
69
|
+
redis.multi do |transaction|
|
70
|
+
transaction.lrem(key_for_queued, 1, id)
|
71
|
+
transaction.rpush(key_for_locked, id)
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
75
|
def executed!(status, output)
|
76
76
|
redis = Exercism.redis_tooling_client
|
77
|
-
redis.multi do
|
78
|
-
|
79
|
-
|
80
|
-
|
77
|
+
redis.multi do |transaction|
|
78
|
+
transaction.lrem(key_for_queued, 1, id)
|
79
|
+
transaction.lrem(key_for_locked, 1, id)
|
80
|
+
transaction.rpush(key_for_executed, id)
|
81
81
|
|
82
|
-
|
82
|
+
transaction.set(
|
83
83
|
"job:#{id}",
|
84
84
|
data.merge(
|
85
85
|
execution_status: status,
|
@@ -91,18 +91,18 @@ module Exercism
|
|
91
91
|
|
92
92
|
def processed!
|
93
93
|
redis = Exercism.redis_tooling_client
|
94
|
-
redis.multi do
|
95
|
-
|
96
|
-
|
97
|
-
|
94
|
+
redis.multi do |transaction|
|
95
|
+
transaction.lrem(key_for_executed, 1, id)
|
96
|
+
transaction.del("job:#{id}")
|
97
|
+
transaction.del("submission:#{data[:submission_uuid]}:#{data[:type]}")
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
101
101
|
def cancelled!
|
102
102
|
redis = Exercism.redis_tooling_client
|
103
|
-
redis.multi do
|
104
|
-
|
105
|
-
|
103
|
+
redis.multi do |transaction|
|
104
|
+
transaction.lrem(key_for_queued, 1, id)
|
105
|
+
transaction.rpush(key_for_cancelled, id)
|
106
106
|
end
|
107
107
|
end
|
108
108
|
|
@@ -167,7 +167,7 @@ module Exercism
|
|
167
167
|
Exercism.config.aws_tooling_jobs_bucket
|
168
168
|
end
|
169
169
|
|
170
|
-
%w[queued
|
170
|
+
%w[queued queued_for_background_processing locked executed cancelled].each do |key|
|
171
171
|
ToolingJob.singleton_class.class_eval do
|
172
172
|
define_method "key_for_#{key}" do
|
173
173
|
Exercism.env.production? ? key : "#{Exercism.env}:#{key}"
|
data/settings/ci.yml
CHANGED
@@ -25,6 +25,7 @@ aws_tooling_jobs_bucket: exercism-v3-tooling-jobs
|
|
25
25
|
|
26
26
|
# Hosts
|
27
27
|
website_icons_host: https://exercism-v3-icons.s3.eu-west-2.amazonaws.com
|
28
|
+
website_assets_host: '/assets'
|
28
29
|
|
29
30
|
# Sidekiq Config
|
30
31
|
sidekiq_redis_url: redis://127.0.0.1:6379/2
|
@@ -42,6 +43,5 @@ opensearch_host: https://127.0.0.1:9200
|
|
42
43
|
|
43
44
|
# Extra things not used in development, but here
|
44
45
|
# so that this file can provide a reference
|
45
|
-
website_assets_host:
|
46
46
|
aws_attachments_bucket:
|
47
47
|
aws_attachments_region:
|
data/settings/docker.yml
CHANGED
@@ -25,6 +25,7 @@ aws_tooling_jobs_bucket: exercism-v3-tooling-jobs
|
|
25
25
|
|
26
26
|
# Hosts
|
27
27
|
website_icons_host: https://exercism-v3-icons.s3.eu-west-2.amazonaws.com
|
28
|
+
website_assets_host: '/assets'
|
28
29
|
|
29
30
|
# Sidekiq Config
|
30
31
|
sidekiq_redis_url: redis://redis:6379/2
|
@@ -42,6 +43,5 @@ opensearch_host: https://opensearch:9200
|
|
42
43
|
|
43
44
|
# Extra things not used in development, but here
|
44
45
|
# so that this file can provide a reference
|
45
|
-
website_assets_host:
|
46
46
|
aws_attachments_bucket:
|
47
47
|
aws_attachments_region:
|
data/settings/local.yml
CHANGED
@@ -25,6 +25,7 @@ aws_tooling_jobs_bucket: exercism-v3-tooling-jobs
|
|
25
25
|
|
26
26
|
# Hosts
|
27
27
|
website_icons_host: https://exercism-v3-icons.s3.eu-west-2.amazonaws.com
|
28
|
+
website_assets_host: '/assets'
|
28
29
|
|
29
30
|
# Sidekiq Config
|
30
31
|
sidekiq_redis_url: redis://127.0.0.1:6379/2
|
@@ -42,6 +43,5 @@ opensearch_host: https://localhost:9200
|
|
42
43
|
|
43
44
|
# Extra things not used in development, but here
|
44
45
|
# so that this file can provide a reference
|
45
|
-
website_assets_host:
|
46
46
|
aws_attachments_bucket:
|
47
47
|
aws_attachments_region:
|
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.82.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:
|
11
|
+
date: 2022-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-dynamodb
|
@@ -238,14 +238,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
238
238
|
requirements:
|
239
239
|
- - ">="
|
240
240
|
- !ruby/object:Gem::Version
|
241
|
-
version:
|
241
|
+
version: 3.0.3
|
242
242
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
243
243
|
requirements:
|
244
244
|
- - ">="
|
245
245
|
- !ruby/object:Gem::Version
|
246
246
|
version: '0'
|
247
247
|
requirements: []
|
248
|
-
rubygems_version: 3.
|
248
|
+
rubygems_version: 3.2.32
|
249
249
|
signing_key:
|
250
250
|
specification_version: 4
|
251
251
|
summary: Retrieves stored config for Exercism
|