octodown 1.8.3 → 1.8.4

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: 5826b38e86e7718f2a36844504ea8a68be8e8b81
4
- data.tar.gz: 0cbf87cb24c86b69cb6cbc07af18ff71d7d04f20
3
+ metadata.gz: 6d69e3ea20bb771e3543300392cfcd93740a51f7
4
+ data.tar.gz: 30f21c0d5a4db0472a940e4b9ea978b6cf4c3143
5
5
  SHA512:
6
- metadata.gz: a18e388f50592f11d49c82401d0d84725accb5b1d03ce619db0e77accfcd80c4eb77e9dbaaf9dddf8a606e66657e9f10b7ca179996cc0672087e53155b37325b
7
- data.tar.gz: fcf5ffa9c3f975de3cb7096eec20c7ff06077ee337dbf0887a166f8ea589865f8cb1189fa04ba6a015b4c442cabf76cd0599be78aa10af46deb3873194841d28
6
+ metadata.gz: e0cbaafd0246b4936627001f3d3611f9fecae63d6cf7570e4ba5d9026d8109dacf7163badcc320b067bedfd1cb64fa3e60339deda1d0084d352e7acedfce66e9
7
+ data.tar.gz: 39faf85924e565cc85a1eb7b65b7af0259ecb515a20616ba10f9f10288d8cf7d27f6442c2896d8adb46e1f1d38a8be77651b06840a39b4ced8dd84a04bdfdc35
@@ -8,6 +8,8 @@ require 'launchy'
8
8
  module Octodown
9
9
  module Renderer
10
10
  class Server
11
+ Thread.abort_on_exception = true
12
+
11
13
  attr_reader :file, :path, :options, :port, :logger
12
14
 
13
15
  def initialize(_content, options = {})
@@ -24,7 +26,6 @@ module Octodown
24
26
  register_listener
25
27
 
26
28
  Thread.new do
27
- Thread.abort_on_exception = true
28
29
  maybe_launch_browser
29
30
  end
30
31
 
@@ -34,7 +35,11 @@ module Octodown
34
35
  def boot_server
35
36
  logger.info "#{file.path} is getting octodown'd"
36
37
  logger.info "Server running on http://localhost:#{port}"
37
- Rack::Handler::Puma.run app, Host: 'localhost', Port: port, Silent: true
38
+ Rack::Handler::Puma.run app,
39
+ Host: 'localhost',
40
+ Port: port,
41
+ Silent: true,
42
+ Threads: '2:8'
38
43
  end
39
44
 
40
45
  def maybe_launch_browser
@@ -105,7 +110,9 @@ module Octodown
105
110
  logger.info "Changes to #{file.path} detected, updating"
106
111
  md = render_md(file)
107
112
  @websockets.each do |socket|
108
- socket.send md
113
+ Thread.new do
114
+ socket.send md
115
+ end
109
116
  end
110
117
  end
111
118
  end
@@ -1,3 +1,3 @@
1
1
  module Octodown
2
- VERSION = '1.8.3'.freeze
2
+ VERSION = '1.8.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octodown
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.3
4
+ version: 1.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Ker-Seymer