Skip to content

Commit

Permalink
Fix markdown linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jvanecek committed Aug 13, 2024
1 parent e9eca3c commit 4a26627
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 34 deletions.
58 changes: 32 additions & 26 deletions docs/MigrationGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,69 @@

## Migration from v2 to v3

* Manually load the package `Ansible-Deprecated-V3` that has transformation of deprecated messages.
* Manually load the package `Ansible-Deprecated-V3` that has transformation of
deprecated messages.

* `RabbitMQWorker` has been refactored to be used by composition instead of inheritance:
The classes that subclassified it implemented the subclass responsibility `#configureConnection:` and `#process: payload` should be changed to instantiate `RabbitMQWorker` as to pass that process logic to the `processingPayloadWith:` collaborator.
* `RabbitMQWorker` has been refactored to be used by composition instead of
inheritance: The classes that subclassified it implemented the subclass
responsibility `#configureConnection:` and `#process: payload` should be
changed to instantiate `RabbitMQWorker` as to pass that process logic to the
`processingPayloadWith:` collaborator.

For instance,
For instance,

```
```smalltalk
Class {
#name : 'RabbitMQTextReverser',
#superclass : 'RabbitMQWorker',
#instVars : [
#name : 'RabbitMQTextReverser',
#superclass : 'RabbitMQWorker',
#instVars : [
'testCase',
]
}
{ #category : 'initialization' }
RabbitMQTextReverser >> initializeWorkingWith: aTestCase
RabbitMQTextReverser >> initializeWorkingWith: aTestCase
testCase := aTestCase
{ #category : 'private' }
RabbitMQTextReverser >> #configureConnection: builder
RabbitMQTextReverser >> #configureConnection: builder
builder hostname: 'localhost'.
builder portNumber: 5672.
builder username: 'guest'.
builder password: 'guest'.
builder portNumber: 5672.
builder username: 'guest'.
builder password: 'guest'.
{ #category : 'private' }
RabbitMQTextReverser >> process: payload
RabbitMQTextReverser >> process: payload
testCase storeText: payload utf8Decoded reversed
```

Should be refactored to

```
```smalltalk
Class {
#name : 'RabbitMQTextReverser',
#superclass : 'Object',
#instVars : [
#name : 'RabbitMQTextReverser',
#superclass : 'Object',
#instVars : [
'worker'
]
}
RabbitMQTextReverser >> initializeWorkingWith: aTestCase
RabbitMQTextReverser >> initializeWorkingWith: aTestCase
worker := RabbitMQWorker
configuredBy: [ :options |
options
options
at: #hostname 'localhost';.
at: #port 5672;.
at: #username 'guest';.
at: #password 'guest'
at: #username 'guest';.
at: #password 'guest'
]
processingMessagesWith: [ :payload | aTestCase storeText: payload utf8Decoded reversed ].
processingMessagesWith: [ :payload |
aTestCase storeText: payload utf8Decoded reversed
].
worker start
```
```
10 changes: 6 additions & 4 deletions docs/tutorials/RabbitMQPublisher.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# RabbitMQPublisher
# RabbitMQPublisher

This object will connect to an AMQP channel and knows how to publish messages to the specified queue for further processing.
This object will connect to an AMQP channel and knows how to publish messages
to the specified queue for further processing.

Accepts the following options:
Accepts the following options:

<!-- markdownlint-disable MD013 -->
| Attribute name | Description | Optional/Mandatory | Default value |
| ---------------|-------------|--------------------|---------------|
| #hostname | Hostname of the rabbitmq broker | Optional | localhost |
Expand All @@ -13,5 +15,5 @@ Accepts the following options:
| #maximumConnectionAttemps | Amount of retries when connecting to the broker fails | Optional | 3 |
| #timeSlotBetweenConnectionRetriesInMs | Time duration between retry attempts determined by using the exponential backoff algorithm | Optional | 3000 |
| #enableDebuggingLogs | A boolean indicating whether to log debugging events | Optional | false |
| #extraClientProperties | A dictionary with keys and values to set the (client properties)[https://www.rabbitmq.com/docs/connections#capabilities] | Optional | Empty |
| #extraClientProperties | A dictionary with keys and values to set the [client properties](https://www.rabbitmq.com/docs/connections#capabilities) |Optional | Empty |
| #retry | A block that can configure the internal `Retry` instance | Optional | `[]` |
10 changes: 6 additions & 4 deletions docs/tutorials/RabbitMQWorker.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# RabbitMQWorker
# RabbitMQWorker

This object will connect to an AMQP channel and knows how to consume messages from a specified queue for processing.
This object will connect to an AMQP channel and knows how to consume messages
from a specified queue for processing.

Accepts the following options:
Accepts the following options:

<!-- markdownlint-disable MD013 -->
| Attribute name | Description | Optional/Mandatory | Default value |
| ---------------|-------------|--------------------|---------------|
| #hostname | Hostname of the rabbitmq broker | Optional | localhost |
Expand All @@ -13,7 +15,7 @@ Accepts the following options:
| #maximumConnectionAttemps | Amount of retries when connecting to the broker fails | Optional | 3 |
| #timeSlotBetweenConnectionRetriesInMs | Time duration between retry attempts determined by using the exponential backoff algorithm | Optional | 3000 |
| #enableDebuggingLogs | A boolean indicating whether to log debugging events | Optional | false |
| #extraClientProperties | A dictionary with keys and values to set the (client properties)[https://www.rabbitmq.com/docs/connections#capabilities] | Optional | Empty |
| #extraClientProperties | A dictionary with keys and values to set the [client properties](https://www.rabbitmq.com/docs/connections#capabilities)| Optional | Empty |
| #retry | A block that can configure the internal `Retry` instance | Optional | `[]` |
| #queueName | Queue name where to consume from | Mandatory | |
| #queueDurable | When false sets the [queue durability](https://www.rabbitmq.com/docs/queues#durability) to transient, otherwise will be durable | Optional | true |

0 comments on commit 4a26627

Please sign in to comment.