actioncable 8.0.2.1 → 8.0.4
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 +13 -2
 - data/README.md +1 -1
 - data/lib/action_cable/channel/base.rb +6 -0
 - data/lib/action_cable/channel/streams.rb +2 -0
 - data/lib/action_cable/gem_version.rb +2 -2
 - data/lib/action_cable/subscription_adapter/redis.rb +8 -3
 - data/lib/rails/generators/channel/channel_generator.rb +1 -1
 - metadata +8 -8
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 3ab9f47f75bfdb6a272cd8d6766bf9266288229c2ea8eb504f2163c53fd765d3
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 7bf22406e08982f621c51fc8efaf5e931eb46f6b93b533da625506d26ae9b115
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 82f9e87c8d280ceee4ed0895c02fb39facd4de3c0c115cc1277f59bb5d8c69c2b1cab754752ea7b6dd63c1de3ccb44040cb225a2f3c6c896d70b87a4bf542f10
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 27697798c982bda188e4f65b58cc325599cdc975e3defae01299d238ab1ef6e1b67e608c97800b0b2fcba1ce601974a9249e83e540bea0c3b65e225fbcfe2de8
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,9 +1,20 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            ## Rails 8.0. 
     | 
| 
      
 1 
     | 
    
         
            +
            ## Rails 8.0.4 (October 28, 2025) ##
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            *   No changes.
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         | 
| 
       6 
     | 
    
         
            -
            ## Rails 8.0. 
     | 
| 
      
 6 
     | 
    
         
            +
            ## Rails 8.0.3 (September 22, 2025) ##
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            *   Fixed compatibility with `redis` gem `5.4.1`
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                *Jean Boussier*
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            *   Fixed a possible race condition in `stream_from`.
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                *OuYangJinTing*
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            ## Rails 8.0.2.1 (August 13, 2025) ##
         
     | 
| 
       7 
18 
     | 
    
         | 
| 
       8 
19 
     | 
    
         
             
            *   No changes.
         
     | 
| 
       9 
20 
     | 
    
         | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -19,6 +19,6 @@ Bug reports for the Ruby on \Rails project can be filed here: 
     | 
|
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
            * https://github.com/rails/rails/issues
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
       22 
     | 
    
         
            -
            Feature requests should be discussed on the  
     | 
| 
      
 22 
     | 
    
         
            +
            Feature requests should be discussed on the rubyonrails-core forum here:
         
     | 
| 
       23 
23 
     | 
    
         | 
| 
       24 
24 
     | 
    
         
             
            * https://discuss.rubyonrails.org/c/rubyonrails-core
         
     | 
| 
         @@ -165,6 +165,7 @@ module ActionCable 
     | 
|
| 
       165 
165 
     | 
    
         | 
| 
       166 
166 
     | 
    
         
             
                    @reject_subscription = nil
         
     | 
| 
       167 
167 
     | 
    
         
             
                    @subscription_confirmation_sent = nil
         
     | 
| 
      
 168 
     | 
    
         
            +
                    @unsubscribed = false
         
     | 
| 
       168 
169 
     | 
    
         | 
| 
       169 
170 
     | 
    
         
             
                    delegate_connection_identifiers
         
     | 
| 
       170 
171 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -200,11 +201,16 @@ module ActionCable 
     | 
|
| 
       200 
201 
     | 
    
         
             
                  # cleanup with callbacks. This method is not intended to be called directly by
         
     | 
| 
       201 
202 
     | 
    
         
             
                  # the user. Instead, override the #unsubscribed callback.
         
     | 
| 
       202 
203 
     | 
    
         
             
                  def unsubscribe_from_channel # :nodoc:
         
     | 
| 
      
 204 
     | 
    
         
            +
                    @unsubscribed = true
         
     | 
| 
       203 
205 
     | 
    
         
             
                    run_callbacks :unsubscribe do
         
     | 
| 
       204 
206 
     | 
    
         
             
                      unsubscribed
         
     | 
| 
       205 
207 
     | 
    
         
             
                    end
         
     | 
| 
       206 
208 
     | 
    
         
             
                  end
         
     | 
| 
       207 
209 
     | 
    
         | 
| 
      
 210 
     | 
    
         
            +
                  def unsubscribed? # :nodoc:
         
     | 
