rdoc-view 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +6 -2
- data/lib/rdoc-view/version.rb +1 -1
- data/lib/rdoc-view.rb +4 -1
- data/rdoc-view.gemspec +1 -0
- metadata +18 -2
data/README.rdoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= RDocView
|
2
2
|
|
3
|
-
RDocView is a real-time viewer of RDoc/Markdown which used WebSocket.
|
3
|
+
RDocView is a real-time viewer of RDoc/Markdown/Textile which used WebSocket.
|
4
4
|
|
5
5
|
= Install
|
6
6
|
|
@@ -12,13 +12,16 @@ RDocView is a real-time viewer of RDoc/Markdown which used WebSocket.
|
|
12
12
|
|
13
13
|
-p port set the port (default is 4567)
|
14
14
|
-o addr set the host (default is 0.0.0.0)
|
15
|
-
-t type set the document type (rdoc or md)
|
15
|
+
-t type set the document type (rdoc or md or textile)
|
16
16
|
if omits, judging from the extension
|
17
17
|
|
18
18
|
browse http://localhost:4567/
|
19
19
|
and edit filename by your favorite editor.
|
20
20
|
Change of a file is detected and a rendering is carried out in real time.
|
21
21
|
|
22
|
+
= Blog post
|
23
|
+
Japanese: http://mt.orz.at/archives/2012/11/realtimeviewerr.html
|
24
|
+
|
22
25
|
= Support Browser
|
23
26
|
- Google Chrome
|
24
27
|
- Firefox
|
@@ -27,3 +30,4 @@ Change of a file is detected and a rendering is carried out in real time.
|
|
27
30
|
|
28
31
|
- MIT License
|
29
32
|
|
33
|
+
|
data/lib/rdoc-view/version.rb
CHANGED
data/lib/rdoc-view.rb
CHANGED
@@ -12,6 +12,7 @@ require "rdoc/markup/to_html"
|
|
12
12
|
require "sinatra/base"
|
13
13
|
require "sinatra-websocket"
|
14
14
|
require "fssm"
|
15
|
+
require "RedCloth"
|
15
16
|
|
16
17
|
module RDocView
|
17
18
|
def convert(file, type)
|
@@ -28,6 +29,8 @@ module RDocView
|
|
28
29
|
resp = access.post(uri.path, text, {"content-type" => "text/plain"})
|
29
30
|
html = resp.body
|
30
31
|
end
|
32
|
+
when "textile"
|
33
|
+
html = RedCloth.new(text).to_html
|
31
34
|
else
|
32
35
|
h = RDoc::Markup::ToHtml.new
|
33
36
|
html = h.convert(text)
|
@@ -42,7 +45,7 @@ module RDocView
|
|
42
45
|
OptionParser.new { |op |
|
43
46
|
op.on('-p port', 'set the port (default is 4567)') { |val| set :port, Integer(val) }
|
44
47
|
op.on('-o addr', 'set the host (default is 0.0.0.0)') { |val| set :bind, val }
|
45
|
-
op.on('-t type', 'set the document type (rdoc or md)',
|
48
|
+
op.on('-t type', 'set the document type (rdoc or md or textile)',
|
46
49
|
'if omits, judging from the extension') { |val| opt_type = val.downcase }
|
47
50
|
}.parse!(ARGV)
|
48
51
|
set :environment, :production
|
data/rdoc-view.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdoc-view
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|
@@ -75,6 +75,22 @@ dependencies:
|
|
75
75
|
- - ! '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: RedCloth
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :runtime
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
78
94
|
description: Realtime RDoc viewer with WebSocket.
|
79
95
|
email:
|
80
96
|
- kirscheless@gmail.com
|