railway-ipc 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +10 -2
- data/lib/railway_ipc/logger.rb +2 -1
- data/lib/railway_ipc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 133691d7aed29182f6310115b7de88fa29f20b75f7ee3146171f7a9e37a32c4f
|
4
|
+
data.tar.gz: 4af075e0791c180d341654a19cade7ffdb2d7a1c6030f54c13c3abb9cb68ff05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d58329cccd6475eadfc5a83da44cd8c1c19753bc6f28b39fb821a8f9667729b9ccd1826c2e14c99925e3bb5401122a86f15bbc32c850352104e1baf72ab72bab
|
7
|
+
data.tar.gz: a2fcab82bd1e8a1c732ceb26710ea502e95e63785633a3c5484c45f70321c49a37e939afa3095323dd000fddc7387a3d13e5830117d97bb25b52eecf261bfce0
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -14,7 +14,7 @@ And then execute:
|
|
14
14
|
|
15
15
|
## Usage
|
16
16
|
|
17
|
-
Configure the `RailwayIpc` logger in an initializer:
|
17
|
+
* Configure the `RailwayIpc` logger in an initializer:
|
18
18
|
|
19
19
|
```ruby
|
20
20
|
# config/initializers/railway_ipc.rb
|
@@ -22,13 +22,21 @@ Configure the `RailwayIpc` logger in an initializer:
|
|
22
22
|
RailwayIpc.configure(logger: Rails.logger)
|
23
23
|
```
|
24
24
|
|
25
|
-
Load the rake tasks in your Rakefile
|
25
|
+
* Load the rake tasks in your Rakefile
|
26
26
|
|
27
27
|
```ruby
|
28
28
|
# Rakefile
|
29
29
|
require "railway_ipc"
|
30
30
|
```
|
31
31
|
|
32
|
+
* Create RabbitMQ connection credentials for Railway and set the environment variable:
|
33
|
+
|
34
|
+
```
|
35
|
+
RABBITMQ_CONNECTION_URL=amqp://<railway_user>:<railway_password>@localhost:5672
|
36
|
+
```
|
37
|
+
|
38
|
+
|
39
|
+
|
32
40
|
# Publish/Consume
|
33
41
|
|
34
42
|
Define your consumer, handler and publisher. See the docs [here](https://docs.learn.co/projects/learn-ipc/railway-ipc-gem/) to learn more.
|
data/lib/railway_ipc/logger.rb
CHANGED
@@ -28,7 +28,8 @@ module RailwayIpc
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def message_header(message)
|
31
|
-
"message type: #{message.class}, uuid: #{message.uuid}, correlation_id: #{message.correlation_id}
|
31
|
+
log_statement = "message type: #{message.class}, uuid: #{message.uuid}, correlation_id: #{message.correlation_id}"
|
32
|
+
message.respond_to?(:user_uuid) ? "#{log_statement}, user_uuid: #{message.user_uuid}" : log_statement
|
32
33
|
end
|
33
34
|
end
|
34
35
|
end
|
data/lib/railway_ipc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: railway-ipc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|