exercism_config 0.26.0 → 0.27.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: f3b9c7e4dcbf09e9d69d88fca3077c2e816ff287b67b3cba2a368709befcdf89
4
- data.tar.gz: 5a303f30e356de04c8e5c358a099e391ac2c2c20cf75b96dacf0a0b5d89dddc4
3
+ metadata.gz: fc1b4facff164813306b5b40a77e41426e8ec8bf8b559ed334572b7339ac1bfe
4
+ data.tar.gz: 541c70f5546de7dccca0825e34eeee9cc68e6310780fa87c6c3d1e0f7c5fc3cf
5
5
  SHA512:
6
- metadata.gz: 4b2702cb4c20e8ce11c0fd514d98d65af9effabb466d13e948fd3f872e1ad56e8b8b558bff34ef1a78ed95019b5cd67885d28ea75cd26b62978f2f2d3985ddaa
7
- data.tar.gz: 3b673b37307b1eee3c6e125682fef0fed504d7c1d8e8f530ed97209514f16ab32fdb367e5e00d50e3800fcf93dabb1fd85c9813b7290924ffdfdde0881fcbbe3
6
+ metadata.gz: ec77fc99f27705b35234d3262b618a5a5b993d36f1a1dafd00118bdb53f4500dd873af5a70790b00b4e1a73574df69acf9b98a01a77802b3a316b308264df994
7
+ data.tar.gz: ee10e2d61d426d6e959598b68798888c10ffc0e5ebb660b8f54493fa387509e5d775beced839cf1671eca38995fc703a6e2784a9764b71b6480c639996983019
@@ -3,6 +3,22 @@ module ExercismConfig
3
3
  include Mandate
4
4
 
5
5
  def call
6
+ return generate_mock if Exercism.environment == :test
7
+ retrieve_from_dynamodb
8
+ end
9
+
10
+ private
11
+
12
+ def generate_mock
13
+ require 'erb'
14
+ require 'yaml'
15
+
16
+ settings_file = File.expand_path("../../../settings/test.yml", __FILE__)
17
+ settings = YAML.load(ERB.new(File.read(settings_file)).result)
18
+ Exercism::Config.new(settings, {})
19
+ end
20
+
21
+ def retrieve_from_dynamodb
6
22
  client = SetupDynamoDBClient.()
7
23
 
8
24
  resp = client.scan({table_name: "config"})
@@ -1,3 +1,3 @@
1
1
  module ExercismConfig
2
- VERSION = "0.26.0"
2
+ VERSION = "0.27.0"
3
3
  end
@@ -0,0 +1,7 @@
1
+ aws_iterations_bucket: some-bucket
2
+ dynamodb_tooling_jobs_table: some_table
3
+ tooling_orchestrator_url: http://some-url:1234
4
+ anycable_redis_url: redis://some-redis:1234/9
5
+ anycable_rpc_host: 1.2.3.4:9876543
6
+ rds_master_endpoint: some_url
7
+ rds_port: 1234
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.26.0
4
+ version: 0.27.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-07-30 00:00:00.000000000 Z
11
+ date: 2020-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-dynamodb
@@ -150,6 +150,7 @@ files:
150
150
  - settings/ci.yml
151
151
  - settings/development.yml
152
152
  - settings/docker.yml
153
+ - settings/test.yml
153
154
  homepage: https://exercism.io
154
155
  licenses: []
155
156
  metadata:
@@ -170,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
171
  - !ruby/object:Gem::Version
171
172
  version: '0'
172
173
  requirements: []
173
- rubygems_version: 3.0.8
174
+ rubygems_version: 3.1.2
174
175
  signing_key:
175
176
  specification_version: 4
176
177
  summary: Retrieves stored config for Exercism