| 
      
 211 
     | 
    
         
            +
                    @unsubscribed
         
     | 
| 
      
 212 
     | 
    
         
            +
                  end
         
     | 
| 
      
 213 
     | 
    
         
            +
             
     | 
| 
       208 
214 
     | 
    
         
             
                  private
         
     | 
| 
       209 
215 
     | 
    
         
             
                    # Called once a consumer has become a subscriber of the channel. Usually the
         
     | 
| 
       210 
216 
     | 
    
         
             
                    # place to set up any streams you want this channel to be sending to the
         
     | 
| 
         @@ -88,6 +88,8 @@ module ActionCable 
     | 
|
| 
       88 
88 
     | 
    
         
             
                  # callback. Defaults to `coder: nil` which does no decoding, passes raw
         
     | 
| 
       89 
89 
     | 
    
         
             
                  # messages.
         
     | 
| 
       90 
90 
     | 
    
         
             
                  def stream_from(broadcasting, callback = nil, coder: nil, &block)
         
     | 
| 
      
 91 
     | 
    
         
            +
                    return if unsubscribed?
         
     | 
| 
      
 92 
     | 
    
         
            +
             
     | 
| 
       91 
93 
     | 
    
         
             
                    broadcasting = String(broadcasting)
         
     | 
| 
       92 
94 
     | 
    
         | 
| 
       93 
95 
     | 
    
         
             
                    # Don't send the confirmation until pubsub#subscribe is successful
         
     | 
| 
         @@ -164,7 +164,7 @@ module ActionCable 
     | 
|
| 
       164 
164 
     | 
    
         
             
                            begin
         
     | 
| 
       165 
165 
     | 
    
         
             
                              conn = @adapter.redis_connection_for_subscriptions
         
     | 
| 
       166 
166 
     | 
    
         
             
                              listen conn
         
     | 
| 
       167 
     | 
    
         
            -
                            rescue  
     | 
| 
      
 167 
     | 
    
         
            +
                            rescue *CONNECTION_ERRORS
         
     | 
| 
       168 
168 
     | 
    
         
             
                              reset
         
     | 
| 
       169 
169 
     | 
    
         
             
                              if retry_connecting?
         
     | 
| 
       170 
170 
     | 
    
         
             
                                when_connected { resubscribe }
         
     | 
| 
         @@ -210,7 +210,7 @@ module ActionCable 
     | 
|
| 
       210 
210 
     | 
    
         
             
                        end
         
     | 
| 
       211 
211 
     | 
    
         | 
| 
       212 
212 
     | 
    
         
             
                        if ::Redis::VERSION < "5"
         
     | 
| 
       213 
     | 
    
         
            -
                           
     | 
| 
      
 213 
     | 
    
         
            +
                          CONNECTION_ERRORS = [::Redis::BaseConnectionError].freeze
         
     | 
| 
       214 
214 
     | 
    
         | 
| 
       215 
215 
     | 
    
         
             
                          class SubscribedClient
         
     | 
| 
       216 
216 
     | 
    
         
             
                            def initialize(raw_client)
         
     | 
| 
         @@ -244,7 +244,12 @@ module ActionCable 
     | 
|
| 
       244 
244 
     | 
    
         
             
                            SubscribedClient.new(conn._client)
         
     | 
| 
       245 
245 
     | 
    
         
             
                          end
         
     | 
| 
       246 
246 
     | 
    
         
             
                        else
         
     | 
| 
       247 
     | 
    
         
            -
                           
     | 
| 
      
 247 
     | 
    
         
            +
                          CONNECTION_ERRORS = [
         
     | 
| 
      
 248 
     | 
    
         
            +
                            ::Redis::BaseConnectionError,
         
     | 
| 
      
 249 
     | 
    
         
            +
             
     | 
| 
      
 250 
     | 
    
         
            +
                            # Some older versions of redis-rb sometime leak underlying exceptions
         
     | 
| 
      
 251 
     | 
    
         
            +
                            RedisClient::ConnectionError,
         
     | 
| 
      
 252 
     | 
    
         
            +
                          ].freeze
         
     | 
| 
       248 
253 
     | 
    
         | 
| 
       249 
254 
     | 
    
         
             
                          def extract_subscribed_client(conn)
         
     | 
| 
       250 
255 
     | 
    
         
             
                            conn
         
     | 
