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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9797fb72140bc6a86f650ca641acead9b7c86743
4
- data.tar.gz: 90037c54727ff35372e2cf09b9e9f262eb3e136e
3
+ metadata.gz: c53d944af22030c23943ecc9142cbfb47a22a5ba
4
+ data.tar.gz: e1811a3b570a8ddace3e6b1c386e705b144cf555
5
5
  SHA512:
6
- metadata.gz: 77428d00c99c3982e48c5db83f44b4708312b9ca5b40d7a3b6dd2717a6a4404288c0140918ed835b17e8de1fb7d673c53d9eb23fce4052eeec8118f81b9ad0aa
7
- data.tar.gz: 4dc7a231b559433345c34ca38b9c997431654dc88bd835b8af9132fc48976bab311bb95a4a7791cef386555eacae0a1427267a45a2568e737333f79a78c3fe50
6
+ metadata.gz: 6ad4150bb797dac36ccb364b08baa39eef9ab86be178fa88c2f5eeecdf467456f5d7b1c98c703b227747d188bf8ecb840a2733677ca3401d09996d840dcbc8ef
7
+ data.tar.gz: 98ba3b7ebf9cbc9e066e7d11f5ed3456c65afd52ccc663e0deb70dd0bf972667d90683419719bf36ce7acd2c9a0abfb4f5c26707989f15b76b84252ab42ceee4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.2
1
+ 0.4.3
@@ -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["content-type"] && headers["content-type"].include?("text/html")
103
+ headers["Content-Type"] != nil && headers["Content-Type"].include?("text/html")
102
104
 
103
- body_content = StringIO.new(response)
104
- #response.each{|part| body_content << part}
105
+ html = ""
106
+ response.each{|part| html << part}
105
107
 
106
- ::Pagelime.logger.debug "PAGELIME CMS RACK PLUGIN: Processing For Path: #{req.path}"
107
- ::Pagelime.logger.debug "PAGELIME CMS RACK PLUGIN: Processing Body (size:#{body_content.length})"
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
- body = ::Pagelime.process_page(body_content, req.path)
112
+ html = ::Pagelime.process_page(html, req.path)
110
113
 
111
- headers['content-length'] = body.length.to_s
114
+ headers['content-length'] = html.length.to_s
112
115
 
113
- body = [body]
116
+ body = [html]
114
117
 
115
118
  else
116
119
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "pagelime-rack"
8
- s.version = "0.4.2"
8
+ s.version = "0.4.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Emil Anticevic", "Joel Van Horn"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagelime-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emil Anticevic