jsonrpc2 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -53,5 +53,5 @@ EOD
53
53
  gem.version = JSONRPC2::VERSION
54
54
  gem.add_dependency("httpclient")
55
55
  gem.add_dependency("json")
56
- gem.add_development_dependency("RedCloth")
56
+ gem.add_dependency("RedCloth")
57
57
  end
@@ -131,11 +131,17 @@ HTML5
131
131
  </form>
132
132
  </div>
133
133
  <div class="span6">
134
- <pre style="white-space: prewrap">#{CGI.escapeHTML(JSON.pretty_unparse(JSON.parse(options[:result])))}</pre>
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
@@ -1,5 +1,5 @@
1
1
  # JSONRPC2 namespace module
2
2
  module JSONRPC2
3
3
  # Version
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
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: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
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: :development
60
+ type: :runtime
61
61
  version_requirements: *id003
62
62
  description: |+
63
63
  == Description