markdownr 0.5.13 → 0.5.14

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: 8825ac583ace67b9cd50c7aef4d09a9de175bd6f3c81d4fcd2d8d5159476b76f
4
- data.tar.gz: 55301d8c94bea36eef2b30571a4971e4d2661689ed4faab4d85a2632dda61af3
3
+ metadata.gz: f80b8ab8eaa610c955ccd7838ed37f02d900c9e73ce64e52c163b4992a9be5a0
4
+ data.tar.gz: 2e26441fbcf5355977e3393b1948b39af22c07301317355627a48252fd394768
5
5
  SHA512:
6
- metadata.gz: 4fb68ab533ae36e9509d85c29bddb4c23fc36747a4eadfd1e1b78fe73d1af2d872f14089557db3dbe43ed1fec08df44b60cabd07471664f3792e20ff60857c04
7
- data.tar.gz: abe3b62dc09675cc99d670915cae25690270ce83a9274cf7954020c8b883b94c22ed9d984e12cf27858fff227346196137cae291b0d944cce3290a7e8672364b
6
+ metadata.gz: '0639cf0ff09aec6ad21db709b8d8a2a6f98780ad26d3602beaba00b736f877fe81622113c283caf2ecee5f431dffc542c1ac00095905e85219d43766e94049a2'
7
+ data.tar.gz: a1846784c14a99b559cad1314260b09dfff5aeeda243dac14d2e2c78f5f619b030a54a225305827fa5a4042b3a11a12e29e946c3e985b22bdaf4f1959e074f0f
data/bin/markdownr CHANGED
@@ -2,7 +2,7 @@
2
2
  require "optparse"
3
3
  require_relative "../lib/markdown_server"
4
4
 
5
- options = { port: 4567, bind: "127.0.0.1" }
5
+ options = { port: 4567, bind: "127.0.0.1", threads: 5 }
6
6
 
7
7
  OptionParser.new do |opts|
8
8
  opts.banner = "Usage: markdownr [options] [directory]"
@@ -23,6 +23,10 @@ OptionParser.new do |opts|
23
23
  options[:allow_robots] = true
24
24
  end
25
25
 
26
+ opts.on("-T", "--threads N", Integer, "Number of server threads (default: 5)") do |n|
27
+ options[:threads] = n
28
+ end
29
+
26
30
  opts.on("--behind-proxy", "Trust X-Forwarded-For for client IP (use when behind a reverse proxy like Caddy)") do
27
31
  options[:behind_proxy] = true
28
32
  end
@@ -62,6 +66,7 @@ MarkdownServer::App.set :link_tooltips, options.fetch(:link_tooltips, true)
62
66
  MarkdownServer::App.set :hard_wrap, options.fetch(:hard_wrap, true)
63
67
  MarkdownServer::App.set :port, options[:port]
64
68
  MarkdownServer::App.set :bind, options[:bind]
69
+ MarkdownServer::App.set :server_settings, { max_threads: options[:threads], min_threads: 1 }
65
70
 
66
71
  puts "Serving #{dir} on http://#{options[:bind]}:#{options[:port]}/"
67
72
  MarkdownServer::App.run!
@@ -1,3 +1,3 @@
1
1
  module MarkdownServer
2
- VERSION = "0.5.13"
2
+ VERSION = "0.5.14"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdownr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.13
4
+ version: 0.5.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Dunn