anycable-rails 1.0.4 → 1.0.5

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: 813e2661c14776457e521e9440a66d7e1766ffd88a5fb4478235b86f02a7742b
4
- data.tar.gz: 35a363d1928db0b38a87c23fd4e1f2f386987439a267a4b4e3b71a90b49e27b3
3
+ metadata.gz: 1459676363d0523338a496163a296330e1bfbe363cc95b7e4433122163402a06
4
+ data.tar.gz: d3c074189aa5858f2b7ffbc455c68b7bf96885e493cc8ed6bfce86c9a870a375
5
5
  SHA512:
6
- metadata.gz: 00ffb026147175cdd0d93ef6360c7bc6f3936692ebc89c3b398fff0837c61af9f7ba5a66afcb0c99bf5495a06bcd8fd5a12b2d706d73b6cef49b1aef647e731f
7
- data.tar.gz: ae79468c138e4e7f781787729b393671bac53eb0cfe090f4cb27afb5a1b38525f7b0c5e9fa9ff9f18db59cf3caf21b08145b441fe3e9f90ed2152e04d27b2d7a
6
+ metadata.gz: 51ab9db5efba8e737e6608d958e550933c7ddc20e9cee8a9a830bce94403d2895a158a643f27a026fd9cb1ff486ece078f823158f2ac2fabe6cabe33fc9948ea
7
+ data.tar.gz: 61b4563345b1e26ee1da6a7b61325040dca72942165f3508d1615dd06912fc2ab6ffbd8732fe9b9ebf04076a15707f51ae028d6479d90d97bc9f9590ff7c4929
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 1.0.5 (2021-02-24)
6
+
7
+ - Fixed bug with compatibility false negatives in development. ([@palkan][])
8
+
9
+ See [#151](https://github.com/anycable/anycable-rails/issues/151).
10
+
5
11
  ## 1.0.4 (2020-10-02)
6
12
 
7
13
  - Relax Rails dependencies. ([@palkan][])
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2017-2020 palkan
1
+ Copyright 2017-2021 palkan
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -5,7 +5,7 @@ require "action_cable/channel"
5
5
  module ActionCable
6
6
  module Channel
7
7
  class Base # :nodoc:
8
- alias handle_subscribe subscribe_to_channel
8
+ alias_method :handle_subscribe, :subscribe_to_channel
9
9
 
10
10
  public :handle_subscribe, :subscription_rejected?
11
11
 
@@ -21,7 +21,7 @@ module ActionCable
21
21
 
22
22
  attr_reader :socket
23
23
 
24
- alias anycable_socket socket
24
+ alias_method :anycable_socket, :socket
25
25
 
26
26
  delegate :env, :session, to: :request
27
27
 
@@ -12,8 +12,6 @@ end
12
12
 
13
13
  ActionCable::Channel::ChannelStub.prepend(Module.new do
14
14
  def subscribe_to_channel
15
- # allocate @streams
16
- streams
17
15
  handle_subscribe
18
16
  end
19
17
  end)
@@ -23,6 +23,8 @@ module AnyCable
23
23
  %w[run_callbacks perform_action].each do |mid|
24
24
  module_eval <<~CODE, __FILE__, __LINE__ + 1
25
25
  def #{mid}(*)
26
+ # allocate @_streams
27
+ streams
26
28
  __anycable_check_ivars__ { super }
27
29
  end
28
30
  CODE
@@ -18,8 +18,8 @@ module AnyCable
18
18
  AnyCable.logger = ActiveSupport::TaggedLogging.new(::ActionCable.server.config.logger)
19
19
  # Broadcast server logs to STDOUT in development
20
20
  if ::Rails.env.development? &&
21
- !ActiveSupport::Logger.logger_outputs_to?(::Rails.logger, STDOUT)
22
- console = ActiveSupport::Logger.new(STDOUT)
21
+ !ActiveSupport::Logger.logger_outputs_to?(::Rails.logger, $stdout)
22
+ console = ActiveSupport::Logger.new($stdout)
23
23
  console.formatter = ::Rails.logger.formatter
24
24
  console.level = ::Rails.logger.level
25
25
  AnyCable.logger.extend(ActiveSupport::Logger.broadcast(console))
@@ -21,8 +21,8 @@ module AnyCable
21
21
  CODE
22
22
  end
23
23
 
24
- alias include? has_key?
25
- alias key? has_key?
24
+ alias_method :include?, :has_key?
25
+ alias_method :key?, :has_key?
26
26
 
27
27
  %i[update merge! to_hash].each do |mid|
28
28
  class_eval <<~CODE, __FILE__, __LINE__ + 1
@@ -33,7 +33,7 @@ module AnyCable
33
33
  CODE
34
34
  end
35
35
 
36
- alias to_h to_hash
36
+ alias_method :to_h, :to_hash
37
37
 
38
38
  def keys
39
39
  rack_session.keys + socket_session.keys
@@ -2,6 +2,6 @@
2
2
 
3
3
  module AnyCable
4
4
  module Rails
5
- VERSION = "1.0.4"
5
+ VERSION = "1.0.5"
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.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - palkan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-02 00:00:00.000000000 Z
11
+ date: 2021-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: anycable