anycable-rails 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +0 -5
- data/lib/anycable/rails/actioncable/connection.rb +1 -1
- data/lib/anycable/rails/compatibility.rb +6 -3
- data/lib/anycable/rails/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: 474cfd55dac8443341c7717845af042cd80889e3d865cdef3a6e41d089f02348
|
|
4
|
+
data.tar.gz: e744ee509ebc1ee82cb112150f346970fe52b55dfb134745b927f94c5670198e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4092bd45059bbb6062df44dc78b4ba2ff1bf8a2f3ef65448f7baf3886c35b91b4e0feb315e86e92cf746735f945b007d7550bd01c5bdd1a0dc6b32178d1a1c68
|
|
7
|
+
data.tar.gz: e63aa37233adf6f31eff249c2b9f1beeb1ea41d7f50152061cb8b3769cefc9be863c380df710dcf6715c4b2070fda26a569f3a2b7d8bca63cecc5fc8c3b0c97f
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## master
|
|
4
4
|
|
|
5
|
+
## 1.0.7 (2021-03-05)
|
|
6
|
+
|
|
7
|
+
- Ruby 3 compatibility. ([@palkan][])
|
|
8
|
+
|
|
9
|
+
## 1.0.6 (2021-02-25)
|
|
10
|
+
|
|
11
|
+
- Keep an explicit list of instance vars to ignore in compatibility checks. ([@palkan][])
|
|
12
|
+
|
|
13
|
+
You can ignore custom vars by adding them to the list: `AnyCable::Compatibility::IGNORE_INSTANCE_VARS << :@my_var`.
|
|
14
|
+
|
|
5
15
|
## 1.0.5 (2021-02-24)
|
|
6
16
|
|
|
7
17
|
- Fixed bug with compatibility false negatives in development. ([@palkan][])
|
data/README.md
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
[](https://gitpitch.com/anycable/anycable/master?grs=github)
|
|
2
1
|
[](https://rubygems.org/gems/anycable-rails)
|
|
3
2
|
[](https://github.com/anycable/anycable-rails/actions)
|
|
4
3
|
[](https://gitter.im/anycable/Lobby)
|
|
@@ -99,10 +98,6 @@ See [documentation](https://docs.anycable.io/#/rails/compatibility).
|
|
|
99
98
|
|
|
100
99
|
Bug reports and pull requests are welcome on GitHub at [https://github.com/anycable/anycable-rails](https://github.com/anycable/anycable-rails).
|
|
101
100
|
|
|
102
|
-
## Development
|
|
103
|
-
|
|
104
|
-
If you are familiar with Docker, you can use [DIP](https://github.com/bibendi/dip) to start developing the gem quickly.
|
|
105
|
-
|
|
106
101
|
## License
|
|
107
102
|
|
|
108
103
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
|
@@ -4,6 +4,11 @@ module AnyCable
|
|
|
4
4
|
class CompatibilityError < StandardError; end
|
|
5
5
|
|
|
6
6
|
module Compatibility # :nodoc:
|
|
7
|
+
IGNORE_INSTANCE_VARS = %i[
|
|
8
|
+
@active_periodic_timers
|
|
9
|
+
@_streams
|
|
10
|
+
]
|
|
11
|
+
|
|
7
12
|
ActionCable::Channel::Base.prepend(Module.new do
|
|
8
13
|
def stream_from(broadcasting, callback = nil, coder: nil)
|
|
9
14
|
if coder.present? && coder != ActiveSupport::JSON
|
|
@@ -23,8 +28,6 @@ module AnyCable
|
|
|
23
28
|
%w[run_callbacks perform_action].each do |mid|
|
|
24
29
|
module_eval <<~CODE, __FILE__, __LINE__ + 1
|
|
25
30
|
def #{mid}(*)
|
|
26
|
-
# allocate @_streams
|
|
27
|
-
streams
|
|
28
31
|
__anycable_check_ivars__ { super }
|
|
29
32
|
end
|
|
30
33
|
CODE
|
|
@@ -33,7 +36,7 @@ module AnyCable
|
|
|
33
36
|
def __anycable_check_ivars__
|
|
34
37
|
was_ivars = instance_variables
|
|
35
38
|
res = yield
|
|
36
|
-
diff = instance_variables - was_ivars
|
|
39
|
+
diff = instance_variables - was_ivars - IGNORE_INSTANCE_VARS
|
|
37
40
|
|
|
38
41
|
if self.class.respond_to?(:channel_state_attributes)
|
|
39
42
|
diff.delete(:@__istate__)
|
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: 1.0.
|
|
4
|
+
version: 1.0.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- palkan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-03-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: anycable
|