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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1459676363d0523338a496163a296330e1bfbe363cc95b7e4433122163402a06
4
- data.tar.gz: d3c074189aa5858f2b7ffbc455c68b7bf96885e493cc8ed6bfce86c9a870a375
3
+ metadata.gz: 474cfd55dac8443341c7717845af042cd80889e3d865cdef3a6e41d089f02348
4
+ data.tar.gz: e744ee509ebc1ee82cb112150f346970fe52b55dfb134745b927f94c5670198e
5
5
  SHA512:
6
- metadata.gz: 51ab9db5efba8e737e6608d958e550933c7ddc20e9cee8a9a830bce94403d2895a158a643f27a026fd9cb1ff486ece078f823158f2ac2fabe6cabe33fc9948ea
7
- data.tar.gz: 61b4563345b1e26ee1da6a7b61325040dca72942165f3508d1615dd06912fc2ab6ffbd8732fe9b9ebf04076a15707f51ae028d6479d90d97bc9f9590ff7c4929
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
- [![GitPitch](https://gitpitch.com/assets/badge.svg)](https://gitpitch.com/anycable/anycable/master?grs=github)
2
1
  [![Gem Version](https://badge.fury.io/rb/anycable-rails.svg)](https://rubygems.org/gems/anycable-rails)
3
2
  [![Build](https://github.com/anycable/anycable-rails/workflows/Build/badge.svg)](https://github.com/anycable/anycable-rails/actions)
4
3
  [![Gitter](https://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg)](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).
@@ -27,7 +27,7 @@ module ActionCable
27
27
 
28
28
  class << self
29
29
  def call(socket, **options)
30
- new(socket, nil, options)
30
+ new(socket, nil, **options)
31
31
  end
32
32
  end
33
33
 
@@ -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__)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module AnyCable
4
4
  module Rails
5
- VERSION = "1.0.5"
5
+ VERSION = "1.0.7"
6
6
  end
7
7
  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: 1.0.5
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-02-24 00:00:00.000000000 Z
11
+ date: 2021-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: anycable