rack-rdiscount 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rack/rdiscount.rb +2 -0
- metadata +23 -37
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/lib/rack/rdiscount.rb
CHANGED
@@ -18,6 +18,7 @@ module Rack
|
|
18
18
|
|
19
19
|
return original_response unless headers["Content-Type"].to_s == 'text/plain'
|
20
20
|
mdwn = getResponse(body)
|
21
|
+
body.close if body.respond_to?(:close)
|
21
22
|
|
22
23
|
newbody = '<div id="page-content">' + RDiscount.new(mdwn).to_html + '</div>'
|
23
24
|
# If we've made it this far, we can alter the headers
|
@@ -31,6 +32,7 @@ module Rack
|
|
31
32
|
|
32
33
|
private
|
33
34
|
def getResponse(body)
|
35
|
+
return body unless body.respond_to?(:each)
|
34
36
|
newbody = []
|
35
37
|
body.each { |part|
|
36
38
|
newbody << part.to_s
|
metadata
CHANGED
@@ -1,34 +1,26 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-rdiscount
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 2
|
9
|
-
version: 0.0.2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.3
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Albert Lash
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
date: 2011-01-30 00:00:00 -05:00
|
12
|
+
date: 2011-07-10 00:00:00.000000000 -04:00
|
18
13
|
default_executable:
|
19
14
|
dependencies: []
|
20
|
-
|
21
15
|
description: A rack middleware for converting markdown to html.
|
22
16
|
email: albert.lash@docunext.com
|
23
17
|
executables: []
|
24
|
-
|
25
18
|
extensions: []
|
26
|
-
|
27
|
-
extra_rdoc_files:
|
19
|
+
extra_rdoc_files:
|
28
20
|
- LICENSE
|
29
21
|
- README
|
30
22
|
- README.markdown
|
31
|
-
files:
|
23
|
+
files:
|
32
24
|
- LICENSE
|
33
25
|
- README
|
34
26
|
- README.markdown
|
@@ -40,32 +32,26 @@ files:
|
|
40
32
|
has_rdoc: true
|
41
33
|
homepage: http://www.docunext.com/
|
42
34
|
licenses: []
|
43
|
-
|
44
35
|
post_install_message:
|
45
36
|
rdoc_options: []
|
46
|
-
|
47
|
-
require_paths:
|
37
|
+
require_paths:
|
48
38
|
- lib
|
49
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
requirements:
|
58
|
-
- -
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
|
61
|
-
- 0
|
62
|
-
version: "0"
|
39
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ! '>='
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0'
|
45
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
46
|
+
none: false
|
47
|
+
requirements:
|
48
|
+
- - ! '>='
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '0'
|
63
51
|
requirements: []
|
64
|
-
|
65
|
-
|
66
|
-
rubygems_version: 1.3.6
|
52
|
+
rubyforge_project: ''
|
53
|
+
rubygems_version: 1.6.2
|
67
54
|
signing_key:
|
68
55
|
specification_version: 3
|
69
56
|
summary: Markdown rack middleware.
|
70
57
|
test_files: []
|
71
|
-
|