isomorfeus-react 16.8.5 → 16.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8a17f89bdbc05a905aca55121053827da7546aaef0d282426457d7c7a7cdc18
4
- data.tar.gz: 42eb95d1c5573a6cf22093c95638698a82d31cc2eebfb57b71b528d35d8bd35b
3
+ metadata.gz: d06df2fa413090b9c36ab84854b7f7735e67608e82034f9a3916cfddb8aa655c
4
+ data.tar.gz: d63d327911b3cf369bf87a229e3acde7d899b735d47f117f277c7f5b63cd8c2d
5
5
  SHA512:
6
- metadata.gz: a68d65b5722fcca6fdb469bb19aade87fe603c1c6a46b62c3a5bfadc3e9a37e389be1ea77bb493e53faceb51de16cc09330223d7f3aaf26661c0be20990a1e3d
7
- data.tar.gz: ca252549c6640b4830c32cd224a6b395d04ec764ccb0f2f9d94fcebae55c97090170a488ab6be61393691df55cddd51640a8013b70da42d9b2a42d1b7b0d56f6
6
+ metadata.gz: ec82f58b53df7aa97c4cc8c3cf79314f6d73f190f3c10bd55f50c591a20ce0727be21d539b12dc050f2e3e756ea3b4644fac585da48497166561af5be6a91b39
7
+ data.tar.gz: fb2b5d4d28b1a92c0f8ebbe036d3aca7fd46f9f4cb38bb763bab86f256721dad504a9290f7e3c627c31dd364ae3bb4d271269394b3fd7df4b1469e4e758dfc3e
@@ -14,9 +14,21 @@ module Isomorfeus
14
14
  global.Opal.Isomorfeus.TopLevel["$ssr_route_path="]('#{props[:location]}');
15
15
  JAVASCRIPT
16
16
  end
17
+ if props.key?(:location_host) && props.key?(:location_scheme)
18
+ ws_scheme = props[:location_scheme] == 'https:' ? 'wss:' : 'ws:'
19
+ javascript << <<~JAVASCRIPT
20
+ global.Opal.Isomorfeus.TopLevel["$transport_ws_url="]('#{ws_scheme}#{props[:location_host]}#{Isomorfeus.api_websocket_path}');
21
+ if (typeof global.Opal.Isomorfeus.Transport !== 'undefined') {
22
+ global.Opal.Isomorfeus.Transport.$connect();
23
+ }
24
+ JAVASCRIPT
25
+ end
17
26
  javascript << <<~JAVASCRIPT
18
27
  var rendered_tree = global.Opal.Isomorfeus.TopLevel.$render_component_to_string('#{component_name}', #{Oj.dump(props, mode: :strict)})
19
28
  var application_state = global.Opal.Isomorfeus.store.native.getState();
29
+ if (typeof global.Opal.Isomorfeus.Transport !== 'undefined') {
30
+ global.Opal.Isomorfeus.Transport.$disconnect();
31
+ }
20
32
  return [rendered_tree, application_state]
21
33
  JAVASCRIPT
22
34
  rendered_tree, application_state = Isomorfeus.ssr_contexts[asset].exec(javascript)
@@ -2,6 +2,7 @@ module Isomorfeus
2
2
  class TopLevel
3
3
  class << self
4
4
  attr_accessor :ssr_route_path
5
+ attr_accessor :transport_ws_url
5
6
 
6
7
  def mount!
7
8
  # nothing, but keep it for compatibility with browser
data/lib/react/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module React
2
- VERSION = '16.8.5'
2
+ VERSION = '16.8.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-react
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.8.5
4
+ version: 16.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-14 00:00:00.000000000 Z
11
+ date: 2019-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 0.2.4
103
+ version: 0.2.8
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 0.2.4
110
+ version: 0.2.8
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: isomorfeus-puppetmaster
113
113
  requirement: !ruby/object:Gem::Requirement