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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7cc1b40772c1b4cffe2fa06d291837ab5823573da046f18aa01a33b00f2ac388
4
- data.tar.gz: 1f66718c84bddd2616e2289f596fd32c03b2dc29cf312cc645d0b2bcb7cde201
3
+ metadata.gz: 1b46079f5d01346899f1ca01df8982501866c5f4844bf967752efe0ade18acba
4
+ data.tar.gz: 0e8f97a6111d78de86c423c8d5d2f6515bbd0619bdfe7b8b5395041b95e35d53
5
5
  SHA512:
6
- metadata.gz: 82dc0e119312b21a74e8eea13d808eaed31d537b31deabd8fb705e17282f21af0c2a0135110ea27242e9106b9dd525b273fb11ad9ada4526357bbd81466b4a46
7
- data.tar.gz: aadb9505da6fd41b95bc142e74a69ac7885406ec9c5bb8e361bd0b488733c96707400c01840619e16d34223fa6d2752cc4ddd39d17820d6da9761754ad325233
6
+ metadata.gz: 03644c1d1feb091c870ebb1f29ef1c7415ff8257ad2cfc5bea2d511e6a60eddbf7bfb7fb7e2def8d5ad08a8e50192b631465eae29899d9fa03e1c561b5a24470
7
+ data.tar.gz: 774211dedce7f1a1d4324545d85c598fdffd54e6080ad3a60d20b2ffd131e881e27bcb68048e219328282c3a6590df48a52e160b3ebaf588778c1d5f34eb6814
@@ -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@a699edbce608a2c128dedad88e3b6a0e28687b3c
37
+ uses: ruby/setup-ruby@168d6a54b412713c0ed60998a78093a270ca8d84
38
38
  with:
39
- ruby-version: 2.6.6
39
+ ruby-version: '3.0'
40
40
  bundler-cache: true
41
41
 
42
42
  ###
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.6.6
1
+ ruby-3.0.3
@@ -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('>= 2.6.6')
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'
@@ -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
- Exercism.env.test? ? "#{super()}-test" : super()
30
+ val = to_h[prop.to_sym]
31
+ Exercism.env.test? ? "#{val}-test" : val
32
32
  end
33
33
  end
34
34
 
@@ -5,9 +5,11 @@ module Exercism
5
5
 
6
6
  extend Mandate::Memoize
7
7
 
8
- def self.create!(type, submission_uuid, language, exercise, extra = {})
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 = extra.merge(
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(key_for_queued, job_id)
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}"
@@ -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: ENV.fetch("OPENSEARCH_VERIFY_SSL", "true").to_s.casecmp?("true")
84
+ verify: Exercism.env.production?
85
85
  }
86
86
  }
87
87
  )
@@ -1,3 +1,3 @@
1
1
  module ExercismConfig
2
- VERSION = '0.77.0'.freeze
2
+ VERSION = '0.81.0'.freeze
3
3
  end
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://opensearch:9200
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.77.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: 2021-11-10 00:00:00.000000000 Z
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: 2.6.6
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.0.3
248
+ rubygems_version: 3.2.32
249
249
  signing_key:
250
250
  specification_version: 4
251
251
  summary: Retrieves stored config for Exercism