exercism-config 0.36.0 → 0.37.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/rubocop-quick +2 -2
- data/bin/setup_exercism_local_aws +2 -2
- data/lib/exercism-config.rb +1 -1
- data/lib/exercism/config.rb +15 -1
- data/lib/exercism_config/version.rb +1 -1
- data/settings/test-ci.yml +1 -1
- data/settings/test-docker.yml +1 -1
- data/settings/test-local.yml +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c3553a925d735e0f255f9e3c7afc498b1b6c33d70d30026b138beed0fbd49d0
|
4
|
+
data.tar.gz: 9270aee69112a25339a7c9c68450f72418a7ddfdd59667b571151025e3cc89cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a8016773caff1b76a54e9d71febcda4b9e87b37e309859f02568a1146e54af2c0fc7f9336d351b6e5b24fa7ac82f14a5ead9ba71226583b64565ca67cccf5f3
|
7
|
+
data.tar.gz: 066ea0f51d9aaf4f3e6b4daf46b743510ebd41a399f299fca560e860f5dd17d39a5ccd31afe2bb6cabfed4f7524dc87d05bb0778f2b55082f3fbd823aaa2f567
|
data/bin/rubocop-quick
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
|
3
|
-
git diff --name-status --staged | grep '^[MA]' | grep -o '
|
4
|
-
git diff --name-status --staged | grep '^[MA]' | grep -o '
|
3
|
+
git diff --name-status --staged | grep '^[MA]' | grep -o '\s\+.*rb' | xargs bundle exec rubocop --except Metrics --auto-correct --format quiet --force-exclusion lib/exercism-config.rb && \
|
4
|
+
git diff --name-status --staged | grep '^[MA]' | grep -o '\s\+.*rb' | xargs git add
|
@@ -3,7 +3,7 @@ require "bundler/setup"
|
|
3
3
|
require "exercism-config"
|
4
4
|
|
5
5
|
# Only allow this to run in development
|
6
|
-
return
|
6
|
+
return if Exercism.env.production?
|
7
7
|
|
8
8
|
puts "Create AWS/DynamoDB tables..."
|
9
9
|
|
@@ -15,7 +15,7 @@ Exercism.config.dynamodb_client = ExercismConfig::SetupDynamoDBClient.()
|
|
15
15
|
|
16
16
|
# We don't need this running for CI atm as none of our
|
17
17
|
# tests actually hit s3. Although we might choose to change this
|
18
|
-
unless ENV["EXERCISM_CI"]
|
18
|
+
unless ENV["EXERCISM_CI"] || ENV["EXERCISM_SKIP_S3"]
|
19
19
|
begin
|
20
20
|
ExercismConfig::SetupS3Client.().create_bucket(bucket: Exercism.config.aws_iterations_bucket)
|
21
21
|
rescue Seahorse::Client::NetworkingError => e
|
data/lib/exercism-config.rb
CHANGED
data/lib/exercism/config.rb
CHANGED
@@ -1,12 +1,26 @@
|
|
1
1
|
module Exercism
|
2
2
|
class Config < OpenStruct
|
3
|
+
PROPS_WITH_TEST_SUFFIX = %i[
|
4
|
+
dynamodb_tooling_jobs_table
|
5
|
+
].freeze
|
6
|
+
|
3
7
|
def initialize(data, aws_settings)
|
4
8
|
super(data)
|
5
9
|
self.aws_settings = aws_settings
|
6
10
|
end
|
7
11
|
|
12
|
+
PROPS_WITH_TEST_SUFFIX.each do |prop|
|
13
|
+
define_method prop do
|
14
|
+
Exercism.env.test? ? "#{super()}-test" : super()
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
8
18
|
def to_json(*_args)
|
9
|
-
to_h
|
19
|
+
hash = to_h
|
20
|
+
PROPS_WITH_TEST_SUFFIX.each do |prop|
|
21
|
+
hash[prop] = send(prop)
|
22
|
+
end
|
23
|
+
hash.to_json
|
10
24
|
end
|
11
25
|
end
|
12
26
|
end
|
data/settings/test-ci.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
anycable_redis_url: redis://127.0.0.1:6379/1
|
2
2
|
anycable_rpc_host: 127.0.0.1:50051
|
3
3
|
aws_iterations_bucket: exercism-staging-iterations
|
4
|
-
dynamodb_tooling_jobs_table: tooling_jobs
|
4
|
+
dynamodb_tooling_jobs_table: tooling_jobs-test
|
5
5
|
spi_url: http://127.0.0.1:3020
|
6
6
|
tooling_orchestrator_url: http://127.0.0.1:3021
|
7
7
|
|
data/settings/test-docker.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
anycable_redis_url: redis://some_anycable_redis_url:1234/9
|
2
2
|
anycable_rpc_host: 1.2.3.4:9876543
|
3
3
|
aws_iterations_bucket: some-iterations-bucket
|
4
|
-
dynamodb_tooling_jobs_table:
|
4
|
+
dynamodb_tooling_jobs_table: tooling_jobs-test
|
5
5
|
spi_url: http://some_url:1234
|
6
6
|
tooling_orchestrator_url: http://some_orchestrator_url:1234
|
7
7
|
|
data/settings/test-local.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
anycable_redis_url: redis://some_anycable_redis_url:1234/9
|
2
2
|
anycable_rpc_host: 1.2.3.4:9876543
|
3
3
|
aws_iterations_bucket: some-iterations-bucket
|
4
|
-
dynamodb_tooling_jobs_table:
|
4
|
+
dynamodb_tooling_jobs_table: tooling_jobs-test
|
5
5
|
spi_url: http://some_url:1234
|
6
6
|
tooling_orchestrator_url: http://some_orchestrator_url:1234
|
7
7
|
|
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.37.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-08-
|
11
|
+
date: 2020-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-dynamodb
|