rack-footnotes 0.0.2 → 0.0.3

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.
Files changed (2) hide show
  1. data/lib/rack/footnotes.rb +5 -2
  2. metadata +3 -3
@@ -2,9 +2,11 @@ require "rack"
2
2
 
3
3
  class Rack::FootNotes
4
4
 
5
- VERSION = "0.0.2"
5
+ VERSION = "0.0.3"
6
6
 
7
7
  def initialize(app, options = {}, &block)
8
+ puts("Using rack-footnotes " + VERSION)
9
+
8
10
  @app = app
9
11
  @options = {
10
12
  :notes_path => 'notes',
@@ -22,7 +24,8 @@ class Rack::FootNotes
22
24
  file = Dir.pwd + "/#{@options[:notes_path]}" + route.gsub(/\/$/,'') + '.txt'
23
25
  if File.exists?(file)
24
26
  note = File.readlines(file).to_s
25
- body.body.to_s.gsub!("</body>","<div id='racknotes'>#{note}</div><style>#racknotes { #{@options[:css]} #{@options[:extra_css]} }</style></body>")
27
+ body = body.body.to_s
28
+ body = body.gsub("</body>","<div id='racknotes'>#{note}</div><style>#racknotes { #{@options[:css]} #{@options[:extra_css]} }</style></body>")
26
29
  end
27
30
  end
28
31
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-footnotes
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Ale Mu\xC3\xB1oz"