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 +4 -4
- data/lib/exercism_config/retrieve.rb +16 -0
- data/lib/exercism_config/version.rb +1 -1
- data/settings/test.yml +7 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc1b4facff164813306b5b40a77e41426e8ec8bf8b559ed334572b7339ac1bfe
|
4
|
+
data.tar.gz: 541c70f5546de7dccca0825e34eeee9cc68e6310780fa87c6c3d1e0f7c5fc3cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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"})
|
data/settings/test.yml
ADDED
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.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-
|
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.
|
174
|
+
rubygems_version: 3.1.2
|
174
175
|
signing_key:
|
175
176
|
specification_version: 4
|
176
177
|
summary: Retrieves stored config for Exercism
|