sinatra-footnotes 0.1.2 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3cfa0dab931a683206f1e36c8ffd571ddb6d1444
4
- data.tar.gz: 7e05dd823b2bdab081874314ef80803d04a7b5d5
3
+ metadata.gz: 5b8818eb7cef08c90c1f3836c3faac6842d797a0
4
+ data.tar.gz: 880540a36749519b1121f380977073b39422d203
5
5
  SHA512:
6
- metadata.gz: 0afa668c5e96f09322b4530756b056a2d914d8b14e110960fe4d933d208b05a72b0a5543c07f005970789e88571615444ea9e17283311ce47feacabb965da47f
7
- data.tar.gz: dd29c945a36d1f3741a258c8540051d02887a64e387293e6bed19a13d0b50c388b96b56eea623edcb2284f1d0311e24b9ae49cc9d8c1b3a4639df482aa61f07c
6
+ metadata.gz: 933161b8a6b1556a9e1010df3fea9bfb5769a01eec69decea2cf175ad0b3e4c925108173a4d52d4154aa88cbf6171b26b2acde1c7a6eb435d255b2cf1e791ccd
7
+ data.tar.gz: 6a0193f18551c6b48176695444459253946905c3ae6aef74116a556dd3b77e4cfe25b5e3e033cd866a5a7ea49e553ff4f4145017a67475afbd9c0aa1017f1e31
@@ -1,5 +1,5 @@
1
1
  module Sinatra
2
2
  module Footnotes
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
@@ -60,37 +60,39 @@ module Sinatra
60
60
  app.after do
61
61
  style_path = File.join(
62
62
  File.dirname(__FILE__), 'sinatra-footnotes', 'style.html')
63
- response.body.push File.read(style_path)
63
+ if response.body.respond_to? :push
64
+ response.body.push File.read(style_path)
64
65
 
65
- response.body.push '<!-- Footnotes -->'
66
- response.body.push '<div style="clear:both"></div>'
67
- response.body.push '<div id="footnotes_debug">'
68
- response.body.push 'Show:'
66
+ response.body.push '<!-- Footnotes -->'
67
+ response.body.push '<div style="clear:both"></div>'
68
+ response.body.push '<div id="footnotes_debug">'
69
+ response.body.push 'Show:'
69
70
 
70
- notes = []
71
- notes.push ::Footnotes::Notes::SessionNote.new(self)
72
- notes.push ::Footnotes::Notes::FlashNote.new(self)
73
- notes.push ::Footnotes::Notes::CookiesNote.new(self.request)
74
- notes.push ::Footnotes::Notes::ParamsNote.new(self)
75
- notes.push ::Footnotes::Notes::SinatraRoutesNote.new(app)
76
- notes.push ::Footnotes::Notes::EnvNote.new(self)
77
- notes.push(::Footnotes::Notes::AssignsNote.new(self).tap do |note|
78
- note.ignored_assigns = [:@default_layout, :@app, :@template_cache,
79
- :@env, :@request, :@response, :@params,
80
- :@preferred_extension, :@_out_buf, :@_routes]
81
- end)
71
+ notes = []
72
+ notes.push ::Footnotes::Notes::SessionNote.new(self)
73
+ notes.push ::Footnotes::Notes::FlashNote.new(self)
74
+ notes.push ::Footnotes::Notes::CookiesNote.new(self.request)
75
+ notes.push ::Footnotes::Notes::ParamsNote.new(self)
76
+ notes.push ::Footnotes::Notes::SinatraRoutesNote.new(app)
77
+ notes.push ::Footnotes::Notes::EnvNote.new(self)
78
+ notes.push(::Footnotes::Notes::AssignsNote.new(self).tap do |note|
79
+ note.ignored_assigns = [:@default_layout, :@app, :@template_cache,
80
+ :@env, :@request, :@response, :@params,
81
+ :@preferred_extension, :@_out_buf, :@_routes]
82
+ end)
82
83
 
83
- response.body.push notes.map { |note| link_helper(note) }.join(' | ')
84
- response.body.push '<br />'
84
+ response.body.push notes.map { |note| link_helper(note) }.join(' | ')
85
+ response.body.push '<br />'
85
86
 
86
- response.body.push fieldsets(notes)
87
+ response.body.push fieldsets(notes)
87
88
 
88
- script_path = File.join(
89
- File.dirname(__FILE__), 'sinatra-footnotes', 'script.html')
90
- response.body.push(File.read(script_path))
89
+ script_path = File.join(
90
+ File.dirname(__FILE__), 'sinatra-footnotes', 'script.html')
91
+ response.body.push(File.read(script_path))
91
92
 
92
- response.body.push '</div>'
93
- response.body.push '<!-- End Footnotes -->'
93
+ response.body.push '</div>'
94
+ response.body.push '<!-- End Footnotes -->'
95
+ end
94
96
  end
95
97
  end
96
98
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-footnotes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Stutzman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-22 00:00:00.000000000 Z
11
+ date: 2013-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  version: '0'
98
98
  requirements: []
99
99
  rubyforge_project:
100
- rubygems_version: 2.0.3
100
+ rubygems_version: 2.0.6
101
101
  signing_key:
102
102
  specification_version: 4
103
103
  summary: Every page has footnotes that give information about your application.