pakyow-realtime 1.0.0.rc2 → 1.0.0.rc3

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: ef442df2b81651c98852a3100fcb172f9d087ab1079096b633e11a4c6e0169fd
4
- data.tar.gz: b207b296db32b88f03582879cee2088e260593822eec611b9a856d71d043caa7
3
+ metadata.gz: deaf1ebc4f5c130f298135f2bdee748c2caa77c13ea323ffcb9ad16c2d1d152c
4
+ data.tar.gz: 0b5f04f9f51dc00c12c56dc203f1d0acb443405046936785e9d6322145eb5795
5
5
  SHA512:
6
- metadata.gz: 9b0abcc91e6d9a23c2a668236d682c8b59d0cbe0302d50f267f915c7c23fcb7254cc751c93ce00005333e62acd27c815b170686d3ea84f4db8b5d05cc1ca774d
7
- data.tar.gz: 3365bd64799fbc89e56d2e3bb0ba783d4b4c4513ebc75c6f87b7ff7ecae5a8fa16aa78e6e658201780129f0754fcc5272428132c0b91bc2cca6bb07ee7536baf
6
+ metadata.gz: 6e9f89d4158082e3820765a295412e1ccb97d2ecab1aaae81e56cb9d042665b8d33b5a82dd491c6b087ad8f9733908a4d09d9f8e269af37d31662788e189bc8b
7
+ data.tar.gz: 3986ce47e2cb77b9be538ad3c3da7a7d70640227c6572aafe0bb0aa8d425d40c260151cf08922958a9e0c5de98ac6a7e15ae3f81b61963eae05c5f61389b61f7
@@ -5,12 +5,12 @@ require "pakyow/support/message_verifier"
5
5
  require "pakyow/realtime/websocket"
6
6
 
7
7
  module Pakyow
8
- module Realtime
9
- module Actions
8
+ module Actions
9
+ module Realtime
10
10
  class Upgrader
11
11
  def call(connection)
12
12
  if websocket?(connection)
13
- WebSocket.new(connection.verifier.verify(connection.params[:id]), connection)
13
+ Pakyow::Realtime::WebSocket.new(connection.verifier.verify(connection.params[:id]), connection)
14
14
  connection.halt
15
15
  end
16
16
  rescue Support::MessageVerifier::TamperedMessage
@@ -8,6 +8,8 @@ require "pakyow/realtime/framework"
8
8
 
9
9
  require "pakyow/environment/realtime/config"
10
10
 
11
+ require "pakyow/actions/realtime/upgrader"
12
+
11
13
  module Pakyow
12
14
  include Environment::Realtime::Config
13
15
  end
@@ -33,7 +33,8 @@ module Pakyow
33
33
  name: "#{config.name}-realtime",
34
34
  path: File.join(
35
35
  Pakyow.config.root, "tmp", "state"
36
- )
36
+ ),
37
+ logger: Pakyow.logger
37
38
  )
38
39
  end
39
40
  end
@@ -11,8 +11,6 @@ require "pakyow/realtime/behavior/serialization"
11
11
  require "pakyow/realtime/behavior/server"
12
12
  require "pakyow/realtime/behavior/silencing"
13
13
 
14
- require "pakyow/realtime/actions/upgrader"
15
-
16
14
  require "pakyow/realtime/behavior/rendering/install_websocket"
17
15
 
18
16
  module Pakyow
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pakyow-realtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc2
4
+ version: 1.0.0.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Powell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-04 00:00:00.000000000 Z
11
+ date: 2019-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pakyow-core
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.0.rc2
19
+ version: 1.0.0.rc3
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
- version: 1.0.0.rc2
26
+ version: 1.0.0.rc3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pakyow-presenter
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 1.0.0.rc2
33
+ version: 1.0.0.rc3
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 1.0.0.rc2
40
+ version: 1.0.0.rc3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: pakyow-routing
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 1.0.0.rc2
47
+ version: 1.0.0.rc3
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 1.0.0.rc2
54
+ version: 1.0.0.rc3
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pakyow-support
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 1.0.0.rc2
61
+ version: 1.0.0.rc3
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 1.0.0.rc2
68
+ version: 1.0.0.rc3
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: async-websocket
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -117,16 +117,15 @@ files:
117
117
  - CHANGELOG.md
118
118
  - LICENSE
119
119
  - README.md
120
+ - lib/pakyow/actions/realtime/upgrader.rb
120
121
  - lib/pakyow/environment/realtime/config.rb
121
122
  - lib/pakyow/realtime.rb
122
- - lib/pakyow/realtime/actions/upgrader.rb
123
123
  - lib/pakyow/realtime/behavior/config.rb
124
124
  - lib/pakyow/realtime/behavior/rendering/install_websocket.rb
125
125
  - lib/pakyow/realtime/behavior/serialization.rb
126
126
  - lib/pakyow/realtime/behavior/server.rb
127
127
  - lib/pakyow/realtime/behavior/silencing.rb
128
128
  - lib/pakyow/realtime/channel.rb
129
- - lib/pakyow/realtime/context.rb
130
129
  - lib/pakyow/realtime/framework.rb
131
130
  - lib/pakyow/realtime/helpers/broadcasting.rb
132
131
  - lib/pakyow/realtime/helpers/socket.rb
@@ -1,38 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Pakyow
4
- module Realtime
5
- # Deals with realtime connections in context of an app. Instances are
6
- # returned by the `socket` helper method during routing.
7
- #
8
- # @api public
9
- class Context
10
- # @api private
11
- def initialize(app)
12
- @app = app
13
- end
14
-
15
- # Push a message down one or more channels.
16
- #
17
- # @api public
18
- def push(msg, *channels)
19
- delegate.push(msg, *channels)
20
- end
21
-
22
- # Push a message down a channel directed at a specific client,
23
- # identified by key.
24
- #
25
- # @api public
26
- def push_to_key(msg, channel, key, propagated: false)
27
- delegate.push_to_key(msg, channel, key, propagated: propagated)
28
- end
29
-
30
- # Returns an instance of the connection delegate.
31
- #
32
- # @api private
33
- def delegate
34
- Delegate.instance
35
- end
36
- end
37
- end
38
- end