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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/anycable/rails.rb +21 -0
- data/lib/anycable/rails/actioncable/connection.rb +1 -1
- data/lib/anycable/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e35b83495ae5c34d0643158ea818575a12c4f04
|
4
|
+
data.tar.gz: 04de7f30aeacb349d37b4490d33bda05ad0ca1cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dee23f9858e5e763485b63ba7f9c6ad7f87b42b1332de4a11285c5c104442b6130145e63038e677336ba6d01fc824e349a850fc1cf334a400748ea597ea7188
|
7
|
+
data.tar.gz: 7af9807402e3401855fa3c68a6c8613e8286dfc0e5d856916add020ea6b979ac2c5ce684ee5993b5e8704a5d5fc3b337adb0f22031602fb98a92229a0d0be547
|
data/CHANGELOG.md
CHANGED
@@ -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][])
|
data/lib/anycable/rails.rb
CHANGED
@@ -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
|
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
|
+
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-
|
11
|
+
date: 2017-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|