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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 604f3f35960b7b09eeea77515e08d71b04acb91b0f2f52a6eb7fa2b47b55197b
4
- data.tar.gz: '0155183ce76772b8265dca491fa79bb839614d15a5d7acd7162497263f1d4aa6'
3
+ metadata.gz: '0589fdada6b17d8200e9f2c35b31a4303aa8f81110056a10bf0743914dd79aa7'
4
+ data.tar.gz: a67888ee7bbc93e8d05c0d864bb5e561b89e145b232b411d8b9399870e33b61a
5
5
  SHA512:
6
- metadata.gz: 7a9acea2bfbbc3a58dd5bb790b5c10be8b85b87c89dcfd09819fe5e19502192e98ae7bf33d53ed835f9eafc8832c5f73b2502189cb9fe9df4207a11ceca5a0e9
7
- data.tar.gz: d677af8ba032eecc616207640fc3682cc3b3dfe9def96e79973cdad1df05535201d7b95302660d687a6f45bd698591a35d699d4f0141e3115924bda6c16abf8b
6
+ metadata.gz: ac48f3cd8e58ced758e93f0d6e44f321b5bb4d7aca5e06541bad613b2a0d19c0f3b7be8b29fcc9253d454ac8435170b8fa6b45240a1d0e26a55857240dcd4824
7
+ data.tar.gz: 157a400f6121f22d3426d3661af6e98b8932ec7a547d36d9c688f8498b7def72ecf86fd98ff80f2afb3fcd4906646a954ce82834753bffe262de5e328b87c93b
data/.rubocop.yml CHANGED
@@ -70,6 +70,12 @@ Metrics/BlockLength:
70
70
  Exclude:
71
71
  - 'spec/**/*.rb'
72
72
 
73
+ Naming/FileName:
74
+ Exclude:
75
+ - 'README.md'
76
+ - 'CHANGELOG.md'
77
+ - 'lib/anycable-rails.rb'
78
+
73
79
  Rails/Date:
74
80
  Enabled: false
75
81
 
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) [![Circle CI](https://circleci.com/gh/anycable/anycable-rails/tree/master.svg?style=svg)](https://circleci.com/gh/anycable/anycable-rails/tree/master)
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 -addr='localhost:3334'
93
+ anycable-go --host=localhost --port=3334
94
94
  ```
95
95
 
96
96
  Don't forget to set cable url in your environment:
@@ -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", "~> 5"
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.57.0"
29
+ spec.add_development_dependency "rubocop", "~> 0.60.0"
30
30
  spec.add_development_dependency "pry-byebug"
31
31
  end
@@ -1,6 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'arel', github: 'rails/arel'
4
3
  gem 'rails', github: 'rails/rails'
5
4
  gem 'rspec-rails', '~> 3.5.0'
6
5
 
@@ -14,7 +14,10 @@ module ActionCable
14
14
  end
15
15
 
16
16
  def stream_from(broadcasting, callback = nil, coder: nil)
17
- raise ArgumentError('Unsupported') if callback.present? || coder.present? || block_given?
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Anycable
4
4
  module Rails
5
- VERSION = "0.5.4"
5
+ VERSION = "0.5.5"
6
6
  end
7
7
  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
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-06-13 00:00:00.000000000 Z
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.57.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.57.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.6
195
+ rubygems_version: 2.7.7
196
196
  signing_key:
197
197
  specification_version: 4
198
198
  summary: Rails adapter for AnyCable