rack_web_console 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: 314e65918f28b885675d30dcb5bcf1ae6463bef3
4
- data.tar.gz: 5f0280aeba099f083cdf14e1fb1e1d4a1d3c9dcd
3
+ metadata.gz: b8df7ebd7c2bf7f065af4d93d02aca882aa895bf
4
+ data.tar.gz: 11657a6c47ccb675fe17b308e292ef54f9f6fb2a
5
5
  SHA512:
6
- metadata.gz: ad8b22b9a10a50e2915640531d076423d9e9a11a9323230723fd9d033b0de0340aba07da2c73a31a772ae0780403b8f05bc7c4d1da682733d14f13dc2b43020f
7
- data.tar.gz: 7c172dd60203277bd8115ea402af16d44e45685fab81f1f01530933a6c7ea02bb3268ab1ff2e83e01ef053a8aed5a557ef74e44a61984ca179bb298476fd63ba
6
+ metadata.gz: 23825c6773b9cfeb8cfda5f28cda42b9f5b96c690eb233e90625742fb1cb3a491c9599f1545a359efbda2de49ba6579eddfce8fb409d9b1e1b278f5692a6e96c
7
+ data.tar.gz: 69ddee769f14e56eac0976f8159d84ae3a4af541f2454fa3a616ab89a3bc92e5cd29f28bca430b2b3df8e3b08324636d0e69574cd38099a505cc237ad2c0f5b5
@@ -6,6 +6,7 @@
6
6
  #script { width: 100% }
7
7
  .console_result, .return { white-space: pre-wrap; }
8
8
  .return { background-color: blue }
9
+ .error { background-color: red; color: white; font-weight: bold }
9
10
  .console_result {
10
11
  background-color: black;
11
12
  color: white;
@@ -1,3 +1,3 @@
1
1
  class RackConsole
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
@@ -20,7 +20,6 @@ class RackConsole
20
20
 
21
21
  private
22
22
 
23
-
24
23
  def process_script(env)
25
24
  params = CGI.parse env['rack.input'].read
26
25
  token = params['token']&.first.to_s
@@ -34,7 +33,9 @@ class RackConsole
34
33
  result << %Q{<div class="stdout">#{::ERB::Util.h oc.output}</div>}
35
34
  result << %Q{<div class="return">#{::ERB::Util.h result_eval.inspect}</div>}
36
35
  rescue ::Exception => e
37
- result << e.message << "\n" << e.backtrace.join("\n")
36
+ message = ::ERB::Util.h "#{e.message}\n#{e.backtrace.join "\n"}"
37
+ result << %Q{<div class="stdout">#{::ERB::Util.h oc.output}</div>}
38
+ result << %Q{<div class="error">#{message}</div>}
38
39
  end
39
40
  end
40
41
  headers = { 'Content-Type' => 'text/html; charset=utf-8' }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack_web_console
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Rosenfeld Rosas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-28 00:00:00.000000000 Z
11
+ date: 2017-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  requirements: []
111
111
  rubyforge_project:
112
- rubygems_version: 2.5.1
112
+ rubygems_version: 2.6.8
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: A web console for Rack apps.