roda-live_reload 0.1.0 → 0.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 012c722bc93152e04fca3510e45c9725b8585785
4
- data.tar.gz: 2881387c5c17aec0f4938ba1268c5f35eebc6fbb
3
+ metadata.gz: dc87d40e2fca8cb9281fce249f914d7f3f64a470
4
+ data.tar.gz: 50bd8cb3976833a12f04f97b595758006a0e7b77
5
5
  SHA512:
6
- metadata.gz: 70581a36241c3c129d90e407d124ae34b1cdb8af69061de28050ed303da8af985f530e252602cf9d50127924b3e51d0f093eb613ccad84aba1130edc7149c904
7
- data.tar.gz: ae065406eb93a0234567a574d83703bf4d41f56e6a995c3e19b91cf1f5569c1e0a42ec765b187dd9fb4cfd86d18fa68b10e5cbf041d2e0ae58a09eb73e906323
6
+ metadata.gz: 1ce311d6ebcf25507ee3864c4895da6f64a243a3d658d9dd913169efeb0c66ff1d43e1804a640e80678761d1172129498b915d00f42ff3da343537929be2102c
7
+ data.tar.gz: 13fdb4500402d37be59995f306e29e9222173b61b972faef6ed6d2dba75ff6d3d11de8e7a9b7445715bea779c31dea46629b9312bea7e06def3918fec1afcc8a
@@ -49,14 +49,14 @@ module Roda::RodaPlugins # :nodoc:
49
49
  status, headers, content = super
50
50
 
51
51
  content = content.map do |chunk|
52
- if chunk.include?("</body>")
53
- chunk.sub("</body>", INJECT + "</body>")
52
+ if chunk.include?("</head>")
53
+ chunk.sub("</head>", INJECT + "</head>")
54
54
  else
55
55
  chunk
56
56
  end
57
57
  end
58
58
 
59
- headers["Content-Length"] = content.reduce(0) { |memo, chunk| memo + chunk.size }.to_s
59
+ headers["Content-Length"] = content.reduce(0) { |memo, chunk| memo + chunk.bytesize }.to_s
60
60
 
61
61
  [status, headers, content]
62
62
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roda-live_reload
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Daniels
@@ -60,7 +60,7 @@ extra_rdoc_files: []
60
60
  files:
61
61
  - README.md
62
62
  - lib/roda/plugins/live_reload.rb
63
- homepage:
63
+ homepage: https://github.com/adam12/roda-live_reload
64
64
  licenses:
65
65
  - MIT
66
66
  metadata: {}