anycable-rails 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +6 -0
- data/README.md +2 -2
- data/anycable-rails.gemspec +2 -2
- data/gemfiles/railsmaster.gemfile +0 -1
- data/lib/anycable/rails/actioncable/channel.rb +4 -1
- data/lib/anycable/rails/actioncable/connection.rb +2 -0
- data/lib/anycable/rails/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0589fdada6b17d8200e9f2c35b31a4303aa8f81110056a10bf0743914dd79aa7'
|
4
|
+
data.tar.gz: a67888ee7bbc93e8d05c0d864bb5e561b89e145b232b411d8b9399870e33b61a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac48f3cd8e58ced758e93f0d6e44f321b5bb4d7aca5e06541bad613b2a0d19c0f3b7be8b29fcc9253d454ac8435170b8fa6b45240a1d0e26a55857240dcd4824
|
7
|
+
data.tar.gz: 157a400f6121f22d3426d3661af6e98b8932ec7a547d36d9c688f8498b7def72ecf86fd98ff80f2afb3fcd4906646a954ce82834753bffe262de5e328b87c93b
|
data/.rubocop.yml
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[![GitPitch](https://gitpitch.com/assets/badge.svg)](https://gitpitch.com/anycable/anycable/master?grs=github) [![Gem Version](https://badge.fury.io/rb/anycable-rails.svg)](https://rubygems.org/gems/anycable-rails) [![Build Status](https://travis-ci.org/anycable/anycable-rails.svg?branch=master)](https://travis-ci.org/anycable/anycable-rails)
|
1
|
+
[![GitPitch](https://gitpitch.com/assets/badge.svg)](https://gitpitch.com/anycable/anycable/master?grs=github) [![Gem Version](https://badge.fury.io/rb/anycable-rails.svg)](https://rubygems.org/gems/anycable-rails) [![Build Status](https://travis-ci.org/anycable/anycable-rails.svg?branch=master)](https://travis-ci.org/anycable/anycable-rails)
|
2
2
|
[![Gitter](https://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg)](https://gitter.im/anycable/Lobby)
|
3
3
|
|
4
4
|
# Anycable Rails
|
@@ -90,7 +90,7 @@ RAILS_ENV=production ./bin/anycable
|
|
90
90
|
and also run AnyCable-compatible WebSocket server, e.g. [anycable-go](https://github.com/anycable/anycable-go):
|
91
91
|
|
92
92
|
```sh
|
93
|
-
anycable-go
|
93
|
+
anycable-go --host=localhost --port=3334
|
94
94
|
```
|
95
95
|
|
96
96
|
Don't forget to set cable url in your environment:
|
data/anycable-rails.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "rails", "
|
21
|
+
spec.add_dependency "rails", ">= 5"
|
22
22
|
spec.add_dependency "anycable", "~> 0.5.0"
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1"
|
@@ -26,6 +26,6 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.add_development_dependency "rspec", ">= 3.4"
|
27
27
|
spec.add_development_dependency "ammeter", "~> 1.1"
|
28
28
|
spec.add_development_dependency "simplecov", ">= 0.3.8"
|
29
|
-
spec.add_development_dependency "rubocop", "~> 0.
|
29
|
+
spec.add_development_dependency "rubocop", "~> 0.60.0"
|
30
30
|
spec.add_development_dependency "pry-byebug"
|
31
31
|
end
|
@@ -14,7 +14,10 @@ module ActionCable
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def stream_from(broadcasting, callback = nil, coder: nil)
|
17
|
-
|
17
|
+
if callback.present? || coder.present? || block_given?
|
18
|
+
raise ArgumentError, 'Custom stream callbacks are not supported in AnyCable!'
|
19
|
+
end
|
20
|
+
|
18
21
|
connection.socket.subscribe identifier, broadcasting
|
19
22
|
end
|
20
23
|
|
@@ -91,6 +91,7 @@ module ActionCable
|
|
91
91
|
identifiers.each_with_object({}) do |id, acc|
|
92
92
|
obj = instance_variable_get("@#{id}")
|
93
93
|
next unless obj
|
94
|
+
|
94
95
|
acc[id] = obj.try(:to_gid_param) || obj
|
95
96
|
end
|
96
97
|
end
|
@@ -104,6 +105,7 @@ module ActionCable
|
|
104
105
|
@cached_ids[name] ||= @cached_ids.fetch(name) do
|
105
106
|
val = @ids[name.to_s]
|
106
107
|
next val unless val.is_a?(String)
|
108
|
+
|
107
109
|
GlobalID::Locator.locate(val) || val
|
108
110
|
end
|
109
111
|
end
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anycable-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- palkan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '5'
|
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
26
|
version: '5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
117
|
+
version: 0.60.0
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
124
|
+
version: 0.60.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: pry-byebug
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
192
|
version: '0'
|
193
193
|
requirements: []
|
194
194
|
rubyforge_project:
|
195
|
-
rubygems_version: 2.7.
|
195
|
+
rubygems_version: 2.7.7
|
196
196
|
signing_key:
|
197
197
|
specification_version: 4
|
198
198
|
summary: Rails adapter for AnyCable
|