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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rack/refresher.rb +10 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: efe7451aa569bed4536fffe84d505e5877feda75
4
- data.tar.gz: 4d9b4ce9fdc3e72f999e904c829c77152107572e
3
+ metadata.gz: 6555051d1ca7204a3ab7417ddcb801e1008cd02f
4
+ data.tar.gz: 7a38b0af53aa4b6925b16617c06348ae6bd57c61
5
5
  SHA512:
6
- metadata.gz: 6fdb8e85c8f05a00317fddac2077c6276d14f146a19c2c68b1d12452dc727cfabdcbcb273cd8044e464103c09771ebf4453b7df2a8a6f81bfcf8274ef8fa2ad6
7
- data.tar.gz: 02aa1d5da3f77c43314785ae0451ee9967695936c27f30e729f2a9281f7c0cdeb1307eaf5875b49546e0091574f9984567785cd89064efec743eedeb07ae2f0f
6
+ metadata.gz: 8367cab9f49628d63a2401007ed63af641f47cec83752eb8540dab9ce9eb418eaa18fe0eba2e36611364e4027804e45f1df92ed3889e6902449523de2719ade1
7
+ data.tar.gz: 9c1ef87a3dcf1cc87058169cfc793b1dd985f8a126acd503e6a4e07aafb46bb6ef3a31d44d6d12c7a56e9c5605b763005a54d1defd6a5a5387b41acb889d2fda
@@ -26,8 +26,16 @@ module Rack
26
26
  private
27
27
 
28
28
  def inject(body)
29
- body = body.join("\n")
30
- [body.gsub(/<\/body>/i, render_template)]
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-refresher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Zinovyev