Readme.adoc in dapr-0.1.25 vs Readme.adoc in dapr-0.2.2

- old
+ new

@@ -34,10 +34,18 @@ If bundler is not being used to manage dependencies, install the gem by executing: $ gem install dapr +.Example from Gemfile +[source,ruby] +---- +gem 'dapr', '~> 0.1.9', require: 'dapr/client' +gem 'datadog_api_client' +gem 'grpc', force_ruby_platform: true +---- + == Usage Dapr being such a Smörgåsbord, this library exposes each {dapr-building-block} as either a Client or a Service, depending on whether it uses the AppCallback runtime (Service) or the Dapr API (Client). The clients are thin wrappers around the Dapr API, while the service @@ -80,11 +88,11 @@ [source,ruby] ---- require 'dapr/service/subscriber' handler = ->(event) { puts "Got event: #{event}" } <1> -pubsub_name = 'pubsub' <2> +pubsub_name = 'pubsub-name' <2> topics = 'TOPIC-A' <3> sub = Rubyists::Dapr::Service::Subscriber.new(pubsub_name:, topics:, handler:) <4> sub.start! <5> ---- <1> Define a handler that will be called for each message received. `event` will be a `CloudEvents::Event` instance. @@ -94,11 +102,11 @@ <2> The name of the Dapr pubsub component this subscriber will utilize. <3> The name of the topic(s) to subscribe to. + TIP: Multiple topics can be subscribed to simultaneously by passing an array of topic names to the `topics` argument. + -<4> Create a new subscriber for the `pubsub` pubsub component, subscribing to the `TOPIC-A` topic. +<4> Create a new subscriber for the `pubsub-name` pubsub component, subscribing to the `TOPIC-A` topic. <5> Start the subscriber. This will block the current thread and call the handler for each message received. === State Management Implementation of {state-block} @@ -138,5 +146,15 @@ 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]. == Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/rubyists/dapr. + +=== Conventional Commits + +This project uses Conventional Commits for commit messages. Please follow the guidelines at https://www.conventionalcommits.org/en/v1.0.0/[conventionalcommits.org]. + +=== Overcommit + +This project uses https://github.com/sds/overcommit[overcommit] to enforce repository policies. Please ensure you have it installed and configured before contributing. + +tl;dr;: `overcommit --install && overcommit --sign`