| 
         @@ -105,7 +105,7 @@ pin_all_from "app/javascript/channels", under: "channels" 
     | 
|
| 
       105 
105 
     | 
    
         
             
                    end
         
     | 
| 
       106 
106 
     | 
    
         | 
| 
       107 
107 
     | 
    
         
             
                    def using_bun?
         
     | 
| 
       108 
     | 
    
         
            -
                      # Cannot assume  
     | 
| 
      
 108 
     | 
    
         
            +
                      # Cannot assume Bun lockfile has been generated yet so we look for a file known to
         
     | 
| 
       109 
109 
     | 
    
         
             
                      # be generated by the jsbundling-rails gem
         
     | 
| 
       110 
110 
     | 
    
         
             
                      @using_bun ||= using_js_runtime? && root.join("bun.config.js").exist?
         
     | 
| 
       111 
111 
     | 
    
         
             
                    end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: actioncable
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 8.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 8.0.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Pratik Naik
         
     | 
| 
         @@ -16,28 +16,28 @@ dependencies: 
     | 
|
| 
       16 
16 
     | 
    
         
             
                requirements:
         
     | 
| 
       17 
17 
     | 
    
         
             
                - - '='
         
     | 
| 
       18 
18 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       19 
     | 
    
         
            -
                    version: 8.0. 
     | 
| 
      
 19 
     | 
    
         
            +
                    version: 8.0.4
         
     | 
| 
       20 
20 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       21 
21 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       22 
22 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       23 
23 
     | 
    
         
             
                requirements:
         
     | 
| 
       24 
24 
     | 
    
         
             
                - - '='
         
     | 
| 
       25 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       26 
     | 
    
         
            -
                    version: 8.0. 
     | 
| 
      
 26 
     | 
    
         
            +
                    version: 8.0.4
         
     | 
| 
       27 
27 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       28 
28 
     | 
    
         
             
              name: actionpack
         
     | 
| 
       29 
29 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       30 
30 
     | 
    
         
             
                requirements:
         
     | 
| 
       31 
31 
     | 
    
         
             
                - - '='
         
     | 
| 
       32 
32 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       33 
     | 
    
         
            -
                    version: 8.0. 
     | 
| 
      
 33 
     | 
    
         
            +
                    version: 8.0.4
         
     | 
| 
       34 
34 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       35 
35 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       36 
36 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       37 
37 
     | 
    
         
             
                requirements:
         
     | 
| 
       38 
38 
     | 
    
         
             
                - - '='
         
     | 
| 
       39 
39 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       40 
     | 
    
         
            -
                    version: 8.0. 
     | 
| 
      
 40 
     | 
    
         
            +
                    version: 8.0.4
         
     | 
| 
       41 
41 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       42 
42 
     | 
    
         
             
              name: nio4r
         
     | 
| 
       43 
43 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -153,10 +153,10 @@ licenses: 
     | 
|
| 
       153 
153 
     | 
    
         
             
            - MIT
         
     | 
| 
       154 
154 
     | 
    
         
             
            metadata:
         
     | 
| 
       155 
155 
     | 
    
         
             
              bug_tracker_uri: https://github.com/rails/rails/issues
         
     | 
| 
       156 
     | 
    
         
            -
              changelog_uri: https://github.com/rails/rails/blob/v8.0. 
     | 
| 
       157 
     | 
    
         
            -
              documentation_uri: https://api.rubyonrails.org/v8.0. 
     | 
| 
      
 156 
     | 
    
         
            +
              changelog_uri: https://github.com/rails/rails/blob/v8.0.4/actioncable/CHANGELOG.md
         
     | 
| 
      
 157 
     | 
    
         
            +
              documentation_uri: https://api.rubyonrails.org/v8.0.4/
         
     | 
| 
       158 
158 
     | 
    
         
             
              mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
         
     | 
| 
       159 
     | 
    
         
            -
              source_code_uri: https://github.com/rails/rails/tree/v8.0. 
     | 
| 
      
 159 
     | 
    
         
            +
              source_code_uri: https://github.com/rails/rails/tree/v8.0.4/actioncable
         
     | 
| 
       160 
160 
     | 
    
         
             
              rubygems_mfa_required: 'true'
         
     | 
| 
       161 
161 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       162 
162 
     | 
    
         
             
            require_paths:
         
     |