harmoniser 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/LICENSE.txt +21 -0
- data/README.md +137 -0
- data/docs/cli.md +20 -0
- data/harmoniser.gemspec +31 -0
- data/lib/harmoniser/configuration.rb +8 -8
- data/lib/harmoniser/launcher.rb +1 -1
- data/lib/harmoniser/publisher.rb +2 -2
- data/lib/harmoniser/subscriber.rb +1 -1
- data/lib/harmoniser/topology.rb +1 -1
- data/lib/harmoniser/version.rb +1 -1
- metadata +14 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05d33501383838004a5dbf7f99fc83f9a28eebdd8a85e54bc738672200cbbf37
|
4
|
+
data.tar.gz: 943cf0cec5a82ee8a05c53c6886df77c1277cfeb3e3f8aa8a8e8cd8358cd2ea2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1bfc3d36722722911ad9a7b96765966204b74cdcbfbe9432f58fc1f306097f15810c382c916f6afa53da1244b11ec5b7b0d4d8b1b538e7cb264547081eaacea
|
7
|
+
data.tar.gz: aefd48071e6c2802a5636a94315acd8864282624754b55caedd704270d6c106d9aa1487a2d9597949e64eed44e206701524c593ac62374f6eec18089b5d052ee
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## [0.1.0] - 2023-11-27
|
4
|
+
|
5
|
+
### Added
|
6
|
+
|
7
|
+
- Support to express publishing through any kind of exchanges
|
8
|
+
- Capability to subscribe to queues
|
9
|
+
- Express RabbitMQ topology separated from the responsibility of publishing or subscribing
|
10
|
+
- Provide dedicated Ruby process to consume messages through the subscribers defined
|
11
|
+
|
12
|
+
## [0.2.0] - 2023-11-28
|
13
|
+
|
14
|
+
### Added
|
15
|
+
|
16
|
+
- Introduce github action for releasing the gem once is merged into master
|
17
|
+
|
18
|
+
## [0.3.0] - 2023-11-29
|
19
|
+
|
20
|
+
### Added
|
21
|
+
|
22
|
+
- Introduce github action for building, linting and running specs anytime a pull request is opened or push to master happens
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
6
|
+
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
8
|
+
|
9
|
+
## Our Standards
|
10
|
+
|
11
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
12
|
+
|
13
|
+
* Demonstrating empathy and kindness toward other people
|
14
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
15
|
+
* Giving and gracefully accepting constructive feedback
|
16
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
17
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
18
|
+
|
19
|
+
Examples of unacceptable behavior include:
|
20
|
+
|
21
|
+
* The use of sexualized language or imagery, and sexual attention or
|
22
|
+
advances of any kind
|
23
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
24
|
+
* Public or private harassment
|
25
|
+
* Publishing others' private information, such as a physical or email
|
26
|
+
address, without their explicit permission
|
27
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
28
|
+
professional setting
|
29
|
+
|
30
|
+
## Enforcement Responsibilities
|
31
|
+
|
32
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
33
|
+
|
34
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
35
|
+
|
36
|
+
## Scope
|
37
|
+
|
38
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
39
|
+
|
40
|
+
## Enforcement
|
41
|
+
|
42
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at TODO: Write your email address. All complaints will be reviewed and investigated promptly and fairly.
|
43
|
+
|
44
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
45
|
+
|
46
|
+
## Enforcement Guidelines
|
47
|
+
|
48
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
49
|
+
|
50
|
+
### 1. Correction
|
51
|
+
|
52
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
53
|
+
|
54
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
55
|
+
|
56
|
+
### 2. Warning
|
57
|
+
|
58
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
59
|
+
|
60
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
61
|
+
|
62
|
+
### 3. Temporary Ban
|
63
|
+
|
64
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
65
|
+
|
66
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
67
|
+
|
68
|
+
### 4. Permanent Ban
|
69
|
+
|
70
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
71
|
+
|
72
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
73
|
+
|
74
|
+
## Attribution
|
75
|
+
|
76
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
77
|
+
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
78
|
+
|
79
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
80
|
+
|
81
|
+
[homepage]: https://www.contributor-covenant.org
|
82
|
+
|
83
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
84
|
+
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2021 TODO: Write your name
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,137 @@
|
|
1
|
+
# Harmoniser
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/harmoniser.svg)](https://badge.fury.io/rb/harmoniser)
|
4
|
+
![CI workflow](https://github.com/jollopre/harmoniser/actions/workflows/ci.yml/badge.svg)
|
5
|
+
|
6
|
+
A minimalistic approach to communicating with RabbitMQ.
|
7
|
+
|
8
|
+
Harmoniser uses [Bunny](https://github.com/ruby-amqp/bunny) as a low level library to communicate with RabbitMQ in order to integrate publishing and messages consuming.
|
9
|
+
|
10
|
+
## Getting Started
|
11
|
+
|
12
|
+
1. Add this line to your application's Gemfile:
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
gem "harmoniser"
|
16
|
+
```
|
17
|
+
|
18
|
+
2. Install the gem:
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
$ bundle install
|
22
|
+
```
|
23
|
+
|
24
|
+
3. Include `Harmoniser::Publisher` and/or `Harmoniser::Subscriber` in your classes. For instance, [this scenario](examples/multicast.rb) assumes that you'd like to run publishers and subscriber under the same process.
|
25
|
+
|
26
|
+
4. (Optional) Run the dedicated process for Harmoniser in order to process messages from your subscribers:
|
27
|
+
|
28
|
+
```sh
|
29
|
+
$ bundle exec harmoniser --require ./examples/multicast.rb
|
30
|
+
```
|
31
|
+
|
32
|
+
5. Inspect the logs to see if everything worked as expected. Look for logs including `harmoniser@`.
|
33
|
+
|
34
|
+
## Concepts
|
35
|
+
|
36
|
+
Harmoniser is a library for publishing/consuming messages through RabbitMQ. It allows to not only connect applications but also to scale an application by performing work in the background. This gem is comprised of three parts:
|
37
|
+
|
38
|
+
### Publisher
|
39
|
+
|
40
|
+
The Publisher runs in any Ruby process (puma, unicorn, passenger, sidekiq, etc) and allows you to
|
41
|
+
push messages through a [RabbitMQ Exchange](https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchanges). Creating a publisher is as simple as:
|
42
|
+
|
43
|
+
```ruby
|
44
|
+
require "harmoniser"
|
45
|
+
|
46
|
+
class MyPublisher
|
47
|
+
include Harmoniser::Publisher
|
48
|
+
harmoniser_publisher exchange_name: "my_topic_exchange"
|
49
|
+
end
|
50
|
+
|
51
|
+
MyPublisher.publish({ salute: "Hello World!" }.to_json, routing_key: "my_resource.foo.bar")
|
52
|
+
```
|
53
|
+
|
54
|
+
The code above assumes that the exchange is already defined. We'd like to emphasize that defining RabbitMQ topology (exchanges, queues and binding) should be performed outside of the class whose role is purely focused on publishing. See more details about how to define the topology [here](examples/multicast.rb#L9-L18).
|
55
|
+
|
56
|
+
### RabbitMQ
|
57
|
+
|
58
|
+
RabbitMQ is the message broker used to publish/consume messages through Harmoniser. It can be configured through `Harmoniser.configure` as follows:
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
require "harmoniser"
|
62
|
+
|
63
|
+
Harmoniser.configure do |config|
|
64
|
+
config.connection_opts = {
|
65
|
+
host: "rabbitmq"
|
66
|
+
}
|
67
|
+
end
|
68
|
+
```
|
69
|
+
|
70
|
+
The options permitted for `connection_opts` are those accepted by
|
71
|
+
[Bunny](https://github.com/ruby-amqp/bunny/blob/80a8fc7aa0cd73f8778df87ae05f28c443d10c0d/lib/bunny/session.rb#L142) since at the end this library is built on top of the most widely used Ruby client for RabbitMQ.
|
72
|
+
|
73
|
+
### Subscriber Server
|
74
|
+
|
75
|
+
Harmoniser server is a process specifically dedicated to run Subscribers that are listening into [Rabbit Queues](https://www.rabbitmq.com/tutorials/amqp-concepts.html#queues). This process like any other Ruby process (puma, unicorn, passenger, sidekiq, etc) is up and running unless OS Signals like (SIGINT, SIGTERM) are sent to it. The server during boot time is able to register each class from your code that includes `Harmoniser::Subscriber` module. Creating a subscriber is as simple as:
|
76
|
+
|
77
|
+
```ruby
|
78
|
+
class MySubscriber
|
79
|
+
include Harmoniser::Subscriber
|
80
|
+
harmoniser_subscriber queue_name: "my_queue"
|
81
|
+
|
82
|
+
class << self
|
83
|
+
def on_delivery(delivery_info, properties, payload)
|
84
|
+
Harmoniser.logger.info({
|
85
|
+
body: "message received",
|
86
|
+
payload: payload
|
87
|
+
}.to_json)
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
```
|
92
|
+
|
93
|
+
The code above assumes that the queue and its binding to an exchange are already defined. You can see more details about how this is specified [here](examples/multicast.rb#L9-L18).
|
94
|
+
|
95
|
+
In order for the subscribers to receive messages from a queue, you should spin up a dedicated Ruby process like following:
|
96
|
+
|
97
|
+
```sh
|
98
|
+
$ bundle exec harmoniser --require ./a_path_to_your_ruby_file.rb
|
99
|
+
```
|
100
|
+
|
101
|
+
More info about the different options accepted by harmoniser process in [Harmoniser CLI](docs/cli.md).
|
102
|
+
|
103
|
+
## Contributing
|
104
|
+
|
105
|
+
If you are facing issues and you suspect are related to Harmoniser, please consider opening an issue [here](https://github.com/jollopre/harmoniser/issues). Remember to include as much information as possible such as version of Ruby, Rails, Harmoniser, OS, etc.
|
106
|
+
|
107
|
+
If you consider you have encountered a potential bug, detailed information about how to reproduce it might help to speed up its fix.
|
108
|
+
|
109
|
+
### Code
|
110
|
+
|
111
|
+
In order to contribute to this codebase, you will need to setup your local development using the following steps:
|
112
|
+
|
113
|
+
```sh
|
114
|
+
# Prepare the environment for working locally.
|
115
|
+
$ make build
|
116
|
+
# Perform the desired changes into your local copy
|
117
|
+
$ make test
|
118
|
+
```
|
119
|
+
|
120
|
+
You can also shell into the running container by executing `$ make shell` and from within execute anything related to Harmoniser on its isolated environment.
|
121
|
+
|
122
|
+
## Future Improvements
|
123
|
+
|
124
|
+
- [ ] Issue: Reopen memoized Channel in the context of the class that are included. There are scenarios for which the channel gets closed, for instance Precondition Failed when checking an exchange declaration.
|
125
|
+
- [ ] Chore: Introduce simplecov gem for code coverage.
|
126
|
+
- [ ] Feature: Add sensible defaults for Session options like heartbeat, timeout, recovery_completed or recovery_attempt_started.
|
127
|
+
- [ ] Feature: Add default `on_return` handler as well as permitting the definition of on_return method to be called anytime a published message gets returned.
|
128
|
+
- [ ] Feature: Add default `on_error` and `on_uncaught_exception` as well as permitting the definition of them to be called anytime an error in the channel occurs or error in the consumer handler happens.
|
129
|
+
- [ ] Feature: Introduce capability of configuring number of threads for queue consuming at the CLI.
|
130
|
+
|
131
|
+
## License
|
132
|
+
|
133
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
134
|
+
|
135
|
+
## Author
|
136
|
+
|
137
|
+
Jose Lloret, [<jollopre@gmail.com>](mailto:jollopre@gmail.com)
|
data/docs/cli.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Harmoniser CLI
|
2
|
+
|
3
|
+
Harmoniser CLI is a command line tool than run a Ruby process through `bundle exec harmoniser`. This utility accepts the following options:
|
4
|
+
|
5
|
+
```sh
|
6
|
+
bundle exec harmoniser -h
|
7
|
+
|
8
|
+
harmoniser [options]
|
9
|
+
-e, --environment ENV Application environment
|
10
|
+
-r, --require [PATH|DIR] File to require or location of Rails application
|
11
|
+
-v, --[no-]verbose Run verbosely
|
12
|
+
-V, --version Print version and exit
|
13
|
+
-h, --help Show help
|
14
|
+
```
|
15
|
+
|
16
|
+
The `environment` is automatically inferred from the environment variables `RAILS_ENV` or `RACK_ENV`, otherwise fallbacks to `production`. However you can specify your preferred value, for instance `development` or `test`.
|
17
|
+
|
18
|
+
The `require` is by default pointing at `.`, which means that this option when configured under a Rails application, might be ignored. Since Ruby is not Rails only, you can certainly specify the location path of your Ruby file that will be used to load the classes including Harmoniser::Subscriber. In contrast, if a path to a directory is passed, Harmoniser assumes that `./config/environment.rb` lives within the folder passed as option.
|
19
|
+
|
20
|
+
The `verbose` option, when passed, sets the severity of Harmoniser logs to `debug` being able to see fine-grained details of things like RabbitMQ interactions happening or messages published into exchanges. By default, the verbosity is disabled to prevent your production environment to be flooded with unnecessary logs, however if the environment is not set to `production`, the severity of the logs is `debug` mode too.
|
data/harmoniser.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/harmoniser/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "harmoniser"
|
7
|
+
spec.version = Harmoniser::VERSION
|
8
|
+
spec.authors = ["Jose Lloret"]
|
9
|
+
spec.email = ["jollopre@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = "A minimalistic approach to communicating with RabbitMQ"
|
12
|
+
spec.description = "A declarative approach to communicating with RabbitMQ that makes it easy to integrate publishing and consuming messages"
|
13
|
+
spec.homepage = "https://github.com/jollopre/harmoniser"
|
14
|
+
spec.license = "MIT"
|
15
|
+
spec.required_ruby_version = ">= 3.2"
|
16
|
+
|
17
|
+
spec.metadata = {
|
18
|
+
"homepage_uri" => spec.homepage,
|
19
|
+
"source_code_uri" => "https://github.com/jollopre/harmoniser",
|
20
|
+
"changelog_uri" => "https://github.com/jollopre/harmoniser/blob/master/CHANGELOG.md"
|
21
|
+
}
|
22
|
+
|
23
|
+
spec.files = Dir["lib/**/*.rb"] + Dir["bin/*"] + Dir["docs/**/*", "CHANGELOG.md", "CODE_OF_CONDUCT.md", "harmoniser.gemspec", "LICENSE.txt", "README.md"]
|
24
|
+
spec.executables = ["harmoniser"]
|
25
|
+
spec.require_paths = ["lib"]
|
26
|
+
|
27
|
+
spec.add_runtime_dependency "bunny", "~> 2.22"
|
28
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
29
|
+
spec.add_development_dependency "rspec", "~> 3"
|
30
|
+
spec.add_development_dependency "standardrb", "~> 1.0"
|
31
|
+
end
|
@@ -20,14 +20,14 @@ module Harmoniser
|
|
20
20
|
}
|
21
21
|
MUTEX = Mutex.new
|
22
22
|
|
23
|
-
attr_reader :
|
23
|
+
attr_reader :connection_opts, :logger, :options
|
24
24
|
def_delegators :options, :environment, :require, :verbose
|
25
25
|
|
26
26
|
def initialize
|
27
27
|
@logger = Logger.new($stdout, progname: "harmoniser@#{VERSION}")
|
28
28
|
@options = Options.new(**default_options)
|
29
29
|
set_logger_severity
|
30
|
-
@connection_opts = DEFAULT_CONNECTION_OPTS.merge({
|
30
|
+
@connection_opts = DEFAULT_CONNECTION_OPTS.merge({logger: @logger})
|
31
31
|
@topology = Topology.new
|
32
32
|
end
|
33
33
|
|
@@ -39,7 +39,7 @@ module Harmoniser
|
|
39
39
|
|
40
40
|
def connection
|
41
41
|
MUTEX.synchronize do
|
42
|
-
@connection
|
42
|
+
@connection ||= Connection.new(connection_opts)
|
43
43
|
@connection.start unless @connection.open?
|
44
44
|
@connection
|
45
45
|
end
|
@@ -51,8 +51,8 @@ module Harmoniser
|
|
51
51
|
@connection_opts = connection_opts.merge(opts)
|
52
52
|
end
|
53
53
|
|
54
|
-
def options_with(**
|
55
|
-
@options = options.with(**
|
54
|
+
def options_with(**)
|
55
|
+
@options = options.with(**)
|
56
56
|
set_logger_severity
|
57
57
|
end
|
58
58
|
|
@@ -67,10 +67,10 @@ module Harmoniser
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def set_logger_severity
|
70
|
-
if @options.production?
|
71
|
-
@
|
70
|
+
@logger.level = if @options.production?
|
71
|
+
@options.verbose? ? Logger::DEBUG : Logger::INFO
|
72
72
|
else
|
73
|
-
|
73
|
+
Logger::DEBUG
|
74
74
|
end
|
75
75
|
end
|
76
76
|
end
|
data/lib/harmoniser/launcher.rb
CHANGED
@@ -34,7 +34,7 @@ module Harmoniser
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def stop_subscribers
|
37
|
-
@logger.info("Connection will be closed: connection = `#{@configuration.connection
|
37
|
+
@logger.info("Connection will be closed: connection = `#{@configuration.connection}`")
|
38
38
|
@configuration.connection.close
|
39
39
|
end
|
40
40
|
|
data/lib/harmoniser/publisher.rb
CHANGED
@@ -3,7 +3,7 @@ require "harmoniser/definition"
|
|
3
3
|
|
4
4
|
module Harmoniser
|
5
5
|
module Publisher
|
6
|
-
class MissingExchangeDefinition < StandardError
|
6
|
+
class MissingExchangeDefinition < StandardError; end
|
7
7
|
include Channelable
|
8
8
|
MUTEX = Mutex.new
|
9
9
|
private_constant :MUTEX
|
@@ -13,7 +13,7 @@ module Harmoniser
|
|
13
13
|
@harmoniser_exchange_definition = Definition::Exchange.new(
|
14
14
|
name: exchange_name,
|
15
15
|
type: nil,
|
16
|
-
opts: {
|
16
|
+
opts: {passive: true}
|
17
17
|
)
|
18
18
|
end
|
19
19
|
|
data/lib/harmoniser/topology.rb
CHANGED
data/lib/harmoniser/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: harmoniser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jose Lloret
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '3
|
47
|
+
version: '3'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '3
|
54
|
+
version: '3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: standardrb
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,7 +66,8 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.0'
|
69
|
-
description: A declarative
|
69
|
+
description: A declarative approach to communicating with RabbitMQ that makes it easy
|
70
|
+
to integrate publishing and consuming messages
|
70
71
|
email:
|
71
72
|
- jollopre@gmail.com
|
72
73
|
executables:
|
@@ -74,9 +75,15 @@ executables:
|
|
74
75
|
extensions: []
|
75
76
|
extra_rdoc_files: []
|
76
77
|
files:
|
78
|
+
- CHANGELOG.md
|
79
|
+
- CODE_OF_CONDUCT.md
|
80
|
+
- LICENSE.txt
|
81
|
+
- README.md
|
77
82
|
- bin/console
|
78
83
|
- bin/harmoniser
|
79
84
|
- bin/setup
|
85
|
+
- docs/cli.md
|
86
|
+
- harmoniser.gemspec
|
80
87
|
- lib/harmoniser.rb
|
81
88
|
- lib/harmoniser/channelable.rb
|
82
89
|
- lib/harmoniser/cli.rb
|
@@ -107,7 +114,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
107
114
|
requirements:
|
108
115
|
- - ">="
|
109
116
|
- !ruby/object:Gem::Version
|
110
|
-
version: 2
|
117
|
+
version: '3.2'
|
111
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
119
|
requirements:
|
113
120
|
- - ">="
|
@@ -117,5 +124,5 @@ requirements: []
|
|
117
124
|
rubygems_version: 3.4.10
|
118
125
|
signing_key:
|
119
126
|
specification_version: 4
|
120
|
-
summary: A
|
127
|
+
summary: A minimalistic approach to communicating with RabbitMQ
|
121
128
|
test_files: []
|