dapr 0.1.26 → 0.1.27

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: ede293d0cbb90960527f0c91f4009679a2db765f355b8a9d17094f209c11b900
4
- data.tar.gz: a6ca7bc7a6ad7f8a775b395a6c5eb1da9164f820af88efd8768827436beabc75
3
+ metadata.gz: 723514a7c053e567a10f55dfbe0f32d00c2e3ec53e2fa1055c3acd7ae9665b51
4
+ data.tar.gz: 812b4395406f1876516effed12114d9e82cab68cc58362487dfb4c95d3c608ea
5
5
  SHA512:
6
- metadata.gz: 4f0d9506ea6006ddd9a117bb330767b86c208d56ef668b418e46b0f3cc231788a8c28dee64a2b412b32cda25bbe104f1b7d27a26b063773e4173c8e127a149d5
7
- data.tar.gz: 5b3612f1175a25544aa284514391d4b0c27f9ddaca60eafafe589e7cfc5942b4c2d73c616e7d6743e1596558216302ed7371f8d2f322100e116bd218f4040e07
6
+ metadata.gz: e80e94eee0743a5fc5bc7ee9575ed84558b53f2a72e27c669d6f755ad17131c53e9b71aa7ea7b612aa6b70f41f76c4b2f8b6d72de0d19ef340d4b38013686148
7
+ data.tar.gz: fe4385f616156ee8b3d450fb731e245d0bd7493d1bc5419aee7c7507084899eef2659b379b3f6c32ae386415f199deb2b693e45221338cc7cf24017ef44ab4bb
@@ -1 +1 @@
1
- {"timestamp":1715471428,"command_name":"Unit Tests","files":[{"filename":"/home/bougyman/rubyists/dapr/lib/dapr.rb","covered_percent":100.0,"coverage":{"lines":[null,null,1,1,null,null,1,1,3,null,null,null,1,1,1,1,1,null,null]},"covered_strength":1.2,"covered_lines":10,"lines_of_code":10},{"filename":"/home/bougyman/rubyists/dapr/lib/dapr/client.rb","covered_percent":100.0,"coverage":{"lines":[null,null,1,1,1,1,1,null,1,1,null,1,1,1,1,1,null,1,4,null,1,1,null,null,1,8,null,null,1,1,null,null,1,11,null,null,null,1,1,null,1,5,null,null,1,1,1,1,null,1,null,null,1,2,null,null,null,null,null]},"covered_strength":1.7575757575757576,"covered_lines":33,"lines_of_code":33},{"filename":"/home/bougyman/rubyists/dapr/lib/dapr/client/lock.rb","covered_percent":100.0,"coverage":{"lines":[null,null,1,1,null,1,1,1,null,1,null,1,1,null,null,1,null,null,1,null,1,1,null,1,6,6,null,null,null,null,null,null,1,6,6,null,null,null,1,6,6,5,5,null,null,1,null,null,null,1,4,4,4,null,3,3,null,null,1,null,null,1,18,null,null,null,null,null]},"covered_strength":3.0606060606060606,"covered_lines":33,"lines_of_code":33}],"metrics":{"covered_percent":100.0,"covered_strength":2.25,"covered_lines":76,"total_lines":76}}
1
+ {"timestamp":1716154010,"command_name":"Unit Tests","files":[{"filename":"/home/bougyman/rubyists/dapr/lib/dapr.rb","covered_percent":100.0,"coverage":{"lines":[null,null,1,1,null,null,1,1,5,null,null,null,1,1,1,1,1,null,null]},"covered_strength":1.4,"covered_lines":10,"lines_of_code":10},{"filename":"/home/bougyman/rubyists/dapr/lib/dapr/client.rb","covered_percent":100.0,"coverage":{"lines":[null,null,1,1,1,1,1,null,1,1,null,1,1,1,1,1,null,1,4,null,1,1,null,null,1,9,null,null,1,1,null,null,1,12,null,null,null,1,1,null,1,5,null,null,1,1,1,1,null,1,null,null,1,1,null,null,null,null,null]},"covered_strength":1.7878787878787878,"covered_lines":33,"lines_of_code":33},{"filename":"/home/bougyman/rubyists/dapr/lib/dapr/client/configuration.rb","covered_percent":100.0,"coverage":{"lines":[null,null,1,null,1,1,1,null,1,null,1,1,null,null,1,null,null,1,null,1,1,null,1,1,1,null,null,null,null,null,null,null,1,1,1,1,null,null,1,1,1,null,null,null,null,null]},"covered_strength":1.0,"covered_lines":21,"lines_of_code":21},{"filename":"/home/bougyman/rubyists/dapr/lib/dapr/client/lock.rb","covered_percent":100.0,"coverage":{"lines":[null,null,1,1,null,1,1,1,null,1,null,1,1,null,null,1,null,null,1,null,1,1,null,1,6,6,null,null,null,null,null,null,1,6,6,null,null,null,1,6,6,5,5,null,null,1,null,null,null,1,4,4,4,null,3,3,null,null,1,null,null,1,18,null,null,null,null,null]},"covered_strength":3.0606060606060606,"covered_lines":33,"lines_of_code":33}],"metrics":{"covered_percent":100.0,"covered_strength":2.0103092783505154,"covered_lines":97,"total_lines":97}}
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../client'
4
+
5
+ module Rubyists
6
+ module Dapr
7
+ module Client
8
+ # Handles publishing messages to Dapr pub/sub topics
9
+ class Configuration
10
+ # Include the client module
11
+ include Client
12
+ include SemanticLogger::Loggable
13
+
14
+ # The name of the configuration component, the keys we care about, and the metadata
15
+ attr_reader :store_name, :keys, :metadata
16
+
17
+ # The proto class for the GetConfiguration request
18
+ ConfigurationRequest = ::Dapr::Proto::Runtime::V1::GetConfigurationRequest
19
+ # The proto class for the GetConfiguration response
20
+ ConfigurationResponse = ::Dapr::Proto::Runtime::V1::GetConfigurationResponse
21
+ DEFAULT_STORE_NAME = 'dapr-config'
22
+
23
+ def self.get(keys = [], store_name: DEFAULT_STORE_NAME, metadata: {})
24
+ configuration = new(store_name, keys:, metadata:)
25
+ configuration.get
26
+ end
27
+
28
+ # Initialize the Configuration object
29
+ #
30
+ # @param store_name [String] The name of the Dapr Configuration component to use
31
+ # @param keys [Array<String>] The keys to retrieve from the configuration store (empty means all)
32
+ # @param metadata [Hash] Optional metadata to pass to the Dapr configuration store
33
+ def initialize(store_name, keys: [], metadata: {})
34
+ @store_name = store_name
35
+ @keys = Array(keys)
36
+ @metadata = metadata
37
+ end
38
+
39
+ def get
40
+ logger.debug('Getting configuration', keys:, store_name:)
41
+ singleton.get_configuration(ConfigurationRequest.new(store_name:, keys:, metadata:))
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
data/lib/dapr/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rubyists
4
4
  module Dapr
5
- VERSION = '0.1.26'
5
+ VERSION = '0.1.27'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dapr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.26
4
+ version: 0.1.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tj (bougyman) Vanderpoel
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2024-05-14 00:00:00.000000000 Z
12
+ date: 2024-05-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dapr-ruby
@@ -55,6 +55,7 @@ files:
55
55
  - coverage/coverage.json
56
56
  - lib/dapr.rb
57
57
  - lib/dapr/client.rb
58
+ - lib/dapr/client/configuration.rb
58
59
  - lib/dapr/client/lock.rb
59
60
  - lib/dapr/client/publisher.rb
60
61
  - lib/dapr/service.rb