jsonrpc2 0.0.3 → 0.0.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.
- data/jsonrpc2.gemspec +1 -1
- data/lib/jsonrpc2/html.rb +7 -1
- data/lib/jsonrpc2/version.rb +1 -1
- metadata +4 -4
data/jsonrpc2.gemspec
CHANGED
data/lib/jsonrpc2/html.rb
CHANGED
|
@@ -131,11 +131,17 @@ HTML5
|
|
|
131
131
|
</form>
|
|
132
132
|
</div>
|
|
133
133
|
<div class="span6">
|
|
134
|
-
<pre style="white-space: prewrap">#{
|
|
134
|
+
<pre style="white-space: prewrap">#{format_result(options[:result])}</pre>
|
|
135
135
|
</div>
|
|
136
136
|
</div>
|
|
137
137
|
|
|
138
138
|
EOS
|
|
139
139
|
end
|
|
140
|
+
# Format JSON result
|
|
141
|
+
def format_result(result)
|
|
142
|
+
CGI.escapeHTML(JSON.pretty_unparse(JSON.parse(result)))
|
|
143
|
+
rescue Exception
|
|
144
|
+
result
|
|
145
|
+
end
|
|
140
146
|
end
|
|
141
147
|
end
|
data/lib/jsonrpc2/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jsonrpc2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 23
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 0.0.
|
|
9
|
+
- 4
|
|
10
|
+
version: 0.0.4
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Geoff Youngs
|
|
@@ -57,7 +57,7 @@ dependencies:
|
|
|
57
57
|
segments:
|
|
58
58
|
- 0
|
|
59
59
|
version: "0"
|
|
60
|
-
type: :
|
|
60
|
+
type: :runtime
|
|
61
61
|
version_requirements: *id003
|
|
62
62
|
description: |+
|
|
63
63
|
== Description
|