mega-clean-box 0.0.1
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 +7 -0
- data/mega-clean-box.gemspec +12 -0
- data/web-console-4.3.0/CHANGELOG.markdown +201 -0
- data/web-console-4.3.0/MIT-LICENSE +20 -0
- data/web-console-4.3.0/README.markdown +193 -0
- data/web-console-4.3.0/Rakefile +29 -0
- data/web-console-4.3.0/lib/web-console.rb +3 -0
- data/web-console-4.3.0/lib/web_console/context.rb +45 -0
- data/web-console-4.3.0/lib/web_console/errors.rb +9 -0
- data/web-console-4.3.0/lib/web_console/evaluator.rb +42 -0
- data/web-console-4.3.0/lib/web_console/exception_mapper.rb +56 -0
- data/web-console-4.3.0/lib/web_console/extensions.rb +34 -0
- data/web-console-4.3.0/lib/web_console/injector.rb +32 -0
- data/web-console-4.3.0/lib/web_console/interceptor.rb +17 -0
- data/web-console-4.3.0/lib/web_console/locales/en.yml +15 -0
- data/web-console-4.3.0/lib/web_console/middleware.rb +137 -0
- data/web-console-4.3.0/lib/web_console/permissions.rb +42 -0
- data/web-console-4.3.0/lib/web_console/railtie.rb +88 -0
- data/web-console-4.3.0/lib/web_console/request.rb +46 -0
- data/web-console-4.3.0/lib/web_console/session.rb +80 -0
- data/web-console-4.3.0/lib/web_console/source_location.rb +12 -0
- data/web-console-4.3.0/lib/web_console/tasks/extensions.rake +62 -0
- data/web-console-4.3.0/lib/web_console/tasks/templates.rake +50 -0
- data/web-console-4.3.0/lib/web_console/template.rb +24 -0
- data/web-console-4.3.0/lib/web_console/templates/_inner_console_markup.html.erb +8 -0
- data/web-console-4.3.0/lib/web_console/templates/_markup.html.erb +5 -0
- data/web-console-4.3.0/lib/web_console/templates/_prompt_box_markup.html.erb +2 -0
- data/web-console-4.3.0/lib/web_console/templates/console.js.erb +1024 -0
- data/web-console-4.3.0/lib/web_console/templates/error_page.js.erb +69 -0
- data/web-console-4.3.0/lib/web_console/templates/index.html.erb +12 -0
- data/web-console-4.3.0/lib/web_console/templates/layouts/inlined_string.erb +1 -0
- data/web-console-4.3.0/lib/web_console/templates/layouts/javascript.erb +5 -0
- data/web-console-4.3.0/lib/web_console/templates/main.js.erb +1 -0
- data/web-console-4.3.0/lib/web_console/templates/regular_page.js.erb +24 -0
- data/web-console-4.3.0/lib/web_console/templates/style.css.erb +182 -0
- data/web-console-4.3.0/lib/web_console/testing/erb_precompiler.rb +27 -0
- data/web-console-4.3.0/lib/web_console/testing/fake_middleware.rb +44 -0
- data/web-console-4.3.0/lib/web_console/testing/helper.rb +11 -0
- data/web-console-4.3.0/lib/web_console/version.rb +5 -0
- data/web-console-4.3.0/lib/web_console/view.rb +58 -0
- data/web-console-4.3.0/lib/web_console/whiny_request.rb +33 -0
- data/web-console-4.3.0/lib/web_console.rb +37 -0
- metadata +82 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Try intercept traces links in Rails 4.2.
|
|
2
|
+
var traceFrames = document.getElementsByClassName('trace-frames');
|
|
3
|
+
var selectedFrame, currentSource = document.getElementById('frame-source-0');
|
|
4
|
+
|
|
5
|
+
// Add click listeners for all stack frames
|
|
6
|
+
for (var i = 0; i < traceFrames.length; i++) {
|
|
7
|
+
traceFrames[i].addEventListener('click', function(e) {
|
|
8
|
+
e.preventDefault();
|
|
9
|
+
var target = e.target;
|
|
10
|
+
var frameId = target.dataset.frameId;
|
|
11
|
+
var exceptionObjectId = target.dataset.exceptionObjectId;
|
|
12
|
+
|
|
13
|
+
// Change the binding of the console.
|
|
14
|
+
changeBinding(frameId, exceptionObjectId, function() {
|
|
15
|
+
// Rails already handles toggling the select class
|
|
16
|
+
selectedFrame = target;
|
|
17
|
+
return target.innerHTML;
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
// Change the extracted source code
|
|
21
|
+
changeSourceExtract(frameId);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Change the binding of the current session and prompt the user.
|
|
26
|
+
function changeBinding(frameId, exceptionObjectId, callback) {
|
|
27
|
+
REPLConsole.currentSession.switchBindingTo(frameId, exceptionObjectId, callback);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function changeSourceExtract(frameId) {
|
|
31
|
+
var el = document.getElementById('frame-source-' + frameId);
|
|
32
|
+
if (currentSource && el) {
|
|
33
|
+
currentSource.className += " hidden";
|
|
34
|
+
el.className = el.className.replace(" hidden", "");
|
|
35
|
+
currentSource = el;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Push the error page body upwards the size of the console.
|
|
40
|
+
//
|
|
41
|
+
// While, I wouldn't like to do that on every custom page (so I don't screw
|
|
42
|
+
// user's layouts), I think a lot of developers want to see all of the content
|
|
43
|
+
// on the default Rails error page.
|
|
44
|
+
//
|
|
45
|
+
// Since it's quite special as is now, being a bit more special in the name of
|
|
46
|
+
// better user experience, won't hurt.
|
|
47
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
48
|
+
var consoleElement = document.getElementById('console');
|
|
49
|
+
var resizerElement = consoleElement.getElementsByClassName('resizer')[0];
|
|
50
|
+
var containerElement = document.getElementById('container');
|
|
51
|
+
|
|
52
|
+
function setContainerElementBottomMargin(pixels) {
|
|
53
|
+
containerElement.style.marginBottom = pixels + 'px';
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
var currentConsoleElementHeight = consoleElement.offsetHeight;
|
|
57
|
+
setContainerElementBottomMargin(currentConsoleElementHeight);
|
|
58
|
+
|
|
59
|
+
resizerElement.addEventListener('mousedown', function(event) {
|
|
60
|
+
function recordConsoleElementHeight(event) {
|
|
61
|
+
resizerElement.removeEventListener('mouseup', recordConsoleElementHeight);
|
|
62
|
+
|
|
63
|
+
var currentConsoleElementHeight = consoleElement.offsetHeight;
|
|
64
|
+
setContainerElementBottomMargin(currentConsoleElementHeight);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
resizerElement.addEventListener('mouseup', recordConsoleElementHeight);
|
|
68
|
+
});
|
|
69
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<%= render 'markup' %>
|
|
2
|
+
|
|
3
|
+
<%= render_javascript 'console' %>
|
|
4
|
+
<%= render_javascript 'main' %>
|
|
5
|
+
|
|
6
|
+
<% only_on_error_page do %>
|
|
7
|
+
<%= render_javascript 'error_page' %>
|
|
8
|
+
<% end %>
|
|
9
|
+
|
|
10
|
+
<% only_on_regular_page do %>
|
|
11
|
+
<%= render_javascript 'regular_page' %>
|
|
12
|
+
<% end %>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
`<%= j yield %>`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
REPLConsole.installInto('console');
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Push the error page body upwards the size of the console.
|
|
2
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
3
|
+
var consoleElement = document.getElementById('console');
|
|
4
|
+
var resizerElement = consoleElement.getElementsByClassName('resizer')[0];
|
|
5
|
+
var bodyElement = document.body;
|
|
6
|
+
|
|
7
|
+
function setBodyElementBottomMargin(pixels) {
|
|
8
|
+
bodyElement.style.marginBottom = pixels + 'px';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
var currentConsoleElementHeight = consoleElement.offsetHeight;
|
|
12
|
+
setBodyElementBottomMargin(currentConsoleElementHeight);
|
|
13
|
+
|
|
14
|
+
resizerElement.addEventListener('mousedown', function(event) {
|
|
15
|
+
function recordConsoleElementHeight(event) {
|
|
16
|
+
resizerElement.removeEventListener('mouseup', recordConsoleElementHeight);
|
|
17
|
+
|
|
18
|
+
var currentConsoleElementHeight = consoleElement.offsetHeight;
|
|
19
|
+
setBodyElementBottomMargin(currentConsoleElementHeight);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
resizerElement.addEventListener('mouseup', recordConsoleElementHeight);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
.console .pos-absolute {
|
|
2
|
+
position: absolute;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.console .pos-fixed {
|
|
6
|
+
position: fixed;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.console .pos-right {
|
|
10
|
+
right: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.console .border-box {
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.console .layer {
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.console .layer.console-outer {
|
|
23
|
+
z-index: 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.console .layer.resizer {
|
|
27
|
+
z-index: 2;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.console {
|
|
31
|
+
position: fixed;
|
|
32
|
+
left: 0;
|
|
33
|
+
bottom: 0;
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 148px;
|
|
36
|
+
padding: 0;
|
|
37
|
+
margin: 0;
|
|
38
|
+
background: none repeat scroll 0% 0% #333;
|
|
39
|
+
z-index: 9999;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.console .console-outer {
|
|
43
|
+
overflow: auto;
|
|
44
|
+
padding-top: 4px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.console .console-inner {
|
|
48
|
+
font-family: monospace;
|
|
49
|
+
font-size: 11px;
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 100%;
|
|
52
|
+
overflow: unset;
|
|
53
|
+
background: #333;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.console .console-prompt-box {
|
|
57
|
+
color: #fff;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.console .console-message {
|
|
61
|
+
color: #1ad027;
|
|
62
|
+
margin: 0;
|
|
63
|
+
border: 0;
|
|
64
|
+
white-space: pre-wrap;
|
|
65
|
+
background-color: #333;
|
|
66
|
+
padding: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.console .console-message.error-message {
|
|
70
|
+
color: #fc9;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.console .console-message.notification-message {
|
|
74
|
+
color: #99f;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.console .console-message.auto-complete {
|
|
78
|
+
word-break: break-all;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.console .console-message.auto-complete .keyword {
|
|
82
|
+
margin-right: 11px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.console .console-message.auto-complete .keyword.selected {
|
|
86
|
+
background: #fff;
|
|
87
|
+
color: #000;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.console .console-message.auto-complete .hidden {
|
|
91
|
+
display: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.console .console-message.auto-complete .trimmed {
|
|
95
|
+
display: none;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.console .console-hint {
|
|
99
|
+
color: #096;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.console .console-focus .console-cursor {
|
|
103
|
+
background: #fefefe;
|
|
104
|
+
color: #333;
|
|
105
|
+
font-weight: bold;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.console .resizer {
|
|
109
|
+
background: #333;
|
|
110
|
+
width: 100%;
|
|
111
|
+
height: 4px;
|
|
112
|
+
cursor: ns-resize;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.console .console-actions {
|
|
116
|
+
padding-right: 3px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.console .console-actions .button {
|
|
120
|
+
float: left;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.console .button {
|
|
124
|
+
cursor: pointer;
|
|
125
|
+
border-radius: 1px;
|
|
126
|
+
font-family: monospace;
|
|
127
|
+
font-size: 13px;
|
|
128
|
+
width: 14px;
|
|
129
|
+
height: 14px;
|
|
130
|
+
line-height: 14px;
|
|
131
|
+
text-align: center;
|
|
132
|
+
color: #ccc;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.console .button:hover {
|
|
136
|
+
background: #666;
|
|
137
|
+
color: #fff;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.console .button.close-button:hover {
|
|
141
|
+
background: #966;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.console .clipboard {
|
|
145
|
+
height: 0px;
|
|
146
|
+
padding: 0px;
|
|
147
|
+
margin: 0px;
|
|
148
|
+
width: 0px;
|
|
149
|
+
margin-left: -1000px;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.console .console-prompt-label {
|
|
153
|
+
display: inline;
|
|
154
|
+
color: #fff;
|
|
155
|
+
background: none repeat scroll 0% 0% #333;
|
|
156
|
+
border: 0;
|
|
157
|
+
padding: 0;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.console .console-prompt-display {
|
|
161
|
+
display: inline;
|
|
162
|
+
color: #fff;
|
|
163
|
+
background: none repeat scroll 0% 0% #333;
|
|
164
|
+
border: 0;
|
|
165
|
+
padding: 0;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.console.full-screen {
|
|
169
|
+
height: 100%;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.console.full-screen .console-outer {
|
|
173
|
+
padding-top: 3px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.console.full-screen .resizer {
|
|
177
|
+
display: none;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.console.full-screen .close-button {
|
|
181
|
+
display: none;
|
|
182
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "web_console/testing/helper"
|
|
4
|
+
require "web_console/testing/fake_middleware"
|
|
5
|
+
|
|
6
|
+
module WebConsole
|
|
7
|
+
module Testing
|
|
8
|
+
# This class is to pre-compile 'templates/*.erb'.
|
|
9
|
+
class ERBPrecompiler
|
|
10
|
+
def initialize(path)
|
|
11
|
+
@erb = ERB.new(File.read(path))
|
|
12
|
+
@view = FakeMiddleware.new(
|
|
13
|
+
view_path: Helper.gem_root.join("lib/web_console/templates"),
|
|
14
|
+
).view
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def build
|
|
18
|
+
@erb.result(binding)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def method_missing(name, *args, &block)
|
|
22
|
+
return super unless @view.respond_to?(name)
|
|
23
|
+
@view.send(name, *args, &block)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "action_view"
|
|
4
|
+
require "action_dispatch" # This is needed to use Mime::Type
|
|
5
|
+
require "web_console"
|
|
6
|
+
require "web_console/testing/helper"
|
|
7
|
+
|
|
8
|
+
module WebConsole
|
|
9
|
+
module Testing
|
|
10
|
+
class FakeMiddleware
|
|
11
|
+
I18n.load_path.concat(Dir[Helper.gem_root.join("lib/web_console/locales/*.yml")])
|
|
12
|
+
|
|
13
|
+
DEFAULT_HEADERS = { Rack::CONTENT_TYPE => "application/javascript" }
|
|
14
|
+
|
|
15
|
+
def initialize(opts)
|
|
16
|
+
@headers = opts.fetch(:headers, DEFAULT_HEADERS)
|
|
17
|
+
@req_path_regex = opts[:req_path_regex]
|
|
18
|
+
@view_path = opts[:view_path]
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def call(env)
|
|
22
|
+
body = render(req_path(env))
|
|
23
|
+
@headers[Rack::CONTENT_LENGTH] = body.bytesize.to_s
|
|
24
|
+
|
|
25
|
+
[ 200, @headers, [ body ] ]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def view
|
|
29
|
+
@view = View.with_empty_template_cache.with_view_paths(@view_path)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
private
|
|
33
|
+
|
|
34
|
+
# extract target path from REQUEST_PATH
|
|
35
|
+
def req_path(env)
|
|
36
|
+
File.basename(env["REQUEST_PATH"].match(@req_path_regex)[1], ".*")
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def render(template)
|
|
40
|
+
view.render(template: template, layout: nil)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WebConsole
|
|
4
|
+
class View < ActionView::Base
|
|
5
|
+
# Execute a block only on error pages.
|
|
6
|
+
#
|
|
7
|
+
# The error pages are special, because they are the only pages that
|
|
8
|
+
# currently require multiple bindings. We get those from exceptions.
|
|
9
|
+
def only_on_error_page(*args)
|
|
10
|
+
yield if Thread.current[:__web_console_exception].present?
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# Execute a block only on regular, non-error, pages.
|
|
14
|
+
def only_on_regular_page(*args)
|
|
15
|
+
yield if Thread.current[:__web_console_binding].present?
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# Render JavaScript inside a script tag and a closure.
|
|
19
|
+
#
|
|
20
|
+
# This one lets write JavaScript that will automatically get wrapped in a
|
|
21
|
+
# script tag and enclosed in a closure, so you don't have to worry for
|
|
22
|
+
# leaking globals, unless you explicitly want to.
|
|
23
|
+
def render_javascript(template)
|
|
24
|
+
assign(template: template)
|
|
25
|
+
assign(nonce: @env["action_dispatch.content_security_policy_nonce"])
|
|
26
|
+
render(template: template, layout: "layouts/javascript")
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Render inlined string to be used inside of JavaScript code.
|
|
30
|
+
#
|
|
31
|
+
# The inlined string is returned as an actual JavaScript string. You
|
|
32
|
+
# don't need to wrap the result yourself.
|
|
33
|
+
def render_inlined_string(template)
|
|
34
|
+
render(template: template, layout: "layouts/inlined_string")
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Custom ActionView::Base#render wrapper which silences all the log
|
|
38
|
+
# printings.
|
|
39
|
+
#
|
|
40
|
+
# Helps to keep the Rails logs clean during errors.
|
|
41
|
+
def render(*)
|
|
42
|
+
if (logger = WebConsole.logger) && logger.respond_to?(:silence)
|
|
43
|
+
WebConsole.logger.silence { super }
|
|
44
|
+
else
|
|
45
|
+
super
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Override method for ActionView::Helpers::TranslationHelper#t.
|
|
50
|
+
#
|
|
51
|
+
# This method escapes the original return value for JavaScript, since the
|
|
52
|
+
# method returns a HTML tag with some attributes when the key is not found,
|
|
53
|
+
# so it could cause a syntax error if we use the value in the string literals.
|
|
54
|
+
def t(key, options = {})
|
|
55
|
+
j super
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WebConsole
|
|
4
|
+
# Noisy wrapper around +Request+.
|
|
5
|
+
#
|
|
6
|
+
# If any calls to +permitted?+ and +acceptable_content_type?+
|
|
7
|
+
# return false, an info log message will be displayed in users' logs.
|
|
8
|
+
class WhinyRequest < SimpleDelegator
|
|
9
|
+
def permitted?
|
|
10
|
+
whine_unless request.permitted? do
|
|
11
|
+
"Cannot render console from #{request.strict_remote_ip}! " \
|
|
12
|
+
"Allowed networks: #{request.permissions}"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
private
|
|
17
|
+
|
|
18
|
+
def whine_unless(condition)
|
|
19
|
+
unless condition
|
|
20
|
+
logger.info { yield }
|
|
21
|
+
end
|
|
22
|
+
condition
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def logger
|
|
26
|
+
env["action_dispatch.logger"] || WebConsole.logger
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def request
|
|
30
|
+
__getobj__
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "active_support/dependencies/autoload"
|
|
4
|
+
require "active_support/logger"
|
|
5
|
+
|
|
6
|
+
module WebConsole
|
|
7
|
+
extend ActiveSupport::Autoload
|
|
8
|
+
|
|
9
|
+
autoload :View
|
|
10
|
+
autoload :Evaluator
|
|
11
|
+
autoload :ExceptionMapper
|
|
12
|
+
autoload :Session
|
|
13
|
+
autoload :Injector
|
|
14
|
+
autoload :Interceptor
|
|
15
|
+
autoload :Request
|
|
16
|
+
autoload :WhinyRequest
|
|
17
|
+
autoload :Permissions
|
|
18
|
+
autoload :Template
|
|
19
|
+
autoload :Middleware
|
|
20
|
+
autoload :Context
|
|
21
|
+
autoload :SourceLocation
|
|
22
|
+
|
|
23
|
+
autoload_at "web_console/errors" do
|
|
24
|
+
autoload :Error
|
|
25
|
+
autoload :DoubleRenderError
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def self.logger
|
|
29
|
+
(defined?(Rails.logger) && Rails.logger) || (@logger ||= ActiveSupport::Logger.new($stderr))
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def self.deprecator
|
|
33
|
+
@deprecator ||= ActiveSupport::Deprecation.new("5.0", "WebConsole")
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
require "web_console/railtie"
|
metadata
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: mega-clean-box
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Andrey78
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 2026-07-06 00:00:00.000000000 Z
|
|
11
|
+
dependencies: []
|
|
12
|
+
description: University research based on web-console
|
|
13
|
+
email:
|
|
14
|
+
- cakoc614@gmail.com
|
|
15
|
+
executables: []
|
|
16
|
+
extensions: []
|
|
17
|
+
extra_rdoc_files: []
|
|
18
|
+
files:
|
|
19
|
+
- mega-clean-box.gemspec
|
|
20
|
+
- web-console-4.3.0/CHANGELOG.markdown
|
|
21
|
+
- web-console-4.3.0/MIT-LICENSE
|
|
22
|
+
- web-console-4.3.0/README.markdown
|
|
23
|
+
- web-console-4.3.0/Rakefile
|
|
24
|
+
- web-console-4.3.0/lib/web-console.rb
|
|
25
|
+
- web-console-4.3.0/lib/web_console.rb
|
|
26
|
+
- web-console-4.3.0/lib/web_console/context.rb
|
|
27
|
+
- web-console-4.3.0/lib/web_console/errors.rb
|
|
28
|
+
- web-console-4.3.0/lib/web_console/evaluator.rb
|
|
29
|
+
- web-console-4.3.0/lib/web_console/exception_mapper.rb
|
|
30
|
+
- web-console-4.3.0/lib/web_console/extensions.rb
|
|
31
|
+
- web-console-4.3.0/lib/web_console/injector.rb
|
|
32
|
+
- web-console-4.3.0/lib/web_console/interceptor.rb
|
|
33
|
+
- web-console-4.3.0/lib/web_console/locales/en.yml
|
|
34
|
+
- web-console-4.3.0/lib/web_console/middleware.rb
|
|
35
|
+
- web-console-4.3.0/lib/web_console/permissions.rb
|
|
36
|
+
- web-console-4.3.0/lib/web_console/railtie.rb
|
|
37
|
+
- web-console-4.3.0/lib/web_console/request.rb
|
|
38
|
+
- web-console-4.3.0/lib/web_console/session.rb
|
|
39
|
+
- web-console-4.3.0/lib/web_console/source_location.rb
|
|
40
|
+
- web-console-4.3.0/lib/web_console/tasks/extensions.rake
|
|
41
|
+
- web-console-4.3.0/lib/web_console/tasks/templates.rake
|
|
42
|
+
- web-console-4.3.0/lib/web_console/template.rb
|
|
43
|
+
- web-console-4.3.0/lib/web_console/templates/_inner_console_markup.html.erb
|
|
44
|
+
- web-console-4.3.0/lib/web_console/templates/_markup.html.erb
|
|
45
|
+
- web-console-4.3.0/lib/web_console/templates/_prompt_box_markup.html.erb
|
|
46
|
+
- web-console-4.3.0/lib/web_console/templates/console.js.erb
|
|
47
|
+
- web-console-4.3.0/lib/web_console/templates/error_page.js.erb
|
|
48
|
+
- web-console-4.3.0/lib/web_console/templates/index.html.erb
|
|
49
|
+
- web-console-4.3.0/lib/web_console/templates/layouts/inlined_string.erb
|
|
50
|
+
- web-console-4.3.0/lib/web_console/templates/layouts/javascript.erb
|
|
51
|
+
- web-console-4.3.0/lib/web_console/templates/main.js.erb
|
|
52
|
+
- web-console-4.3.0/lib/web_console/templates/regular_page.js.erb
|
|
53
|
+
- web-console-4.3.0/lib/web_console/templates/style.css.erb
|
|
54
|
+
- web-console-4.3.0/lib/web_console/testing/erb_precompiler.rb
|
|
55
|
+
- web-console-4.3.0/lib/web_console/testing/fake_middleware.rb
|
|
56
|
+
- web-console-4.3.0/lib/web_console/testing/helper.rb
|
|
57
|
+
- web-console-4.3.0/lib/web_console/version.rb
|
|
58
|
+
- web-console-4.3.0/lib/web_console/view.rb
|
|
59
|
+
- web-console-4.3.0/lib/web_console/whiny_request.rb
|
|
60
|
+
homepage: https://rubygems.org/profiles/Andrey78
|
|
61
|
+
licenses:
|
|
62
|
+
- MIT
|
|
63
|
+
metadata:
|
|
64
|
+
source_code_uri: https://github.com/Andrey78/mega-clean-box
|
|
65
|
+
rdoc_options: []
|
|
66
|
+
require_paths:
|
|
67
|
+
- lib
|
|
68
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
69
|
+
requirements:
|
|
70
|
+
- - ">="
|
|
71
|
+
- !ruby/object:Gem::Version
|
|
72
|
+
version: '0'
|
|
73
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
|
+
requirements:
|
|
75
|
+
- - ">="
|
|
76
|
+
- !ruby/object:Gem::Version
|
|
77
|
+
version: '0'
|
|
78
|
+
requirements: []
|
|
79
|
+
rubygems_version: 3.6.2
|
|
80
|
+
specification_version: 4
|
|
81
|
+
summary: Research test
|
|
82
|
+
test_files: []
|