exercism-config 0.91.0 → 0.93.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: 9d253cd963bd2cd1762d7672d3deefb8f8e85a716e1bf70e8339d2b730842381
4
- data.tar.gz: c788cd77a39a0beba4ea63841b284856681d2b89d69ca23cdd9fa3c5f9131727
3
+ metadata.gz: 16195e19ebf17cf0f73791e33bc18ae139708c47875317c815620ec894376d1d
4
+ data.tar.gz: 561d84c132c387e3bf343869aa765aba2863cf6a0031b8609b1e811b965b8292
5
5
  SHA512:
6
- metadata.gz: f44aae054b096604b1746ab4733da45e9697d004f3f4ca788d8ff404f1f8524fb4691e9f41882ca875b510413c9940d0e3d9af7abc8986f9dd021e5e07f4dfc2
7
- data.tar.gz: eace4c0f2bf8cd2007ea618e38bc9a41d8b5b3de90042eae70392385b8e6106fee2a269b73ea1d792e4607424a295aa092cc376a4a5fbabb9857d9454574f16d
6
+ metadata.gz: 28b261e72ec35faa3db4120f4059c9e262d311bc405da08ab901757af01666b841e847f8431735b06ca0647bd24971af4ebc93242a186a758aca82e9a4dce3c3
7
+ data.tar.gz: 3f496a775c2eef3a3e45a773ac92034d7da7ebd040eb5ae05511285ca09ff2f4e9729860c3330e00e562ce288a70a0b725b022d0a27d4eaee5266b7333b40809
@@ -14,9 +14,9 @@ jobs:
14
14
  - uses: actions/checkout@v2
15
15
 
16
16
  - name: Set up Ruby
17
- uses: ruby/setup-ruby@a699edbce608a2c128dedad88e3b6a0e28687b3c
17
+ uses: ruby/setup-ruby@6cecb48364174b0952995175c55f9bf5527e6682
18
18
  with:
19
- ruby-version: 2.6.6
19
+ ruby-version: 3.2.1
20
20
 
21
21
  - name: Install gems
22
22
  run: |
@@ -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@168d6a54b412713c0ed60998a78093a270ca8d84
37
+ uses: ruby/setup-ruby@6cecb48364174b0952995175c55f9bf5527e6682
38
38
  with:
39
- ruby-version: '3.0'
39
+ ruby-version: "3.2.1"
40
40
  bundler-cache: true
41
41
 
42
42
  ###
data/README.md CHANGED
@@ -30,6 +30,7 @@ Exercism.secrets.github_access_token
30
30
  Exercism.secrets.github_omniauth_app_id
31
31
  Exercism.secrets.github_omniauth_app_secret
32
32
  Exercism.secrets.github_webhooks_secret
33
+ Exercism.secrets.github_graphql_readonly_access_token
33
34
  Exercism.secrets.hcaptcha_site_key
34
35
  Exercism.secrets.hcaptcha_secret
35
36
  Exercism.secrets.recaptcha_site_key
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 '\s\+.*rb' | xargs bundle exec rubocop --except Metrics --auto-correct --format quiet --force-exclusion lib/exercism-config.rb && \
3
+ git diff --name-status --staged | grep '^[MA]' | grep -o '\s\+.*rb' | xargs bundle exec rubocop --except Metrics --autocorrect --format quiet --force-exclusion lib/exercism-config.rb && \
4
4
  git diff --name-status --staged | grep '^[MA]' | grep -o '\s\+.*rb' | xargs git add
@@ -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('>= 3.0.3')
11
+ spec.required_ruby_version = Gem::Requirement.new('>= 3.2.1')
12
12
 
13
13
  spec.metadata['homepage_uri'] = spec.homepage
14
14
  spec.metadata['source_code_uri'] = 'https://github.com/exercism/config'
@@ -11,10 +11,10 @@ module Exercism
11
11
  job_id = SecureRandom.uuid.tr('-', '')
12
12
  data.merge!(
13
13
  id: job_id,
14
- submission_uuid: submission_uuid,
15
- type: type,
16
- language: language,
17
- exercise: exercise,
14
+ submission_uuid:,
15
+ type:,
16
+ language:,
17
+ exercise:,
18
18
  created_at: Time.now.utc.to_i
19
19
  )
20
20
 
data/lib/exercism.rb CHANGED
@@ -44,7 +44,17 @@ module Exercism
44
44
  )
45
45
 
46
46
  @octokit_client ||= Octokit::Client.new(
47
- access_token: access_token
47
+ access_token:
48
+ ).tap do |c|
49
+ c.auto_paginate = true
50
+ end
51
+ end
52
+
53
+ def self.octokit_graphql_client
54
+ require 'octokit'
55
+
56
+ @octokit_graphql_client ||= Octokit::Client.new(
57
+ access_token: self.secrets.github_graphql_readonly_access_token
48
58
  ).tap do |c|
