anycable-rails 0.4.4 → 0.4.5

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
  SHA1:
3
- metadata.gz: 0a89d94c7260dea8c03adc53bff3ddaf249f8404
4
- data.tar.gz: b24d94d0dcb9d560d43d08fa3c62165918f83d04
3
+ metadata.gz: 5e35b83495ae5c34d0643158ea818575a12c4f04
4
+ data.tar.gz: 04de7f30aeacb349d37b4490d33bda05ad0ca1cd
5
5
  SHA512:
6
- metadata.gz: af6283c8f2ad3cff91d286ac9445ebfb3236a3e5926fc2794ec19cb65c9132c36131a46f648cce7c2fb0a009d800e703698d3b81502d95793fee70e926125b6d
7
- data.tar.gz: 95ba22c633aa3337c93d0dd53eb8badf7bfc028a0093b812b114df88d516f9121162dfe3763977b12561c0e9b738a54e0d45c59e285c534a45d7ee4baf4ea866
6
+ metadata.gz: 7dee23f9858e5e763485b63ba7f9c6ad7f87b42b1332de4a11285c5c104442b6130145e63038e677336ba6d01fc824e349a850fc1cf334a400748ea597ea7188
7
+ data.tar.gz: 7af9807402e3401855fa3c68a6c8613e8286dfc0e5d856916add020ea6b979ac2c5ce684ee5993b5e8704a5d5fc3b337adb0f22031602fb98a92229a0d0be547
@@ -1,5 +1,11 @@
1
1
  # Change log
2
2
 
3
+ ## 0.4.5
4
+
5
+ - Handle tagged logger. ([@palkan][])
6
+
7
+ Ignore tagged logger features ('cause we do not have _persistent_ logger).
8
+
3
9
  ## 0.4.4
4
10
 
5
11
  - Fix bug with ActiveRecord connections (https://github.com/anycable/anycable/issues/9). ([@palkan][])
@@ -7,8 +7,29 @@ require "anycable/rails/version"
7
7
  module Anycable
8
8
  # Rails handler for AnyCable
9
9
  module Rails
10
+ # Use this proxy to quack like a TaggedLoggerProxy
11
+ class LoggerProxy
12
+ def initialize(logger)
13
+ @logger = logger
14
+ end
15
+
16
+ def add_tags(*_tags)
17
+ @logger.warn "Tagged logger is not supported by AnyCable. Skip"
18
+ end
19
+
20
+ %i( debug info warn error fatal unknown ).each do |severity|
21
+ define_method(severity) do |message|
22
+ @logger.send severity, message
23
+ end
24
+ end
25
+ end
26
+
10
27
  require "anycable/rails/engine"
11
28
  require "anycable/rails/actioncable/server"
12
29
  require "anycable/rails/actioncable/connection"
30
+
31
+ def self.logger
32
+ @logger ||= LoggerProxy.new(::Rails.logger)
33
+ end
13
34
  end
14
35
  end
@@ -103,7 +103,7 @@ module ActionCable
103
103
  end
104
104
 
105
105
  def logger
106
- ::Rails.logger
106
+ Anycable::Rails.logger
107
107
  end
108
108
  end
109
109
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Anycable
3
3
  module Rails
4
- VERSION = "0.4.4"
4
+ VERSION = "0.4.5"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anycable-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - palkan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-06 00:00:00.000000000 Z
11
+ date: 2017-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails