rails-web-console 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/console_controller.rb +7 -1
- data/config/routes.rb +1 -1
- metadata +21 -39
@@ -10,11 +10,17 @@ class ConsoleController < ApplicationController
|
|
10
10
|
begin
|
11
11
|
result_eval = eval params[:script], binding
|
12
12
|
$stdout.rewind
|
13
|
-
result = %Q{<div class="stdout">#{$stdout.read}</div
|
13
|
+
result = %Q{<div class="stdout">#{escape $stdout.read}</div>
|
14
|
+
<div class="return">#{escape result_eval.inspect}</div>}
|
14
15
|
rescue Exception => e
|
15
16
|
result = e.to_s
|
16
17
|
end
|
17
18
|
$stdout = stdout_orig
|
18
19
|
render text: result.gsub("\n", "<br />\n")
|
19
20
|
end
|
21
|
+
|
22
|
+
private
|
23
|
+
def escape(content)
|
24
|
+
view_context.escape_once content
|
25
|
+
end
|
20
26
|
end
|
data/config/routes.rb
CHANGED
metadata
CHANGED
@@ -1,32 +1,23 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-web-console
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 4
|
9
|
-
version: 0.0.4
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Rodrigo Rosenfeld Rosas
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
date: 2010-11-22 00:00:00 -02:00
|
18
|
-
default_executable:
|
12
|
+
date: 2011-07-15 00:00:00.000000000Z
|
19
13
|
dependencies: []
|
20
|
-
|
21
14
|
description:
|
22
|
-
email:
|
15
|
+
email: rr.rosas@gmail.com
|
23
16
|
executables: []
|
24
|
-
|
25
17
|
extensions: []
|
26
|
-
|
27
|
-
extra_rdoc_files:
|
18
|
+
extra_rdoc_files:
|
28
19
|
- README.markdown
|
29
|
-
files:
|
20
|
+
files:
|
30
21
|
- app/controllers/console_controller.rb
|
31
22
|
- app/views/console/index.html.erb
|
32
23
|
- app/views/layouts/console.html.erb
|
@@ -35,37 +26,28 @@ files:
|
|
35
26
|
- public/javascripts/console.js
|
36
27
|
- public/stylesheets/console.css
|
37
28
|
- README.markdown
|
38
|
-
has_rdoc: true
|
39
29
|
homepage: https://github.com/rosenfeld/rails-web-console
|
40
30
|
licenses: []
|
41
|
-
|
42
31
|
post_install_message:
|
43
32
|
rdoc_options: []
|
44
|
-
|
45
|
-
require_paths:
|
33
|
+
require_paths:
|
46
34
|
- lib
|
47
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
35
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
36
|
none: false
|
49
|
-
requirements:
|
50
|
-
- -
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
|
53
|
-
|
54
|
-
version: "0"
|
55
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
42
|
none: false
|
57
|
-
requirements:
|
58
|
-
- -
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
|
61
|
-
- 0
|
62
|
-
version: "0"
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
63
47
|
requirements: []
|
64
|
-
|
65
48
|
rubyforge_project:
|
66
|
-
rubygems_version: 1.
|
49
|
+
rubygems_version: 1.8.5
|
67
50
|
signing_key:
|
68
51
|
specification_version: 3
|
69
52
|
summary: A web console for Rails
|
70
53
|
test_files: []
|
71
|
-
|