vueport 0.1.4 → 0.1.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
  SHA1:
3
- metadata.gz: bef1280dc4dad59ecb508f1587869cc625edb3ee
4
- data.tar.gz: 1f0ff8226cf6488a9c807347d54d42fd1b78b766
3
+ metadata.gz: 8797f912f967bbac2f39d8bd432cf8d741b5985f
4
+ data.tar.gz: 530870bb8674928cd37dcdb2dd4741eb8d99b79d
5
5
  SHA512:
6
- metadata.gz: b1c76aa468fe39f8c0f902e304247948b4872fe630f60579990aab83055fca457639236eef225596b96394d6ca0f5616816a9a782e3290b133c3d2c5b7fc9321
7
- data.tar.gz: d7a603b355c440f27f2c3ee88498593a0d831c8a73e3b99817115281e06105d35f01eb07230eb172bc9cbfb3f4728f50cb5f0e9511cc724fe344a528048db351
6
+ metadata.gz: 3965f4fbc6db9e9302df48680e866f0c9f7e01f2e665ed54e01e9073647e7bdc6006556beefd7a0720b71842d8f138f2c010284814dc251144717c959aa36033
7
+ data.tar.gz: 46a9a1eba532d30db227910e16392d8dc8bec3fc0142e9e01a67dcbe359bafe0cb5196cb7f451c8afefe07c82cadb742267b4b8e5fe89309bb6ea56537eb4aca
data/README.md CHANGED
@@ -134,6 +134,12 @@ I use React on a regular basis for SPAs and love its functional philosophy, but
134
134
 
135
135
  For a Vue.js and React [collaborative](https://github.com/vuejs/vuejs.org/issues/364) comparison, [check this out](https://vuejs.org/guide/comparison.html).
136
136
 
137
+ ## FAQs
138
+
139
+ - **I get the error `Could not load compiled manifest from /app/public/webpack/manifest.json` in production**
140
+
141
+ You'll need to run `npm run compile` as part of your build process to generate the production JS bundle (this error is generated by WebpackRails)
142
+
137
143
  ## To Do
138
144
 
139
145
  - [x] Handle SSR
@@ -12,11 +12,12 @@ module Vueport
12
12
  server_port: 5000,
13
13
  server_config_file: 'config/vueport/webpack.server.conf',
14
14
  client_config_file: 'config/vueport/webpack.prod.conf',
15
- ssr_enabled: false
15
+ ssr_enabled: false,
16
+ ssr_timeout: 3
16
17
  }
17
18
  end
18
19
 
19
- def configure(&_block)
20
+ def configure(&_)
20
21
  yield config if block_given?
21
22
  end
22
23
  end
@@ -25,11 +25,17 @@ module Vueport
25
25
  end
26
26
 
27
27
  def response
28
- @response ||= http.post path, content, 'Content-Type' => 'text/plain'
28
+ @response ||= http
29
+ .tap { |http| http.read_timeout = timeout }
30
+ .post path, content, 'Content-Type' => 'text/plain'
29
31
  end
30
32
 
31
33
  def http
32
34
  @http ||= Net::HTTP.new Vueport.config[:server_host], Vueport.config[:server_port]
33
35
  end
36
+
37
+ def timeout
38
+ Vueport.config[:ssr_timeout] || 3
39
+ end
34
40
  end
35
41
  end
@@ -28,12 +28,12 @@ module Vueport
28
28
 
29
29
  def ssr_content
30
30
  Vueport::NodeClient.new(wrapper(content), path: path).run!
31
- rescue Vueport::RenderError
31
+ rescue
32
32
  wrapper
33
33
  end
34
34
 
35
- def wrapper(content = '')
36
- content_tag :div, content, id: CONTENT_WRAPPER_ID, 'v-bind:class' => 'wrapperClass'
35
+ def wrapper(inner = '')
36
+ content_tag :div, inner, id: CONTENT_WRAPPER_ID, 'v-bind:class' => 'wrapperClass'
37
37
  end
38
38
 
39
39
  def ssr_enabled?
@@ -1,3 +1,3 @@
1
1
  module Vueport
2
- VERSION = '0.1.4'.freeze
2
+ VERSION = '0.1.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vueport
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Garson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-18 00:00:00.000000000 Z
11
+ date: 2017-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler