pagelime-rack 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/rack/pagelime.rb +12 -9
- data/pagelime-rack.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c53d944af22030c23943ecc9142cbfb47a22a5ba
|
4
|
+
data.tar.gz: e1811a3b570a8ddace3e6b1c386e705b144cf555
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ad4150bb797dac36ccb364b08baa39eef9ab86be178fa88c2f5eeecdf467456f5d7b1c98c703b227747d188bf8ecb840a2733677ca3401d09996d840dcbc8ef
|
7
|
+
data.tar.gz: 98ba3b7ebf9cbc9e066e7d11f5ed3456c65afd52ccc663e0deb70dd0bf972667d90683419719bf36ce7acd2c9a0abfb4f5c26707989f15b76b84252ab42ceee4
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.3
|
data/lib/rack/pagelime.rb
CHANGED
@@ -94,23 +94,26 @@ module Rack
|
|
94
94
|
unless resp
|
95
95
|
|
96
96
|
::Pagelime.logger.debug "PAGELIME CMS RACK PLUGIN: Headers: #{headers}"
|
97
|
-
::Pagelime.logger.debug "PAGELIME CMS RACK PLUGIN: Status: #{status}"
|
97
|
+
::Pagelime.logger.debug "PAGELIME CMS RACK PLUGIN: Status: #{status.inspect}"
|
98
98
|
::Pagelime.logger.debug "PAGELIME CMS RACK PLUGIN: Response: #{response}"
|
99
99
|
|
100
|
+
::Pagelime.logger.debug "enabled? (#{processing_enabled_for_request?(env)}) status (#{status == 200}) headers (#{headers["Content-Type"] != nil}) html (#{headers["Content-Type"]}) class (#{headers["Content-Type"].class})"
|
101
|
+
|
100
102
|
if processing_enabled_for_request?(env) && status == 200 &&
|
101
|
-
headers["
|
103
|
+
headers["Content-Type"] != nil && headers["Content-Type"].include?("text/html")
|
102
104
|
|
103
|
-
|
104
|
-
|
105
|
+
html = ""
|
106
|
+
response.each{|part| html << part}
|
105
107
|
|
106
|
-
::Pagelime.logger.debug
|
107
|
-
::Pagelime.logger.debug
|
108
|
+
::Pagelime.logger.debug "PAGELIME CMS RACK PLUGIN: Processing For Path: #{req.path}"
|
109
|
+
::Pagelime.logger.debug "PAGELIME CMS RACK PLUGIN: Processing Body (size:#{html.length})"
|
110
|
+
::Pagelime.logger.debug "PAGELIME CMS RACK PLUGIN: Processing Body: #{html.inspect}"
|
108
111
|
|
109
|
-
|
112
|
+
html = ::Pagelime.process_page(html, req.path)
|
110
113
|
|
111
|
-
headers['content-length'] =
|
114
|
+
headers['content-length'] = html.length.to_s
|
112
115
|
|
113
|
-
body = [
|
116
|
+
body = [html]
|
114
117
|
|
115
118
|
else
|
116
119
|
|
data/pagelime-rack.gemspec
CHANGED