rack-xsl 0.2.6 → 0.2.7
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.
- data/VERSION +1 -1
- data/lib/rack/xsl.rb +5 -0
- metadata +34 -50
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.7
|
data/lib/rack/xsl.rb
CHANGED
@@ -16,6 +16,7 @@ module Rack
|
|
16
16
|
@xslt.xsl = REXML::Document.new '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"><xsl:import href="http://github.com/docunext/1bb02b59/raw/master/standard.html.xsl"/><xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="no" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" indent="yes"/></xsl:stylesheet>'
|
17
17
|
else
|
18
18
|
@xslt = @options[:myxsl]
|
19
|
+
@xslt.xsl = REXML::Document.new @options[:xslfile]
|
19
20
|
end
|
20
21
|
end
|
21
22
|
|
@@ -76,6 +77,9 @@ module Rack
|
|
76
77
|
headers["Content-Type"] = @options[:content_type]
|
77
78
|
end
|
78
79
|
|
80
|
+
# Cache control override?
|
81
|
+
headers["Cache-Control"] = @options[:cache_control] if @options.has_key?(:cache_control)
|
82
|
+
|
79
83
|
[status, headers, newbody]
|
80
84
|
|
81
85
|
rescue RackXSLError
|
@@ -90,6 +94,7 @@ module Rack
|
|
90
94
|
}
|
91
95
|
end
|
92
96
|
def getResponse(body)
|
97
|
+
return body unless body.respond_to?(:each)
|
93
98
|
newbody = []
|
94
99
|
body.each { |part|
|
95
100
|
# Only check the first chunk to ensure 1) its not HTML and 2) its XML
|
metadata
CHANGED
@@ -1,44 +1,36 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-xsl
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 2
|
8
|
-
- 6
|
9
|
-
version: 0.2.6
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.7
|
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-01 00:00:00 -05:00
|
12
|
+
date: 2011-07-10 00:00:00.000000000 -04:00
|
18
13
|
default_executable:
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
21
16
|
name: shoulda
|
22
|
-
|
23
|
-
|
24
|
-
requirements:
|
25
|
-
- -
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
- 0
|
29
|
-
version: "0"
|
17
|
+
requirement: &83843760 !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
30
23
|
type: :development
|
31
|
-
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *83843760
|
32
26
|
description: Rack middleware for transforming XML with XSL.
|
33
27
|
email: albert.lash@docunext.com
|
34
28
|
executables: []
|
35
|
-
|
36
29
|
extensions: []
|
37
|
-
|
38
|
-
extra_rdoc_files:
|
30
|
+
extra_rdoc_files:
|
39
31
|
- LICENSE
|
40
32
|
- README.md
|
41
|
-
files:
|
33
|
+
files:
|
42
34
|
- LICENSE
|
43
35
|
- README.md
|
44
36
|
- Rakefile
|
@@ -51,34 +43,26 @@ files:
|
|
51
43
|
has_rdoc: true
|
52
44
|
homepage: http://www.docunext.com/wiki/Rack-XSLView
|
53
45
|
licenses: []
|
54
|
-
|
55
46
|
post_install_message:
|
56
47
|
rdoc_options: []
|
57
|
-
|
58
|
-
require_paths:
|
48
|
+
require_paths:
|
59
49
|
- lib
|
60
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
requirements:
|
69
|
-
- -
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
|
72
|
-
- 0
|
73
|
-
version: "0"
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
74
62
|
requirements: []
|
75
|
-
|
76
|
-
|
77
|
-
rubygems_version: 1.3.6
|
63
|
+
rubyforge_project: ''
|
64
|
+
rubygems_version: 1.6.2
|
78
65
|
signing_key:
|
79
66
|
specification_version: 3
|
80
67
|
summary: XSL rack middleware.
|
81
|
-
test_files:
|
82
|
-
- test/rack-xslview_test.rb
|
83
|
-
- test/test_helper.rb
|
84
|
-
- test/test_install.rb
|
68
|
+
test_files: []
|