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.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.release-please-manifest.json +1 -1
  3. data/.version.txt +1 -1
  4. data/CHANGELOG.md +14 -0
  5. data/Readme.adoc +25 -1
  6. data/coverage/coverage.json +1 -1
  7. data/lib/dapr/client/state.rb +4 -1
  8. data/lib/dapr/version.rb +1 -1
  9. data/vendor/cache/ast-2.4.2.gem +0 -0
  10. data/vendor/cache/bigdecimal-3.1.8.gem +0 -0
  11. data/vendor/cache/byebug-11.1.3.gem +0 -0
  12. data/vendor/cache/childprocess-5.1.0.gem +0 -0
  13. data/vendor/cache/coderay-1.1.3.gem +0 -0
  14. data/vendor/cache/concurrent-ruby-1.3.4.gem +0 -0
  15. data/vendor/cache/dapr-ruby-1.14.4.gem +0 -0
  16. data/vendor/cache/docile-1.4.1.gem +0 -0
  17. data/vendor/cache/gem-release-2.2.2.gem +0 -0
  18. data/vendor/cache/google-protobuf-4.29.1-x86_64-linux.gem +0 -0
  19. data/vendor/cache/googleapis-common-protos-types-1.16.0.gem +0 -0
  20. data/vendor/cache/grpc-1.68.1.gem +0 -0
  21. data/vendor/cache/iniparse-1.5.0.gem +0 -0
  22. data/vendor/cache/json-2.9.0.gem +0 -0
  23. data/vendor/cache/language_server-protocol-3.17.0.3.gem +0 -0
  24. data/vendor/cache/logger-1.6.3.gem +0 -0
  25. data/vendor/cache/method_source-1.1.0.gem +0 -0
  26. data/vendor/cache/minitest-5.25.4.gem +0 -0
  27. data/vendor/cache/overcommit-0.64.1.gem +0 -0
  28. data/vendor/cache/parallel-1.26.3.gem +0 -0
  29. data/vendor/cache/parser-3.3.6.0.gem +0 -0
  30. data/vendor/cache/pry-0.14.2.gem +0 -0
  31. data/vendor/cache/pry-byebug-3.10.1.gem +0 -0
  32. data/vendor/cache/racc-1.8.1.gem +0 -0
  33. data/vendor/cache/rainbow-3.1.1.gem +0 -0
  34. data/vendor/cache/rake-13.2.1.gem +0 -0
  35. data/vendor/cache/regexp_parser-2.9.3.gem +0 -0
  36. data/vendor/cache/rexml-3.4.0.gem +0 -0
  37. data/vendor/cache/rubocop-1.69.2.gem +0 -0
  38. data/vendor/cache/rubocop-ast-1.37.0.gem +0 -0
  39. data/vendor/cache/rubocop-minitest-0.36.0.gem +0 -0
  40. data/vendor/cache/rubocop-rake-0.6.0.gem +0 -0
  41. data/vendor/cache/ruby-progressbar-1.13.0.gem +0 -0
  42. data/vendor/cache/semantic_logger-4.16.1.gem +0 -0
  43. data/vendor/cache/shoulda-context-2.0.0.gem +0 -0
  44. data/vendor/cache/simplecov-0.22.0.gem +0 -0
  45. data/vendor/cache/simplecov-html-0.13.1.gem +0 -0
  46. data/vendor/cache/simplecov-json-0.2.3.gem +0 -0
  47. data/vendor/cache/simplecov_json_formatter-0.1.4.gem +0 -0
  48. data/vendor/cache/unicode-display_width-3.1.2.gem +0 -0
  49. data/vendor/cache/unicode-emoji-4.0.4.gem +0 -0
  50. metadata +43 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5cef0f3267e0f07b9ccedcfb29297c49cd9c5cbc5d16e556c72c82821c1ff4c8
4
- data.tar.gz: 23d4d7a6e7b0aa1e9482c08eae87290deb7b23508820c88bcb31f1e34432dad9
3
+ metadata.gz: 143d85b149c2840757f870e631a22d1fac9a202e03821a1ed14de2f878100a9c
4
+ data.tar.gz: a1135123634f33ece1c650ad121a85ee024798dafed4219bb6197d8a322b5c99
5
5
  SHA512:
6
- metadata.gz: d6f5d917f97ad175316c3552f48b02e3600e585f9cc13dd38ec7f511f84004c6596edc9891e0e2d4ad84797be87b6d5a587093b79c81b83b1054bf7404aac96c
7
- data.tar.gz: 6516a0a52f7538992c413d0fdf8e888124d5840e3f149bdd9247a191763256fdd4a4912037acadccd4bfd87d3b736de163af77f917fee3e5cedb2c1d81a5889e
6
+ metadata.gz: a9e2cdd3c10bc399f5eab64c8cf59a459f05ccf7d7e05334de6bf8bddb8987cdccedaea8b8f6b13ff66a7444e8ca608eb983cbbdf9e85529ac7b9d87998cd8e0
7
+ data.tar.gz: 8811767a7927281fbd58396cb30b2feff89cb4ef2ebd6f228f795948128d79fbf2747d0b2d7142fe8f194701b78e0cd424e597d1460b6274ab427ba64c9501fc
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.4.0"
2
+ ".": "0.4.2"
3
3
  }
data/.version.txt CHANGED
@@ -1 +1 @@
1
- 0.4.0
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
 
@@ -1 +1 @@
1
- {"timestamp":1729718516,"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,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,1,null,null,null,null,1,3,1,1,1,null,null,null,null,null]},"covered_strength":1.103448275862069,"covered_lines":29,"lines_of_code":29},{"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.8484848484848484,"covered_lines":132,"total_lines":132}}
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}}
@@ -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
@@ -3,7 +3,7 @@
3
3
  module Rubyists
4
4
  module Dapr
5
5
  # x-release-please-start-version
6
- VERSION = '0.4.0'
6
+ VERSION = '0.4.2'
7
7
  # x-release-please-end
8
8
  end
9
9
  end
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.0
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-10-23 00:00:00.000000000 Z
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: