dapr 0.1.22 → 0.1.23

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: b3594c97afeef8db520aea812dae24e17f6e443d50b455aa63904e41b9556f8e
4
+ data.tar.gz: 209e77fc0eeba207f142c8d07cc0107bf27b8c4b98dd48cc764e901893797160
5
5
  SHA512:
6
- metadata.gz: cd4af672f11224af264d3ef8ce1a1a88df4d58c45e2378d2af38a83f92ae2c414f75160e38833d8b36ce08337741e9938ac74b0f8e4be7fcf9499ebc604c9ea0
7
- data.tar.gz: a446be5f5a79c39c2662fa3597d4a4cc1bec1e0819cf398e741e1d5e159f6fdc548855169ce9de0856e9c852b0a7d3074be973d7b8fb661ef9d312d6132ae0ce
6
+ metadata.gz: 3f4176d49928933f38bc12c3eb2a1d68c46ab8b02e5b4ea74911df9747ab7aba4b20ce5021e43cf6c2d7fcc32d50ecd7ca6724de4690aa4d01e5cca78f91d10c
7
+ data.tar.gz: 73b1e732fa7d3dce83f35c6e155ae1c79e90676dffdee79439f206a4950057d601357d60af6f286764f96f9e288ec5812656538a6a257b29d93f8edf12a4f94b
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
 
@@ -13,6 +13,15 @@ module Rubyists
13
13
 
14
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.23'
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.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tj (bougyman) Vanderpoel