rabbit_messaging 0.6.0 → 0.7.0

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: '081fdf833501fd681239cacf04348b5736d2f445f8b4f995c9cb20f5a4decf2d'
4
- data.tar.gz: 566727c03028779e6334f4c89fc2cb2a569dfc7c8dfa92f3399841b610b23f6a
3
+ metadata.gz: 145df2de3c1fa19462e6e1b080e5531fe9dea8da6214420b1f4e6308f6cf993a
4
+ data.tar.gz: 4571f60a855de817e22808c8e1d0a0e2c2118061b939f976557bf13e457f865a
5
5
  SHA512:
6
- metadata.gz: 118a2d651ce38c6cb60b76464ff1db259865374b0ab8454d9208a7811ee55790796bb8be3cdad0cfbec92750e3a0a97ba36491c9b0e9e697faddbbc3cb7d53aa
7
- data.tar.gz: 5e56e561d5077c826d8b1ed5a13dcdf640f14093d5b05fe689fa4d55adc3d9830379e3cafcf289097a56ca78494b4cb33a63ad966456bd8730be1d749007f7dd
6
+ metadata.gz: a8133f0fbb6f4baa48486e1aecf30a116f58434391d604700494447a3ab868a04bd93407c9eca8ab11087ec7c6d27d9fea6d7511b491f035f9f568121803a360
7
+ data.tar.gz: e657470ada3856cc7861c0510577b0befc442bab9ace39740568b5dcb3ec0b7941eff5b8958294f28dea9bc73e17ff11f3023652ddf2d61785416a8ffafcd6b2
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
  Gemfile.lock
10
10
  .ruby-version
11
11
  /log/
12
+ *.gem
@@ -0,0 +1,6 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ ## [0.7.0] - 2020-06-09
5
+ ### Added
6
+ - Support for multiple customizable loggers;
@@ -24,6 +24,18 @@ module Rabbit
24
24
  attribute :receiving_job_class_callable
25
25
  attribute :exception_notifier, default: -> { default_exception_notifier }
26
26
 
27
+ attribute :receive_logger, default: lambda {
28
+ Logger.new(Rails.root.join("log", "incoming_rabbit_messages.log"))
29
+ }
30
+
31
+ attribute :publish_logger, default: lambda {
32
+ Logger.new(Rails.root.join("log", "rabbit.log"))
33
+ }
34
+
35
+ attribute :malformed_logger, default: lambda {
36
+ Logger.new(Rails.root.join("log", "malformed_messages.log"))
37
+ }
38
+
27
39
  def validate!
28
40
  raise InvalidConfig, "mising project_id" unless project_id
29
41
  raise InvalidConfig, "mising group_id" unless group_id
@@ -66,7 +66,7 @@ module Rabbit
66
66
  end
67
67
 
68
68
  def log(message)
69
- @logger ||= Logger.new(Rails.root.join("log", "rabbit.log"))
69
+ @logger ||= Rabbit.config.publish_logger
70
70
 
71
71
  headers = [
72
72
  message.real_exchange_name, message.routing_key, message.event,
@@ -5,7 +5,7 @@ module Rabbit::Receiving
5
5
  attr_accessor :message_model, :errors
6
6
 
7
7
  def self.logger
8
- @logger ||= Logger.new(Rails.root.join("log", "malformed_messages.log"))
8
+ @logger ||= Rabbit.config.malformed_logger
9
9
  end
10
10
 
11
11
  def self.raise!(message_model, errors, backtrace = caller(1))
@@ -14,7 +14,7 @@ module Rabbit::Receiving
14
14
  include Sneakers::Worker
15
15
 
16
16
  def self.logger
17
- @logger ||= Logger.new(Rails.root.join("log", "incoming_rabbit_messages.log"))
17
+ @logger ||= Rabbit.config.receive_logger
18
18
  end
19
19
 
20
20
  def work_with_params(message, delivery_info, arguments)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rabbit
4
- VERSION = "0.6.0"
4
+ VERSION = "0.7.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rabbit_messaging
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Umbrellio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-05 00:00:00.000000000 Z
11
+ date: 2020-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny
@@ -231,6 +231,7 @@ files:
231
231
  - ".rspec"
232
232
  - ".rubocop.yml"
233
233
  - ".travis.yml"
234
+ - CHANGELOG.md
234
235
  - Gemfile
235
236
  - LICENSE.md
236
237
  - README.md
@@ -273,7 +274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
273
274
  - !ruby/object:Gem::Version
274
275
  version: '0'
275
276
  requirements: []
276
- rubygems_version: 3.0.3
277
+ rubygems_version: 3.1.2
277
278
  signing_key:
278
279
  specification_version: 4
279
280
  summary: Rabbit (Rabbit Messaging)