action_cable_subscription_adapter 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b38df6d29fc33495126ec7614d44ad2b8eca70a0
4
- data.tar.gz: dc2950a586cbf0fba78d81a5e1d93656295ca39c
3
+ metadata.gz: a21082ad56c100816a94a8372b270b5e93f466fd
4
+ data.tar.gz: 558e5cf2ca40cfa1e97dd56bcf646fb8b1b3b343
5
5
  SHA512:
6
- metadata.gz: 8e4e5588be6327eb1fe1718f7c73ce3e0471e1c013b79fa06b046d898d22086e4c957c6fe61a448f73e842915d6e7e5d5414b0ede3b321bd3a1c23bb8ddda0ce
7
- data.tar.gz: a7931494a08942917aeef316f4890d03cb239eb812634da2facff6bbc23c8c549fe6dd5911fae8c81305bdd454d194317dfc555bd8548415e77d95c4da2f0d87
6
+ metadata.gz: 74d135a770b5457c3be1595238726a5cf132194b72dec5faf5bfb94308e0fbb9850fa406379aeff621a65387688115ff54135bc9ec72711be273552e8262d2d5
7
+ data.tar.gz: 568ddbd9285f811ce04be202b2ad1dfc98a37dbebb3db825b6c6fa0062ca25bdf757d9bed7f6bfd09b2c5b2a8ed47de082c217c0dcf381175a206b220d01a9f7
@@ -4,7 +4,9 @@ require "action_cable/subscription_adapter/redis"
4
4
  module ActionCable::SubscriptionAdapter
5
5
  class CustomAdapter < Redis
6
6
  def redis_connector
7
- ActionCableSubscriptionAdapter.redis_connector.call self
7
+ r=ActionCableSubscriptionAdapter.redis_connector.call self
8
+ Rails.logger.info "ActionCableSubscriptionAdapter: #{r}"
9
+ r
8
10
  end
9
11
  end
10
12
  end
@@ -9,19 +9,21 @@ module ActionCableSubscriptionAdapter
9
9
  # c.redis_connector = MyRedisClient.new
10
10
  # end
11
11
  #
12
- # You can also pass a block that will run when the ActionCable workers are initialized:
12
+ # You can also assign a factory block that will run when the ActionCable workers are initialized.
13
+ # The block should return your Redis client instance.
14
+ # Example:
13
15
  #
14
16
  # ActionCableSubscriptionAdapter.config do |c|
15
17
  # c.redis_connector = ->(subscription_adapter) { MyRedisClient.new }
16
18
  # end
17
19
  #
18
- # The custom Redis client needs to conform to the Redis gem's API.
20
+ # The custom Redis client needs to conform to the redis-rb gem's API.
19
21
  #
20
22
  mattr_accessor :redis_connector
21
23
 
22
24
  def self.config(&block)
23
25
  block.call self
24
- @redis_connector = ->(s) { @redis_connector } unless @redis_connector.respond_to? :call
26
+ @redis_connector = ->(s) { redis_connector } unless redis_connector.respond_to? :call
25
27
  self
26
28
  end
27
29
  end
@@ -1,3 +1,3 @@
1
1
  module ActionCableSubscriptionAdapter
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_cable_subscription_adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diego Salazar
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-23 00:00:00.000000000 Z
11
+ date: 2016-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler