quiz_broker_client 0.1.0 → 0.2.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: 839a7e79c6b2ebb264aebe79fd12efb3329a6ef020b4bb88b7e9d27b01b93a4d
4
- data.tar.gz: 420b141b32c8f99e5ea7dd0807e4810cc9d8ab947007ab72b95d52e3c4026b04
3
+ metadata.gz: 12ec464be1851bb5c198101977a0ac2d2b4d14c244181dd61171cb5a7f2fdc95
4
+ data.tar.gz: e6a0aae0c874755f3c261e14a2f5450e66c42ed33ffaf434108fc165e4289ebf
5
5
  SHA512:
6
- metadata.gz: 7512454ccb3ce64059c645b222853a91347fb7fe837719f0c9f134d8749bb0a9fd748908d2f0edc54b0584f0561dec5bdfc73f820973b8c51bbb8a154efe3053
7
- data.tar.gz: 2a365d373b825038e6a1b1d62f1c92cd7fcacf88d90a3ad5d5a992a17e081f35f1dc50575e9570690a07d4fda09f3a6b585d8ee0c147a9a01ed9078a9e5246ed
6
+ metadata.gz: 1e507f0652039f92b5229bcd46222a7c71cc0f48ebb8eed211cec0dc727fb1bdf9338ade4e51ca70d5a9f2b9ab6e5da3ed6254f653ee446c4f2d7ab238eba58f
7
+ data.tar.gz: 05ebf9c2f4cc47c19b8734c776cc50da0e45e2b0f46085781b742f8fa9df0b5d72c43907d3b19f317727ad65f77645a3e7779a064cefdde9446dc2b4faa92007
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.0] - 2024-03-15
4
+
5
+ - Allow configuring the DynamoDB endpoint used by the client
6
+
3
7
  ## [0.1.0] - 2024-03-15
4
8
 
5
9
  - Initial release
data/Jenkinsfile CHANGED
@@ -60,7 +60,7 @@ pipeline {
60
60
  }
61
61
  steps {
62
62
  withCredentials([string(credentialsId: 'rubygems-rw', variable: 'GEM_HOST_API_KEY')]) {
63
- sh 'docker run -e GEM_HOST_API_KEY --rm quiz_broker_client /bin/bash -lc "./bin/publish.sh"'
63
+ sh 'docker compose run -e GEM_HOST_API_KEY --rm quiz_broker_client /bin/bash -lc "./bin/publish"'
64
64
  }
65
65
  }
66
66
  }
@@ -72,4 +72,3 @@ pipeline {
72
72
  }
73
73
  }
74
74
  }
75
-
@@ -1,6 +1,6 @@
1
1
  module QuizBrokerClient
2
2
  class Configuration
3
- attr_accessor :authorized_contexts_table_name, :ttl
3
+ attr_accessor :authorized_contexts_table_name, :dynamo_endpoint, :ttl
4
4
 
5
5
  def initialize
6
6
  @ttl = 43_200 # 12 hours
@@ -11,13 +11,22 @@ module QuizBrokerClient::DynamoDB
11
11
  end
12
12
  end
13
13
 
14
+ def client
15
+ @_client ||= Aws::DynamoDB::Client.new(client_options)
16
+ end
17
+
14
18
  private
15
19
 
16
20
  def clear_client!
17
21
  @_client = nil
18
22
  end
19
23
 
20
- def client
21
- @_client ||= Aws::DynamoDB::Client.new
24
+ def client_options
25
+ options = {}
26
+
27
+ configured_endpoint = QuizBrokerClient.configuration.dynamo_endpoint
28
+ options[:endpoint] = configured_endpoint unless configured_endpoint.nil? || configured_endpoint.empty?
29
+
30
+ options.compact
22
31
  end
23
32
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module QuizBrokerClient
4
- VERSION = '0.1.0'
4
+ VERSION = '0.2.0'
5
5
  end
@@ -26,5 +26,6 @@ Gem::Specification.new do |spec|
26
26
  spec.add_dependency 'aws-sdk-dynamodb', '~> 1', '>= 1.85.0'
27
27
 
28
28
  spec.add_development_dependency 'byebug', '~> 9.0', '>= 9.0.5'
29
+ spec.add_development_dependency 'climate_control', '~> 1.2'
29
30
  spec.add_development_dependency 'simplecov'
30
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quiz_broker_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Weston Dransfield
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-21 00:00:00.000000000 Z
11
+ date: 2024-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-dynamodb
@@ -50,6 +50,20 @@ dependencies:
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
52
  version: 9.0.5
53
+ - !ruby/object:Gem::Dependency
54
+ name: climate_control
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '1.2'
60
+ type: :development
61
+ prerelease: false
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - "~>"
65
+ - !ruby/object:Gem::Version
66
+ version: '1.2'
53
67
  - !ruby/object:Gem::Dependency
54
68
  name: simplecov
55
69
  requirement: !ruby/object:Gem::Requirement