action-cable-testing 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: ccc828bc776db7a157df36234b2ff0d6c7071464
4
- data.tar.gz: ff68ff540546c5a70fcafa6a63287f28829544a1
3
+ metadata.gz: ee444fe922657c8eb469653a92b1e6283d11e5c6
4
+ data.tar.gz: 0bb6858c4b1d695ec8d7be341a25eb79c14b71e9
5
5
  SHA512:
6
- metadata.gz: 00db28832cc067f02a0f98a3651e5d3a20a28aa394802bdd1d5bee2645f573cc9e7d0aa79b8466ad708b3480b3462949f380e2dc5dafdfb1c22a82524956a969
7
- data.tar.gz: 39e3ad0bbe0f6a54b3c06177c78924cbc023f5fba35ef39bf933e835a1880b7b13e17dfb000e14e7886c6aaa64f715d5ef27c4471a6b25ef1c1b1d8f21716a29
6
+ metadata.gz: c1b6af262b55dc1104808a7d81e1d18ce3d3823824c48559f0ec1294099d8d20c92651b2f6ed5a0391638d04529a143b774d910630433304fcafb35584f8f4cd
7
+ data.tar.gz: 0a18ff1b692011d9f5880b9934f1c228f2c9aabd4fc6d58d3cd2137eb4de215d953212f3afe1492d10ba785ebf8989ae8a56c8270d5209ef882937829d9514be
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change log
2
2
 
3
+ ## 0.1.1
4
+
5
+ - Support Rails 5.0.0.1. ([@palkan][])
6
+
3
7
  ## 0.1.0
4
8
 
5
9
  - Initial version. ([@palkan][])
@@ -191,9 +191,13 @@ module ActionCable
191
191
 
192
192
  # Subsribe to the channel under test. Optionally pass subscription parameters as a Hash.
193
193
  def subscribe(params = {})
194
- @subscription = self.class.channel_class.new(connection, CHANNEL_IDENTIFIER, params.with_indifferent_access)
194
+ # NOTE: Rails < 5.0.1 calls subscribe_to_channel during #initialize.
195
+ # We have to stub before it
196
+ @subscription = self.class.channel_class.allocate
195
197
  @subscription.singleton_class.include(ChannelStub)
196
- @subscription.subscribe_to_channel
198
+ @subscription.send(:initialize, connection, CHANNEL_IDENTIFIER, params.with_indifferent_access)
199
+ # Call subscribe_to_channel if it's public (Rails 5.0.1+)
200
+ @subscription.subscribe_to_channel if ActionCable.gem_version >= Gem::Version.new("5.0.1")
197
201
  @subscription
198
202
  end
199
203
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActionCable
4
4
  module Testing
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action-cable-testing
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
  - Vladimir Dementyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-24 00:00:00.000000000 Z
11
+ date: 2017-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actioncable