web-console 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of web-console might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/web_console/extensions.rb +19 -0
- data/lib/web_console/railtie.rb +1 -12
- data/lib/web_console/templates/{_inner_console_markup.html → _inner_console_markup.html.erb} +0 -0
- data/lib/web_console/templates/{_markup.html → _markup.html.erb} +0 -0
- data/lib/web_console/templates/{_prompt_box_markup.html → _prompt_box_markup.html.erb} +0 -0
- data/lib/web_console/templates/{console.js → console.js.erb} +0 -0
- data/lib/web_console/templates/{error_page.js → error_page.js.erb} +0 -0
- data/lib/web_console/templates/{index.html → index.html.erb} +0 -0
- data/lib/web_console/templates/{main.js → main.js.erb} +0 -0
- data/lib/web_console/templates/{style.css → style.css.erb} +0 -0
- data/lib/web_console/tracer.rb +11 -0
- data/lib/web_console/version.rb +1 -1
- data/test/dummy/app/controllers/helper_error_controller.rb +4 -0
- data/test/dummy/app/views/helper_error/index.html.erb +2 -0
- data/test/dummy/config/routes.rb +1 -0
- data/test/dummy/log/development.log +81 -0
- data/test/dummy/log/test.log +12770 -0
- data/test/web_console/extensions_test.rb +28 -0
- metadata +18 -10
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'web_console/extensions'
|
3
|
+
|
4
|
+
module ActionDispatch
|
5
|
+
class DebugExceptionsTest < ActionDispatch::IntegrationTest
|
6
|
+
class Application
|
7
|
+
def call(env)
|
8
|
+
ActionView::Base.new.render(inline: '<% @ivar = 42 %> <%= nil.raise %></h1')
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
setup do
|
13
|
+
Request.stubs(:whitelisted_ips).returns(IPAddr.new('0.0.0.0/0'))
|
14
|
+
|
15
|
+
@app = DebugExceptions.new(Application.new)
|
16
|
+
end
|
17
|
+
|
18
|
+
test "follows ActionView::Template::Error original error in env['web_console.exception']" do
|
19
|
+
get "/", {}, {
|
20
|
+
'action_dispatch.show_detailed_exceptions' => true,
|
21
|
+
'action_dispatch.show_exceptions' => true,
|
22
|
+
'action_dispatch.logger' => Logger.new(StringIO.new)
|
23
|
+
}
|
24
|
+
|
25
|
+
assert_equal 42, request.env['web_console.exception'].bindings.first.eval('@ivar')
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web-console
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charlie Somerville
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2015-03-
|
14
|
+
date: 2015-03-12 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: railties
|
@@ -120,6 +120,7 @@ files:
|
|
120
120
|
- lib/web_console.rb
|
121
121
|
- lib/web_console/errors.rb
|
122
122
|
- lib/web_console/evaluator.rb
|
123
|
+
- lib/web_console/extensions.rb
|
123
124
|
- lib/web_console/helper.rb
|
124
125
|
- lib/web_console/integration.rb
|
125
126
|
- lib/web_console/integration/cruby.rb
|
@@ -130,16 +131,17 @@ files:
|
|
130
131
|
- lib/web_console/request.rb
|
131
132
|
- lib/web_console/session.rb
|
132
133
|
- lib/web_console/template.rb
|
133
|
-
- lib/web_console/templates/_inner_console_markup.html
|
134
|
-
- lib/web_console/templates/_markup.html
|
135
|
-
- lib/web_console/templates/_prompt_box_markup.html
|
136
|
-
- lib/web_console/templates/console.js
|
137
|
-
- lib/web_console/templates/error_page.js
|
138
|
-
- lib/web_console/templates/index.html
|
134
|
+
- lib/web_console/templates/_inner_console_markup.html.erb
|
135
|
+
- lib/web_console/templates/_markup.html.erb
|
136
|
+
- lib/web_console/templates/_prompt_box_markup.html.erb
|
137
|
+
- lib/web_console/templates/console.js.erb
|
138
|
+
- lib/web_console/templates/error_page.js.erb
|
139
|
+
- lib/web_console/templates/index.html.erb
|
139
140
|
- lib/web_console/templates/layouts/inlined_string.erb
|
140
141
|
- lib/web_console/templates/layouts/javascript.erb
|
141
|
-
- lib/web_console/templates/main.js
|
142
|
-
- lib/web_console/templates/style.css
|
142
|
+
- lib/web_console/templates/main.js.erb
|
143
|
+
- lib/web_console/templates/style.css.erb
|
144
|
+
- lib/web_console/tracer.rb
|
143
145
|
- lib/web_console/version.rb
|
144
146
|
- lib/web_console/whiny_request.rb
|
145
147
|
- lib/web_console/whitelist.rb
|
@@ -150,11 +152,13 @@ files:
|
|
150
152
|
- test/dummy/app/controllers/application_controller.rb
|
151
153
|
- test/dummy/app/controllers/controller_helper_test_controller.rb
|
152
154
|
- test/dummy/app/controllers/exception_test_controller.rb
|
155
|
+
- test/dummy/app/controllers/helper_error_controller.rb
|
153
156
|
- test/dummy/app/controllers/helper_test_controller.rb
|
154
157
|
- test/dummy/app/controllers/tests_controller.rb
|
155
158
|
- test/dummy/app/helpers/application_helper.rb
|
156
159
|
- test/dummy/app/views/controller_helper_test/index.html.erb
|
157
160
|
- test/dummy/app/views/exception_test/xhr.html.erb
|
161
|
+
- test/dummy/app/views/helper_error/index.html.erb
|
158
162
|
- test/dummy/app/views/helper_test/index.html.erb
|
159
163
|
- test/dummy/app/views/layouts/application.html.erb
|
160
164
|
- test/dummy/bin/bundle
|
@@ -238,6 +242,7 @@ files:
|
|
238
242
|
- test/support/scenarios/reraised_scenario.rb
|
239
243
|
- test/test_helper.rb
|
240
244
|
- test/web_console/evaluator_test.rb
|
245
|
+
- test/web_console/extensions_test.rb
|
241
246
|
- test/web_console/helper_test.rb
|
242
247
|
- test/web_console/integration_test.rb
|
243
248
|
- test/web_console/middleware_test.rb
|
@@ -276,11 +281,13 @@ test_files:
|
|
276
281
|
- test/dummy/app/controllers/application_controller.rb
|
277
282
|
- test/dummy/app/controllers/controller_helper_test_controller.rb
|
278
283
|
- test/dummy/app/controllers/exception_test_controller.rb
|
284
|
+
- test/dummy/app/controllers/helper_error_controller.rb
|
279
285
|
- test/dummy/app/controllers/helper_test_controller.rb
|
280
286
|
- test/dummy/app/controllers/tests_controller.rb
|
281
287
|
- test/dummy/app/helpers/application_helper.rb
|
282
288
|
- test/dummy/app/views/controller_helper_test/index.html.erb
|
283
289
|
- test/dummy/app/views/exception_test/xhr.html.erb
|
290
|
+
- test/dummy/app/views/helper_error/index.html.erb
|
284
291
|
- test/dummy/app/views/helper_test/index.html.erb
|
285
292
|
- test/dummy/app/views/layouts/application.html.erb
|
286
293
|
- test/dummy/bin/bundle
|
@@ -366,6 +373,7 @@ test_files:
|
|
366
373
|
- test/support/scenarios/reraised_scenario.rb
|
367
374
|
- test/test_helper.rb
|
368
375
|
- test/web_console/evaluator_test.rb
|
376
|
+
- test/web_console/extensions_test.rb
|
369
377
|
- test/web_console/helper_test.rb
|
370
378
|
- test/web_console/integration_test.rb
|
371
379
|
- test/web_console/middleware_test.rb
|