sinatra-footnotes 0.1.3 → 0.1.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f26b2b3a5a935c2e5a1c4966cef93dbf2d27f379
|
4
|
+
data.tar.gz: 4cc42a532182d82de797cf2f923e6a4f646709ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c297e1b146728e8186b616b049e560ec77083795923f468c2b505c89fcd5b7b6576e61da3a55e72d1506e6f9c0c36cd3e5898536f02ce14f1e5171c26adb9144
|
7
|
+
data.tar.gz: db5434c48e7531decb9731f96889443d80012c71ccf432e632cf824b0c994b9bbfb9b1e1625ce3ffd5ca970ca3a7afb41c0be582aee11fda9c712f74d0bdc286
|
@@ -162,7 +162,7 @@ module Footnotes
|
|
162
162
|
def mount_table_for_hash(hash, options={})
|
163
163
|
rows = []
|
164
164
|
hash.each do |key, value|
|
165
|
-
rows << [ key.
|
165
|
+
rows << [ escape(key.inspect), escape(value.inspect) ]
|
166
166
|
end
|
167
167
|
mount_table(rows.unshift(['Name', 'Value']), {:class => 'name_value'}.merge(options))
|
168
168
|
end
|
@@ -4,7 +4,7 @@ module Footnotes
|
|
4
4
|
module Notes
|
5
5
|
class ParamsNote < AbstractNote
|
6
6
|
def initialize(controller)
|
7
|
-
@params = controller.params
|
7
|
+
@params = make_keys_strings(controller.params)
|
8
8
|
end
|
9
9
|
|
10
10
|
def title
|
@@ -14,6 +14,14 @@ module Footnotes
|
|
14
14
|
def content
|
15
15
|
mount_table_for_hash(@params, :summary => "Debug information for #{title}")
|
16
16
|
end
|
17
|
+
|
18
|
+
private
|
19
|
+
def make_keys_strings(hash)
|
20
|
+
hash.inject({}) do |output, key_value|
|
21
|
+
key, value = key_value
|
22
|
+
output.update({ key.to_s => value })
|
23
|
+
end
|
24
|
+
end
|
17
25
|
end
|
18
26
|
end
|
19
27
|
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.4
|
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-10-
|
11
|
+
date: 2013-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|