exercism-config 0.77.0 → 0.81.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 +7 -4
- data/lib/exercism-config.rb +1 -1
- data/lib/exercism_config/version.rb +1 -1
- data/settings/ci.yml +2 -2
- 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: 1b46079f5d01346899f1ca01df8982501866c5f4844bf967752efe0ade18acba
|
4
|
+
data.tar.gz: 0e8f97a6111d78de86c423c8d5d2f6515bbd0619bdfe7b8b5395041b95e35d53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03644c1d1feb091c870ebb1f29ef1c7415ff8257ad2cfc5bea2d511e6a60eddbf7bfb7fb7e2def8d5ad08a8e50192b631465eae29899d9fa03e1c561b5a24470
|
7
|
+
data.tar.gz: 774211dedce7f1a1d4324545d85c598fdffd54e6080ad3a60d20b2ffd131e881e27bcb68048e219328282c3a6590df48a52e160b3ebaf588778c1d5f34eb6814
|
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
@@ -5,9 +5,11 @@ module Exercism
|
|
5
5
|
|
6
6
|
extend Mandate::Memoize
|
7
7
|
|
8
|
-
def self.create!(type, submission_uuid, language, exercise,
|
8
|
+
def self.create!(type, submission_uuid, language, exercise,
|
9
|
+
run_in_background: false,
|
10
|
+
**data)
|
9
11
|
job_id = SecureRandom.uuid.tr('-', '')
|
10
|
-
data
|
12
|
+
data.merge!(
|
11
13
|
id: job_id,
|
12
14
|
submission_uuid: submission_uuid,
|
13
15
|
type: type,
|
@@ -16,13 +18,14 @@ module Exercism
|
|
16
18
|
created_at: Time.now.utc.to_i
|
17
19
|
)
|
18
20
|
|
21
|
+
queue_key = run_in_background ? key_for_queued_for_background_processing : key_for_queued
|
19
22
|
redis = Exercism.redis_tooling_client
|
20
23
|
redis.multi do
|
21
24
|
redis.set(
|
22
25
|
"job:#{job_id}",
|
23
26
|
data.to_json
|
24
27
|
)
|
25
|
-
redis.rpush(
|
28
|
+
redis.rpush(queue_key, job_id)
|
26
29
|
redis.set("submission:#{submission_uuid}:#{type}", job_id)
|
27
30
|
end
|
28
31
|
new(job_id, data)
|
@@ -164,7 +167,7 @@ module Exercism
|
|
164
167
|
Exercism.config.aws_tooling_jobs_bucket
|
165
168
|
end
|
166
169
|
|
167
|
-
%w[queued locked executed cancelled].each do |key|
|
170
|
+
%w[queued queued_for_background_processing locked executed cancelled].each do |key|
|
168
171
|
ToolingJob.singleton_class.class_eval do
|
169
172
|
define_method "key_for_#{key}" do
|
170
173
|
Exercism.env.production? ? key : "#{Exercism.env}:#{key}"
|
data/lib/exercism-config.rb
CHANGED
@@ -81,7 +81,7 @@ module Exercism
|
|
81
81
|
password: ENV.fetch("OPENSEARCH_PASSWORD", Exercism.env.production? ? nil : "admin"),
|
82
82
|
transport_options: {
|
83
83
|
ssl: {
|
84
|
-
verify:
|
84
|
+
verify: Exercism.env.production?
|
85
85
|
}
|
86
86
|
}
|
87
87
|
)
|
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
|
@@ -38,10 +39,9 @@ github_organization: fake-exercism
|
|
38
39
|
github_bot_username: exercism-bot
|
39
40
|
|
40
41
|
# OpenSearch
|
41
|
-
opensearch_host: https://
|
42
|
+
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.81.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-01-07 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
|