sinatra-footnotes 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sinatra-footnotes/version.rb +1 -1
- data/lib/sinatra-footnotes.rb +27 -25
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b8818eb7cef08c90c1f3836c3faac6842d797a0
|
4
|
+
data.tar.gz: 880540a36749519b1121f380977073b39422d203
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 933161b8a6b1556a9e1010df3fea9bfb5769a01eec69decea2cf175ad0b3e4c925108173a4d52d4154aa88cbf6171b26b2acde1c7a6eb435d255b2cf1e791ccd
|
7
|
+
data.tar.gz: 6a0193f18551c6b48176695444459253946905c3ae6aef74116a556dd3b77e4cfe25b5e3e033cd866a5a7ea49e553ff4f4145017a67475afbd9c0aa1017f1e31
|
data/lib/sinatra-footnotes.rb
CHANGED
@@ -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
|
63
|
+
if response.body.respond_to? :push
|
64
|
+
response.body.push File.read(style_path)
|
64
65
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
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
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
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
|
-
|
84
|
-
|
84
|
+
response.body.push notes.map { |note| link_helper(note) }.join(' | ')
|
85
|
+
response.body.push '<br />'
|
85
86
|
|
86
|
-
|
87
|
+
response.body.push fieldsets(notes)
|
87
88
|
|
88
|
-
|
89
|
-
|
90
|
-
|
89
|
+
script_path = File.join(
|
90
|
+
File.dirname(__FILE__), 'sinatra-footnotes', 'script.html')
|
91
|
+
response.body.push(File.read(script_path))
|
91
92
|
|
92
|
-
|
93
|
-
|
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.
|
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-
|
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.
|
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.
|