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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a647cd13c25cf49400ae1b9bf26623aced2bd095e7e75b7fc85f82d8e58a8d12
4
- data.tar.gz: 38816dee53b741fa3bf3b3c53ee3f50463c1d858dddb2c739a4b433b969cc7a8
3
+ metadata.gz: 133691d7aed29182f6310115b7de88fa29f20b75f7ee3146171f7a9e37a32c4f
4
+ data.tar.gz: 4af075e0791c180d341654a19cade7ffdb2d7a1c6030f54c13c3abb9cb68ff05
5
5
  SHA512:
6
- metadata.gz: 4646593fe8a95cebf90b703891fa97f0a608ad122d596607e70c275ea44e4e7d8668fef61852c051268faf418556bbb9bf5771a89ebef82c77d84329fa1c6998
7
- data.tar.gz: 2d59b7af561eb23b85c1196ca5071a30420f4f4cd0eb3a671d6a5b9a6050fcd30e3cb40cbf62b3d524a02faa7e426d15ec54e4428af68bd024d582095e265600
6
+ metadata.gz: d58329cccd6475eadfc5a83da44cd8c1c19753bc6f28b39fb821a8f9667729b9ccd1826c2e14c99925e3bb5401122a86f15bbc32c850352104e1baf72ab72bab
7
+ data.tar.gz: a2fcab82bd1e8a1c732ceb26710ea502e95e63785633a3c5484c45f70321c49a37e939afa3095323dd000fddc7387a3d13e5830117d97bb25b52eecf261bfce0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- railway-ipc (0.1.1)
4
+ railway-ipc (0.1.2)
5
5
  bunny (~> 2.2.0)
6
6
  sneakers (~> 2.3.5)
7
7
 
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.
@@ -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}, user_uuid: #{message.user_uuid}"
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
@@ -1,3 +1,3 @@
1
1
  module RailwayIpc
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.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-02 00:00:00.000000000 Z
11
+ date: 2019-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake