litecable 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/lite_cable/anycable.rb +2 -2
- data/lib/lite_cable/channel/base.rb +2 -2
- data/lib/lite_cable/channel/registry.rb +2 -0
- data/lib/lite_cable/channel/streams.rb +0 -2
- data/lib/lite_cable/coders/raw.rb +1 -1
- data/lib/lite_cable/connection/base.rb +0 -2
- data/lib/lite_cable/connection/subscriptions.rb +3 -0
- data/lib/lite_cable/logging.rb +1 -1
- data/lib/lite_cable/server/client_socket/base.rb +3 -0
- data/lib/lite_cable/version.rb +1 -1
- metadata +4 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94ece0fdf218bcdeefe8b375d73114c28bd869c5d232d1c38dd91f0e880c1e57
|
4
|
+
data.tar.gz: e53c002d7179a52793a1382dd88dbb782d43319801e0f5ff51d36dd32237c005
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1867f388377ea2f29c63cea936e255dcea9b7011ce83a45f93965ee98507c00e063360d62fb436a80a767c52b23f00ff853e92dbb93421ab9b0f007243cbc1d7
|
7
|
+
data.tar.gz: 9d344ce7aa7f3f0c07dc8c6be396cd51ae18758ffd5ad3e07ff156704fe87ee4ab0d54c67f0e619b30cb5344635f39860df0919b6a9587230ae87aa7d226d0c7
|
data/CHANGELOG.md
CHANGED
data/lib/lite_cable/anycable.rb
CHANGED
@@ -39,8 +39,8 @@ module LiteCable # :nodoc:
|
|
39
39
|
false
|
40
40
|
end
|
41
41
|
rescue LiteCable::Connection::Subscriptions::Error,
|
42
|
-
|
43
|
-
|
42
|
+
LiteCable::Channel::Error,
|
43
|
+
LiteCable::Channel::Registry::Error => e
|
44
44
|
log(:error, log_fmt("Connection command failed: #{e}"))
|
45
45
|
close
|
46
46
|
false
|
@@ -1,10 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module LiteCable
|
4
|
-
# rubocop:disable Metrics/LineLength
|
5
4
|
module Channel
|
6
5
|
class Error < StandardError; end
|
6
|
+
|
7
7
|
class RejectedError < Error; end
|
8
|
+
|
8
9
|
class UnproccessableActionError < Error; end
|
9
10
|
|
10
11
|
# The channel provides the basic structure of grouping behavior into logical units when communicating over the connection.
|
@@ -63,7 +64,6 @@ module LiteCable
|
|
63
64
|
# client-side, the <tt>Channel#rejected</tt> callback will get invoked when
|
64
65
|
# the server rejects the subscription request.
|
65
66
|
class Base
|
66
|
-
# rubocop:enable Metrics/LineLength
|
67
67
|
class << self
|
68
68
|
# A set of method names that should be considered actions.
|
69
69
|
# This includes all public instance methods on a channel except from Channel::Base methods.
|
@@ -1,7 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module LiteCable
|
4
|
-
# rubocop:disable Metrics/LineLength
|
5
4
|
module Channel
|
6
5
|
# Streams allow channels to route broadcastings to the subscriber. A broadcasting is a pubsub queue where any data
|
7
6
|
# placed into it is automatically sent to the clients that are connected at that time.
|
@@ -29,7 +28,6 @@ module LiteCable
|
|
29
28
|
#
|
30
29
|
# You can stop streaming from all broadcasts by calling #stop_all_streams or use #stop_from to stop streaming broadcasts from the specified stream.
|
31
30
|
module Streams
|
32
|
-
# rubocop:enable Metrics/LineLength
|
33
31
|
def handle_unsubscribe
|
34
32
|
stop_all_streams
|
35
33
|
super
|
@@ -1,7 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module LiteCable
|
4
|
-
# rubocop:disable Metrics/LineLength
|
5
4
|
module Connection
|
6
5
|
# A Connection object represents a client "connected" to the application.
|
7
6
|
# It contains all of the channel subscriptions. Incoming messages are then routed to these channel subscriptions
|
@@ -38,7 +37,6 @@ module LiteCable
|
|
38
37
|
# it easy to use cookies that were set when logging in via a web interface to authorize the connection.
|
39
38
|
#
|
40
39
|
class Base
|
41
|
-
# rubocop:enable Metrics/LineLength
|
42
40
|
include Authorization
|
43
41
|
prepend Identification
|
44
42
|
include Logging
|
@@ -5,8 +5,11 @@ module LiteCable
|
|
5
5
|
# Manage the connection channels and route messages
|
6
6
|
class Subscriptions
|
7
7
|
class Error < StandardError; end
|
8
|
+
|
8
9
|
class AlreadySubscribedError < Error; end
|
10
|
+
|
9
11
|
class UnknownCommandError < Error; end
|
12
|
+
|
10
13
|
class ChannelNotFoundError < Error; end
|
11
14
|
|
12
15
|
include Logging
|
data/lib/lite_cable/logging.rb
CHANGED
data/lib/lite_cable/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: litecable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- palkan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: anyway_config
|
@@ -124,46 +124,18 @@ dependencies:
|
|
124
124
|
version: '10.0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rspec
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "~>"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '3.0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - "~>"
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '3.0'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: simplecov
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|
142
128
|
requirements:
|
143
129
|
- - ">="
|
144
130
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - ">="
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: 0.3.8
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: pry-byebug
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - ">="
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
131
|
+
version: '3.0'
|
160
132
|
type: :development
|
161
133
|
prerelease: false
|
162
134
|
version_requirements: !ruby/object:Gem::Requirement
|
163
135
|
requirements:
|
164
136
|
- - ">="
|
165
137
|
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
138
|
+
version: '3.0'
|
167
139
|
description: Fat-free ActionCable implementation for using with AnyCable (and without
|
168
140
|
Rails)
|
169
141
|
email:
|