rack-refresher 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rack/refresher.rb +10 -2
- 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: 6555051d1ca7204a3ab7417ddcb801e1008cd02f
|
4
|
+
data.tar.gz: 7a38b0af53aa4b6925b16617c06348ae6bd57c61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8367cab9f49628d63a2401007ed63af641f47cec83752eb8540dab9ce9eb418eaa18fe0eba2e36611364e4027804e45f1df92ed3889e6902449523de2719ade1
|
7
|
+
data.tar.gz: 9c1ef87a3dcf1cc87058169cfc793b1dd985f8a126acd503e6a4e07aafb46bb6ef3a31d44d6d12c7a56e9c5605b763005a54d1defd6a5a5387b41acb889d2fda
|
data/lib/rack/refresher.rb
CHANGED
@@ -26,8 +26,16 @@ module Rack
|
|
26
26
|
private
|
27
27
|
|
28
28
|
def inject(body)
|
29
|
-
body
|
30
|
-
|
29
|
+
[join(body).gsub(/<\/body>/i, render_template)]
|
30
|
+
end
|
31
|
+
|
32
|
+
def join(body)
|
33
|
+
result = ""
|
34
|
+
body.each do |line|
|
35
|
+
result << line
|
36
|
+
result << "\n"
|
37
|
+
end
|
38
|
+
result
|
31
39
|
end
|
32
40
|
|
33
41
|
def render_template
|