dapr 0.1.20 → 0.1.22

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: 8df47b206023dca8719858a4804d26d2ebafa509bddb478b91bede1cc4218d62
4
- data.tar.gz: 950c92173973547e2865de8ea19733a0cd01c2740871e12c2eea3dc7de1c58b2
3
+ metadata.gz: 8484048493bf83c016231bb89e2cf182eb5a6ed7a4701c0e0d123f441ebe00c2
4
+ data.tar.gz: 80e2bdd2d0fd05e80ab53689ec52c0bcef75497c018414b5c78386e84c828b98
5
5
  SHA512:
6
- metadata.gz: 7b71595b5f08a7c41c16f2dfb1c77dfd2d82e45a3d18a87a1cc2ef69a164d9eb481af8e4e024d4c7de7dc11796d3db4de135c3ba9d06aa07fae9bae7d14a25a4
7
- data.tar.gz: abda725498346865e3adc1d8102bb1ceee7dcc08170b5d409a0e5b29fc81b50817cd80f3aac71fc9338abfcd25700f992a32248833127edd3a354bd522c61b3c
6
+ metadata.gz: cd4af672f11224af264d3ef8ce1a1a88df4d58c45e2378d2af38a83f92ae2c414f75160e38833d8b36ce08337741e9938ac74b0f8e4be7fcf9499ebc604c9ea0
7
+ data.tar.gz: a446be5f5a79c39c2662fa3597d4a4cc1bec1e0819cf398e741e1d5e159f6fdc548855169ce9de0856e9c852b0a7d3074be973d7b8fb661ef9d312d6132ae0ce
data/.rubocop.yml CHANGED
@@ -7,6 +7,7 @@ AllCops:
7
7
  TargetRubyVersion: 3.2.0
8
8
  NewCops: enable
9
9
 
10
+
10
11
  Style/StringLiterals:
11
12
  Enabled: true
12
13
  EnforcedStyle: single_quotes
data/Readme.adoc CHANGED
@@ -36,11 +36,17 @@ If bundler is not being used to manage dependencies, install the gem by executin
36
36
 
37
37
  == Usage
38
38
 
39
- Dapr being such a kitchen sink, the client exposes each dapr building block as either a
40
- client or a service, depending on whether it uses the AppCallback runtime (Service) or
41
- the Dapr API (Client). The clients art thin wrappers around the Dapr API, while the service
42
- is a more opinionated and higher-level abstraction.
39
+ Dapr being such a kitchen sink, this library exposes each {dapr-building-block} as either a
40
+ Client or a Service, depending on whether it uses the AppCallback runtime (Service) or
41
+ the Dapr API (Client). The clients are thin wrappers around the Dapr API, while the service
42
+ implementations will be more opinionated, higher-level abstractions. See the specific section on
43
+ the building block you are interested in for its usage information.
43
44
 
45
+ == Building Blocks
46
+
47
+ === Namespace Convention
48
+
49
+ In order to avoid conflicts with any other `Dapr` top level namespace(s),
44
50
  Each {dapr-building-block} is exposed as a class under the `Rubyists::Dapr::Client` or
45
51
  `Rubyists::Dapr::Service` namespace.
46
52
 
@@ -55,11 +61,13 @@ Implementation of {pubsub-block}
55
61
  require 'dapr/client/publisher'
56
62
  ENV['DAPR_GRPC_PORT'] = '3500' <1>
57
63
  publisher = Rubyists::Dapr::Client::Publisher.new('pubsub-name') <2>
58
- publisher.publish('topic-name', { message: 'Hello, Dapr!', from: 'Ruby' })
64
+ publisher.publish('topic-name', { message: 'Hello, Dapr!', from: 'Ruby' }) <3>
59
65
  ----
60
66
  <1> Set the Dapr gRPC port to the Dapr runtime port. (This is automatically set in kubernetes environments)
61
67
  <2> Create a new publisher for the `pubsub-name` pubsub component. This component must be defined in the Dapr runtime.
62
- <3> Publish a message to the `topic-name` topic.
68
+ <3> Publish a message to the `topic-name` topic. The message can be any Ruby object that can be serialized to JSON.
69
+ +
70
+ TIP: JSON is our default serializer. To use a different serializer, you can pass a `serializer:` argument to the publisher's initializer
63
71
 
64
72
  ==== Subscribe to topics
65
73
 
data/lib/dapr/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rubyists
4
4
  module Dapr
5
- VERSION = '0.1.20'
5
+ VERSION = '0.1.22'
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.20
4
+ version: 0.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tj (bougyman) Vanderpoel