dapr 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.release-please-manifest.json +1 -1
- data/.version.txt +1 -1
- data/CHANGELOG.md +14 -0
- data/Readme.adoc +25 -1
- data/coverage/coverage.json +1 -1
- data/lib/dapr/client/state.rb +4 -1
- data/lib/dapr/version.rb +1 -1
- data/vendor/cache/ast-2.4.2.gem +0 -0
- data/vendor/cache/bigdecimal-3.1.8.gem +0 -0
- data/vendor/cache/byebug-11.1.3.gem +0 -0
- data/vendor/cache/childprocess-5.1.0.gem +0 -0
- data/vendor/cache/coderay-1.1.3.gem +0 -0
- data/vendor/cache/concurrent-ruby-1.3.4.gem +0 -0
- data/vendor/cache/dapr-ruby-1.14.4.gem +0 -0
- data/vendor/cache/docile-1.4.1.gem +0 -0
- data/vendor/cache/gem-release-2.2.2.gem +0 -0
- data/vendor/cache/google-protobuf-4.29.1-x86_64-linux.gem +0 -0
- data/vendor/cache/googleapis-common-protos-types-1.16.0.gem +0 -0
- data/vendor/cache/grpc-1.68.1.gem +0 -0
- data/vendor/cache/iniparse-1.5.0.gem +0 -0
- data/vendor/cache/json-2.9.0.gem +0 -0
- data/vendor/cache/language_server-protocol-3.17.0.3.gem +0 -0
- data/vendor/cache/logger-1.6.3.gem +0 -0
- data/vendor/cache/method_source-1.1.0.gem +0 -0
- data/vendor/cache/minitest-5.25.4.gem +0 -0
- data/vendor/cache/overcommit-0.64.1.gem +0 -0
- data/vendor/cache/parallel-1.26.3.gem +0 -0
- data/vendor/cache/parser-3.3.6.0.gem +0 -0
- data/vendor/cache/pry-0.14.2.gem +0 -0
- data/vendor/cache/pry-byebug-3.10.1.gem +0 -0
- data/vendor/cache/racc-1.8.1.gem +0 -0
- data/vendor/cache/rainbow-3.1.1.gem +0 -0
- data/vendor/cache/rake-13.2.1.gem +0 -0
- data/vendor/cache/regexp_parser-2.9.3.gem +0 -0
- data/vendor/cache/rexml-3.4.0.gem +0 -0
- data/vendor/cache/rubocop-1.69.2.gem +0 -0
- data/vendor/cache/rubocop-ast-1.37.0.gem +0 -0
- data/vendor/cache/rubocop-minitest-0.36.0.gem +0 -0
- data/vendor/cache/rubocop-rake-0.6.0.gem +0 -0
- data/vendor/cache/ruby-progressbar-1.13.0.gem +0 -0
- data/vendor/cache/semantic_logger-4.16.1.gem +0 -0
- data/vendor/cache/shoulda-context-2.0.0.gem +0 -0
- data/vendor/cache/simplecov-0.22.0.gem +0 -0
- data/vendor/cache/simplecov-html-0.13.1.gem +0 -0
- data/vendor/cache/simplecov-json-0.2.3.gem +0 -0
- data/vendor/cache/simplecov_json_formatter-0.1.4.gem +0 -0
- data/vendor/cache/unicode-display_width-3.1.2.gem +0 -0
- data/vendor/cache/unicode-emoji-4.0.4.gem +0 -0
- metadata +43 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 143d85b149c2840757f870e631a22d1fac9a202e03821a1ed14de2f878100a9c
|
4
|
+
data.tar.gz: a1135123634f33ece1c650ad121a85ee024798dafed4219bb6197d8a322b5c99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9e2cdd3c10bc399f5eab64c8cf59a459f05ccf7d7e05334de6bf8bddb8987cdccedaea8b8f6b13ff66a7444e8ca608eb983cbbdf9e85529ac7b9d87998cd8e0
|
7
|
+
data.tar.gz: 8811767a7927281fbd58396cb30b2feff89cb4ef2ebd6f228f795948128d79fbf2747d0b2d7142fe8f194701b78e0cd424e597d1460b6274ab427ba64c9501fc
|
data/.version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.2
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.4.2](https://github.com/rubyists/dapr-ruby-client/compare/v0.4.1...v0.4.2) (2024-12-16)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* **build:** Vendor gems for quicker image builds ([#78](https://github.com/rubyists/dapr-ruby-client/issues/78)) ([57fbe12](https://github.com/rubyists/dapr-ruby-client/commit/57fbe126390aa9f5aebcf06d4f42bd5e1ff3ee63))
|
9
|
+
|
10
|
+
## [0.4.1](https://github.com/rubyists/dapr-ruby-client/compare/v0.4.0...v0.4.1) (2024-10-24)
|
11
|
+
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* **state:** Updates State#get to return a Hash instead of an Array ([#76](https://github.com/rubyists/dapr-ruby-client/issues/76)) ([052fcfa](https://github.com/rubyists/dapr-ruby-client/commit/052fcfa6ca6077e13343738d38b5768e693b4c9b))
|
16
|
+
|
3
17
|
## [0.4.0](https://github.com/rubyists/dapr-ruby-client/compare/v0.3.3...v0.4.0) (2024-10-23)
|
4
18
|
|
5
19
|
|
data/Readme.adoc
CHANGED
@@ -126,6 +126,30 @@ TIP: Multiple topics can be subscribed to simultaneously by passing an array of
|
|
126
126
|
|
127
127
|
Implementation of {state-block}
|
128
128
|
|
129
|
+
==== Set state key(s)
|
130
|
+
|
131
|
+
[source,ruby]
|
132
|
+
----
|
133
|
+
require 'dapr/client/state' <1>
|
134
|
+
desired_state = { key1: 'value1', key2: { nested: 'value2' }.to_json } <2>
|
135
|
+
Rubyists::Dapr::Client::State.set(desired_state) <3>
|
136
|
+
----
|
137
|
+
<1> Require the state client.
|
138
|
+
<2> Define the desired state. This must be a hash with simple keys, and the values must be strings (thus the #to_json)
|
139
|
+
<3> Set the state. This will overwrite any existing state with the same key(s) (and update the etag of any updated keys)
|
140
|
+
|
141
|
+
==== Get state key(s)
|
142
|
+
|
143
|
+
[source,ruby]
|
144
|
+
----
|
145
|
+
require 'dapr/client/state' <1>
|
146
|
+
states = Rubyists::Dapr::Client::State.get('key1', 'key2') <2>
|
147
|
+
puts states['key1'].data <3>
|
148
|
+
----
|
149
|
+
<1> Require the state client.
|
150
|
+
<2> Get the state for the specified key(s). This will return a hash whose values respond to #data.
|
151
|
+
<3> Access the data of the state for the `key1` key.
|
152
|
+
|
129
153
|
=== Actors
|
130
154
|
|
131
155
|
Implementation of {actors-block}
|
@@ -178,7 +202,7 @@ Releases are handled by release-please in github actions.
|
|
178
202
|
|
179
203
|
== Contributing
|
180
204
|
|
181
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/rubyists/dapr.
|
205
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/rubyists/dapr-ruby-client.
|
182
206
|
|
183
207
|
=== Conventional Commits
|
184
208
|
|
data/coverage/coverage.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"timestamp":
|
1
|
+
{"timestamp":1729724582,"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,7,null,null,null,1,1,1,1,1,null,null]},"covered_strength":1.6,"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,1,null,1,4,null,1,1,null,null,1,11,null,null,1,1,null,null,1,14,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.8823529411764706,"covered_lines":34,"lines_of_code":34},{"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,null,null,null,null,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,1,6,null,null,null,null,null]},"covered_strength":3.085714285714286,"covered_lines":35,"lines_of_code":35},{"filename":"/home/bougyman/rubyists/dapr/lib/dapr/client/state.rb","covered_percent":100.0,"coverage":{"lines":[null,null,1,null,1,1,1,null,null,1,null,1,1,null,1,null,1,1,1,1,1,1,1,null,null,null,null,null,null,1,1,null,null,null,null,null,null,null,1,1,null,null,null,null,null,1,2,null,null,null,null,null,null,1,1,1,3,null,null,null,null,1,3,1,1,1,null,null,null,null,null]},"covered_strength":1.1666666666666667,"covered_lines":30,"lines_of_code":30},{"filename":"/home/bougyman/rubyists/dapr/lib/dapr/version.rb","covered_percent":100.0,"coverage":{"lines":[null,null,1,1,null,1,null,null,null]},"covered_strength":1.0,"covered_lines":3,"lines_of_code":3}],"metrics":{"covered_percent":100.0,"covered_strength":1.8571428571428572,"covered_lines":133,"total_lines":133}}
|
data/lib/dapr/client/state.rb
CHANGED
@@ -14,6 +14,7 @@ module Rubyists
|
|
14
14
|
|
15
15
|
attr_reader :store_name
|
16
16
|
|
17
|
+
Item = Struct.new(:data, :etag, :metadata)
|
17
18
|
Empty = Google::Protobuf::Empty
|
18
19
|
Runtime = Client::Runtime
|
19
20
|
GetBulkStateResponse = Runtime::GetBulkStateResponse
|
@@ -53,11 +54,13 @@ module Rubyists
|
|
53
54
|
def get(keys, metadata: {})
|
54
55
|
logger.debug('Getting state', keys:, store_name:, metadata:)
|
55
56
|
response = singleton.get_bulk_state GetStateRequest.new(store_name:, keys:, metadata:)
|
56
|
-
response.items
|
57
|
+
response.items.to_h { |i| [i.key, Item.new(data: i.data, etag: i.etag, metadata: i.metadata)] }
|
57
58
|
end
|
58
59
|
|
59
60
|
# @param states [Hash] states to set (key/values in the state store)
|
60
61
|
# @param metadata [Hash] metadata to include
|
62
|
+
#
|
63
|
+
# @return [Empty] The response from the Dapr State Management component (Empty means success)
|
61
64
|
def set(states, metadata: {})
|
62
65
|
states = states.map { |key, value| { key:, value:, metadata: } }
|
63
66
|
request = SaveStateRequest.new(store_name:, states:)
|
data/lib/dapr/version.rb
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
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.4.
|
4
|
+
version: 0.4.2
|
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-
|
12
|
+
date: 2024-12-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dapr-ruby
|
@@ -71,6 +71,47 @@ files:
|
|
71
71
|
- sig/dapr.rbs
|
72
72
|
- tasks/coverage.rake
|
73
73
|
- tasks/wipelock.rake
|
74
|
+
- vendor/cache/ast-2.4.2.gem
|
75
|
+
- vendor/cache/bigdecimal-3.1.8.gem
|
76
|
+
- vendor/cache/byebug-11.1.3.gem
|
77
|
+
- vendor/cache/childprocess-5.1.0.gem
|
78
|
+
- vendor/cache/coderay-1.1.3.gem
|
79
|
+
- vendor/cache/concurrent-ruby-1.3.4.gem
|
80
|
+
- vendor/cache/dapr-ruby-1.14.4.gem
|
81
|
+
- vendor/cache/docile-1.4.1.gem
|
82
|
+
- vendor/cache/gem-release-2.2.2.gem
|
83
|
+
- vendor/cache/google-protobuf-4.29.1-x86_64-linux.gem
|
84
|
+
- vendor/cache/googleapis-common-protos-types-1.16.0.gem
|
85
|
+
- vendor/cache/grpc-1.68.1.gem
|
86
|
+
- vendor/cache/iniparse-1.5.0.gem
|
87
|
+
- vendor/cache/json-2.9.0.gem
|
88
|
+
- vendor/cache/language_server-protocol-3.17.0.3.gem
|
89
|
+
- vendor/cache/logger-1.6.3.gem
|
90
|
+
- vendor/cache/method_source-1.1.0.gem
|
91
|
+
- vendor/cache/minitest-5.25.4.gem
|
92
|
+
- vendor/cache/overcommit-0.64.1.gem
|
93
|
+
- vendor/cache/parallel-1.26.3.gem
|
94
|
+
- vendor/cache/parser-3.3.6.0.gem
|
95
|
+
- vendor/cache/pry-0.14.2.gem
|
96
|
+
- vendor/cache/pry-byebug-3.10.1.gem
|
97
|
+
- vendor/cache/racc-1.8.1.gem
|
98
|
+
- vendor/cache/rainbow-3.1.1.gem
|
99
|
+
- vendor/cache/rake-13.2.1.gem
|
100
|
+
- vendor/cache/regexp_parser-2.9.3.gem
|
101
|
+
- vendor/cache/rexml-3.4.0.gem
|
102
|
+
- vendor/cache/rubocop-1.69.2.gem
|
103
|
+
- vendor/cache/rubocop-ast-1.37.0.gem
|
104
|
+
- vendor/cache/rubocop-minitest-0.36.0.gem
|
105
|
+
- vendor/cache/rubocop-rake-0.6.0.gem
|
106
|
+
- vendor/cache/ruby-progressbar-1.13.0.gem
|
107
|
+
- vendor/cache/semantic_logger-4.16.1.gem
|
108
|
+
- vendor/cache/shoulda-context-2.0.0.gem
|
109
|
+
- vendor/cache/simplecov-0.22.0.gem
|
110
|
+
- vendor/cache/simplecov-html-0.13.1.gem
|
111
|
+
- vendor/cache/simplecov-json-0.2.3.gem
|
112
|
+
- vendor/cache/simplecov_json_formatter-0.1.4.gem
|
113
|
+
- vendor/cache/unicode-display_width-3.1.2.gem
|
114
|
+
- vendor/cache/unicode-emoji-4.0.4.gem
|
74
115
|
homepage: https://github.com/rubyists/dapr
|
75
116
|
licenses: []
|
76
117
|
metadata:
|