49
59
  c.auto_paginate = true
50
60
  end
@@ -5,7 +5,7 @@ module ExercismConfig
5
5
  def call
6
6
  {
7
7
  region: 'eu-west-2',
8
- endpoint: endpoint,
8
+ endpoint:,
9
9
  access_key_id: aws_access_key_id,
10
10
  secret_access_key: aws_secret_access_key
11
11
  }.select { |_k, v| v }
@@ -1,3 +1,3 @@
1
1
  module ExercismConfig
2
- VERSION = '0.91.0'.freeze
2
+ VERSION = '0.93.0'.freeze
3
3
  end
data/settings/secrets.yml CHANGED
@@ -2,6 +2,7 @@ github_access_token: "some-github-access-token"
2
2
  github_omniauth_app_id: "some-github-app-id"
3
3
  github_omniauth_app_secret: "some-github-app-exercism-secret"
4
4
  github_webhooks_secret: "some-github-webhooks-secret"
5
+ github_graphql_readonly_access_token: "some-github-graphql-readonly-access-token"
5
6
  hcaptcha_site_key: "some-hcaptcha-site-key"
6
7
  hcaptcha_secret: "some-hcaptcha-secret"
7
8
  website_secret_key_base: "74732f062c60ffc4f2898b1ed36d1876cd34bb83ba3928bc14c1fd61a189179728a305b02b7de01a1f0a7627864d28cb410d64a8952465e5dd681522d8afc8d7"
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.91.0
4
+ version: 0.93.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Walker
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-24 00:00:00.000000000 Z
11
+ date: 2023-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-dynamodb
@@ -192,7 +192,7 @@ dependencies:
192
192
  - - ">="
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
- description:
195
+ description:
196
196
  email:
197
197
  - jez.walker@gmail.com
198
198
  executables:
@@ -231,9 +231,6 @@ files:
231
231
  - lib/exercism_config/generate_aws_settings.rb
232
232
  - lib/exercism_config/retrieve_config.rb
233
233
  - lib/exercism_config/retrieve_secrets.rb
234
- - lib/exercism_config/setup_dynamodb_client.rb
235
- - lib/exercism_config/setup_ecr_client.rb
236
- - lib/exercism_config/setup_s3_client.rb
237
234
  - lib/exercism_config/version.rb
238
235
  - package.json
239
236
  - settings/ci.yml
@@ -245,7 +242,7 @@ licenses: []
245
242
  metadata:
246
243
  homepage_uri: https://exercism.io
247
244
  source_code_uri: https://github.com/exercism/config
248
- post_install_message:
245
+ post_install_message:
249
246
  rdoc_options: []
250
247
  require_paths:
251
248
  - lib
@@ -253,7 +250,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
253
250
  requirements:
254
251
  - - ">="
255
252
  - !ruby/object:Gem::Version
256
- version: 3.0.3
253
+ version: 3.2.1
257
254
  required_rubygems_version: !ruby/object:Gem::Requirement
258
255
  requirements:
259
256
  - - ">="
@@ -261,7 +258,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
261
258
  version: '0'
262
259
  requirements: []
263
260
  rubygems_version: 3.4.6
264
- signing_key:
261
+ signing_key:
265
262
  specification_version: 4
266
263
  summary: Retrieves stored config for Exercism
267
264
  test_files: []
@@ -1,11 +0,0 @@
1
- module ExercismConfig
2
- class SetupDynamoDBClient
3
- include Mandate
4
-
5
- def call
6
- puts "[DEPRECATION] ExercismConfig::SetupDynamoDBClient.() is deprecated. Please use Exercism.dynamodb_client"
7
-
8
- Exercism.dynamodb_client
9
- end
10
- end
11
- end
@@ -1,11 +0,0 @@
1
- module ExercismConfig
2
- class SetupECRClient
3
- include Mandate
4
-
5
- def call
6
- puts "[DEPRECATION] ExercismConfig::SetupECRClient.() is deprecated. Please use Exercism.ecr_client"
7
-
8
- Exercism.ecr_client
9
- end
10
- end
11
- end
@@ -1,11 +0,0 @@
1
- module ExercismConfig
2
- class SetupS3Client
3
- include Mandate
4
-
5
- def call
6
- puts "[DEPRECATION] ExercismConfig::SetupS3Client.() is deprecated. Please use Exercism.s3_client"
7
-
8
- Exercism.s3_client
9
- end
10
- end
11
- end