dyndoc-ruby 0.9.5 → 0.9.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dyndoc-html-servers.rb +7 -5
- data/share/html-srv/dyn-html-srv.ru +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f8bcf57da617b500065b48b30693b8bc45fa613
|
4
|
+
data.tar.gz: 5015969b8ff1e8778fd7f4d7893f9bb4af287fcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 210bec08a9be6d8d04981047ebee6ac6a0f536f79f0969627eca439ab8a8998a963888dddd242b45feec66e323e94d088231342e232c3a8617e8c7a1efd4220e
|
7
|
+
data.tar.gz: 91639322336e702389860ec44cea19c9ac9800e6b16d16ec9c4b3e55e227beaa4e6a016ce4880f3dc9bcaccd0b482eff640ff935dc8eb4c6931d2d68f41a0fdf
|
data/lib/dyndoc-html-servers.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'dyndoc/init/home'
|
2
2
|
require 'pathname'
|
3
|
+
require 'yaml'
|
3
4
|
|
4
5
|
module Dyndoc
|
5
6
|
module HtmlServers
|
@@ -10,15 +11,16 @@ module Dyndoc
|
|
10
11
|
unless @@cfg
|
11
12
|
dyndoc_home = Dyndoc.home
|
12
13
|
cfg_yml = File.join(dyndoc_home,"etc","dyn-html.yml")
|
13
|
-
@@cfg=(File.exist? cfg_yml) ? YAML::load_file(cfg_yml) : {}
|
14
|
+
@@cfg=(File.exist? cfg_yml) ? ::YAML::load_file(cfg_yml) : {}
|
14
15
|
@@cfg["dyndoc_home"]=dyndoc_home
|
15
16
|
end
|
16
17
|
@@cfg
|
17
18
|
end
|
18
19
|
|
19
|
-
def HtmlServers.dyn_http_server(host=nil,port="
|
20
|
+
def HtmlServers.dyn_http_server(host=nil,port="9294")
|
20
21
|
require 'thin'
|
21
|
-
|
22
|
+
dyn_html_srv_ru=File.expand_path("../../share/html-srv/dyn-html-srv.ru",__FILE__)
|
23
|
+
arg=["-R",dyn_html_srv_ru]
|
22
24
|
if port
|
23
25
|
arg += ["-p",port]
|
24
26
|
elsif HtmlServers.cfg["html-srv-port"]
|
@@ -47,8 +49,8 @@ module Dyndoc
|
|
47
49
|
public_root = cfg["public_root"] || HtmlServers.cfg["public_root"] || File.join(root ,"public")
|
48
50
|
pages_root = File.join(public_root ,"pages")
|
49
51
|
current_email = cfg["email"] || HtmlServers.cfg["email"] || "rdrouilh@gmail.com" #default email user can be overriden by -u option
|
50
|
-
host=cfg["html-srv-host"] || HtmlServers.cfg["html-srv-host"] || "http://localhost"
|
51
|
-
port=cfg["html-srv-port"] || HtmlServers.cfg["html-srv-port"] || "
|
52
|
+
host=(cfg["html-srv-host"] || HtmlServers.cfg["html-srv-host"] || "http://localhost").to_s
|
53
|
+
port=(cfg["html-srv-port"] || HtmlServers.cfg["html-srv-port"] || "9294").to_s
|
52
54
|
base_url= host+":"+port
|
53
55
|
|
54
56
|
opts = {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require "roda"
|
2
2
|
require "pathname"
|
3
|
-
|
3
|
+
##TODO: require 'rack-livereload'
|
4
4
|
## read config file
|
5
5
|
require 'dyndoc/init/home'
|
6
6
|
dyndoc_home = Dyndoc.home
|
@@ -13,6 +13,7 @@ $public_root = cfg["public_root"] || File.join(root ,"public")
|
|
13
13
|
|
14
14
|
class App < Roda
|
15
15
|
use Rack::Session::Cookie, :secret => (secret="Thanks like!")
|
16
|
+
##TODO: use Rack::LiveReload
|
16
17
|
plugin :static, ["/pages","/private","/tools"], :root => $public_root
|
17
18
|
#opts[:root]=File.expand_path("..",__FILE__),
|
18
19
|
#plugin :static, ["/pages","/private"]
|
@@ -88,7 +89,6 @@ class App < Roda
|
|
88
89
|
# end
|
89
90
|
|
90
91
|
|
91
|
-
|
92
92
|
route do |r|
|
93
93
|
|
94
94
|
# GET / request
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dyndoc-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RCqls
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: R4rb
|