dapr 0.1.22 → 0.1.24

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: 8484048493bf83c016231bb89e2cf182eb5a6ed7a4701c0e0d123f441ebe00c2
4
- data.tar.gz: 80e2bdd2d0fd05e80ab53689ec52c0bcef75497c018414b5c78386e84c828b98
3
+ metadata.gz: 3f9f12b47b2ab348b8b9f5095344b65bb4da63c278cfb4dcf56ca8b12f7cd67a
4
+ data.tar.gz: 7908909ca89827446908d97dc90c067893e1d8ddaf2d713cb5d12ea659b28ea4
5
5
  SHA512:
6
- metadata.gz: cd4af672f11224af264d3ef8ce1a1a88df4d58c45e2378d2af38a83f92ae2c414f75160e38833d8b36ce08337741e9938ac74b0f8e4be7fcf9499ebc604c9ea0
7
- data.tar.gz: a446be5f5a79c39c2662fa3597d4a4cc1bec1e0819cf398e741e1d5e159f6fdc548855169ce9de0856e9c852b0a7d3074be973d7b8fb661ef9d312d6132ae0ce
6
+ metadata.gz: c9f2864759062b40a8d69f964e827c58de2044dfdcb10d17e055ac9c1ab1b8f52f1a762ae1e3d60c3de9bd3949acfdd717c3f3b404e649a13b5fe1db7f8287ce
7
+ data.tar.gz: e3aa1f63899f004c65985f3169f0ea70aae72b541df1d9977d6da234244e3db21054920cb8b1efcbd5fe9cb8efb9d98a66ef81f5fbffb746b48699f40a8dce3d
data/Readme.adoc CHANGED
@@ -26,7 +26,7 @@ Documentation will be added as the library matures.
26
26
 
27
27
  == Installation
28
28
 
29
- Install the gem and add to the application's Gemfile by executing:
29
+ Install the gem and add it to the application's Gemfile by executing:
30
30
 
31
31
  $ bundle add dapr --require dapr/client
32
32
 
@@ -71,7 +71,7 @@ TIP: JSON is our default serializer. To use a different serializer, you can pass
71
71
 
72
72
  ==== Subscribe to topics
73
73
 
74
- Subscriptions in Dapr work a little different than you may be used to. Instead of subscribing to a topic
74
+ Subscriptions in Dapr work a little differently than you may be used to. Instead of subscribing to a topic
75
75
  then looping through consumed messages, you define a fully-fledged service that Dapr will
76
76
  send each message to in the topic(s) that you specify. This unique approach allows you to
77
77
  focus on the business logic of your service, rather than the plumbing of message consumption.
@@ -133,7 +133,7 @@ Implementation of {cryptography-block}
133
133
 
134
134
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
135
135
 
136
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to https://rubygems.org[rubygems.org].
136
+ To install this gem on your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to https://rubygems.org[rubygems.org].
137
137
 
138
138
  == Contributing
139
139
 
@@ -11,8 +11,17 @@ module Rubyists
11
11
  class Subscriber
12
12
  include SemanticLogger::Loggable
13
13
 
14
- attr_reader(:service_proto, :runtime_proto, :pubsub_name, :topics, :handler)
14
+ attr_reader :service_proto, :runtime_proto, :pubsub_name, :topics, :handler
15
15
 
16
+ # Create a new Subscriber instance.
17
+ #
18
+ # @param [String] pubsub_name name of the pubsub component
19
+ # @param [String|Array<String>] topics topic (or topics) to subscribe to
20
+ # @param [Proc|Object] handler handler to call when an event is received. Must respond to #call
21
+ # @param [Class] service_proto Dapr Runtime Service Class to use for the subscriber
22
+ # @param [Module] runtime_proto Dapr Runtime Proto Module to use for the subscriber
23
+ #
24
+ # @return [Subscriber] the subscriber instance
16
25
  def initialize(pubsub_name:,
17
26
  topics:,
18
27
  handler: nil,
@@ -38,9 +47,10 @@ module Rubyists
38
47
  def start!(grpc_port: nil, listen_address: '0.0.0.0')
39
48
  server = GRPC::RpcServer.new
40
49
  grpc_port ||= port
41
- server.add_http2_port("#{listen_address}:#{grpc_port}", :this_port_is_insecure)
50
+ listener = "#{listen_address}:#{grpc_port}"
51
+ server.add_http2_port(listener, :this_port_is_insecure)
42
52
  server.handle(service)
43
- logger.warn('Starting Dapr Subscriber service', grpc_port:)
53
+ logger.warn('Starting Dapr Subscriber service', listen_address:, grpc_port:)
44
54
  server.run_till_terminated_or_interrupted([1, +'int', +'SIGQUIT'])
45
55
  self
46
56
  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.22'
5
+ VERSION = '0.1.24'
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.22
4
+ version: 0.1.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tj (bougyman) Vanderpoel