web-console 2.1.3 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.markdown +45 -0
  3. data/README.markdown +26 -6
  4. data/Rakefile +37 -0
  5. data/lib/web_console/extensions.rb +2 -1
  6. data/lib/web_console/integration/cruby.rb +2 -1
  7. data/lib/web_console/integration/rubinius.rb +2 -1
  8. data/lib/web_console/railtie.rb +19 -1
  9. data/lib/web_console/session.rb +4 -3
  10. data/lib/web_console/templates/_inner_console_markup.html.erb +8 -3
  11. data/lib/web_console/templates/console.js.erb +169 -46
  12. data/lib/web_console/templates/error_page.js.erb +2 -15
  13. data/lib/web_console/templates/main.js.erb +1 -24
  14. data/lib/web_console/templates/style.css.erb +22 -9
  15. data/lib/web_console/tracer.rb +11 -0
  16. data/lib/web_console/version.rb +1 -1
  17. metadata +5 -155
  18. data/test/dummy/README.rdoc +0 -28
  19. data/test/dummy/Rakefile +0 -6
  20. data/test/dummy/app/assets/javascripts/application.js +0 -13
  21. data/test/dummy/app/assets/stylesheets/application.css +0 -13
  22. data/test/dummy/app/controllers/application_controller.rb +0 -5
  23. data/test/dummy/app/controllers/controller_helper_test_controller.rb +0 -7
  24. data/test/dummy/app/controllers/exception_test_controller.rb +0 -15
  25. data/test/dummy/app/controllers/helper_error_controller.rb +0 -4
  26. data/test/dummy/app/controllers/helper_test_controller.rb +0 -5
  27. data/test/dummy/app/controllers/tests_controller.rb +0 -16
  28. data/test/dummy/app/helpers/application_helper.rb +0 -2
  29. data/test/dummy/app/views/controller_helper_test/index.html.erb +0 -1
  30. data/test/dummy/app/views/exception_test/xhr.html.erb +0 -1
  31. data/test/dummy/app/views/helper_error/index.html.erb +0 -2
  32. data/test/dummy/app/views/helper_test/index.html.erb +0 -220
  33. data/test/dummy/app/views/layouts/application.html.erb +0 -16
  34. data/test/dummy/bin/bundle +0 -3
  35. data/test/dummy/bin/rails +0 -4
  36. data/test/dummy/bin/rake +0 -4
  37. data/test/dummy/config.ru +0 -4
  38. data/test/dummy/config/application.rb +0 -19
  39. data/test/dummy/config/boot.rb +0 -5
  40. data/test/dummy/config/database.yml +0 -25
  41. data/test/dummy/config/environment.rb +0 -5
  42. data/test/dummy/config/environments/development.rb +0 -29
  43. data/test/dummy/config/environments/production.rb +0 -80
  44. data/test/dummy/config/environments/test.rb +0 -34
  45. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  46. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  47. data/test/dummy/config/initializers/inflections.rb +0 -16
  48. data/test/dummy/config/initializers/mime_types.rb +0 -5
  49. data/test/dummy/config/initializers/secret_token.rb +0 -12
  50. data/test/dummy/config/initializers/session_store.rb +0 -3
  51. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  52. data/test/dummy/config/locales/en.yml +0 -23
  53. data/test/dummy/config/routes.rb +0 -15
  54. data/test/dummy/db/schema.rb +0 -16
  55. data/test/dummy/db/test.sqlite3 +0 -0
  56. data/test/dummy/log/test.log +0 -808
  57. data/test/dummy/public/404.html +0 -58
  58. data/test/dummy/public/422.html +0 -58
  59. data/test/dummy/public/500.html +0 -57
  60. data/test/dummy/public/favicon.ico +0 -0
  61. data/test/dummy/tmp/cache/assets/test/sprockets/0c9b99b1b975b36a5b686845ae729db3 +0 -0
  62. data/test/dummy/tmp/cache/assets/test/sprockets/12e9f58adcf819cf65fd68b6859a438f +0 -0
  63. data/test/dummy/tmp/cache/assets/test/sprockets/1fd6abead3df36a4e4a2cb042a551b39 +0 -0
  64. data/test/dummy/tmp/cache/assets/test/sprockets/33b5eb81b5aaaa1e6dd5dcb6517792b4 +0 -0
  65. data/test/dummy/tmp/cache/assets/test/sprockets/3e460b2e021085f88b5597b38d194932 +0 -0
  66. data/test/dummy/tmp/cache/assets/test/sprockets/52f04b2ea6e461f4661b6d0be393fa94 +0 -0
  67. data/test/dummy/tmp/cache/assets/test/sprockets/688c344c2919f882338f06c5daaea209 +0 -0
  68. data/test/dummy/tmp/cache/assets/test/sprockets/7f079298e19bbef40a5d6a37dc03033a +0 -0
  69. data/test/dummy/tmp/cache/assets/test/sprockets/91aa709f89e465f58056fabe5f75eef4 +0 -0
  70. data/test/dummy/tmp/cache/assets/test/sprockets/95f4e4e5217aec9f71b2c1a65a9a9231 +0 -0
  71. data/test/dummy/tmp/cache/assets/test/sprockets/9c41be9b6625756fbb6d05b7665dd911 +0 -0
  72. data/test/dummy/tmp/cache/assets/test/sprockets/a95f64d41fcf8244b8f5b84a55f07822 +0 -0
  73. data/test/dummy/tmp/cache/assets/test/sprockets/c5e6bf1efd5929bee63e28ad7c9f6f83 +0 -0
  74. data/test/dummy/tmp/cache/assets/test/sprockets/d863259e9eeca657a1624135cfe24446 +0 -0
  75. data/test/dummy/tmp/cache/assets/test/sprockets/e1d2fc4601b6423ec8a42415ee05dd14 +0 -0
  76. data/test/dummy/tmp/cache/assets/test/sprockets/e82616536a759c2e87d703adc77d65da +0 -0
  77. data/test/support/scenarios/bad_custom_error_scenario.rb +0 -17
  78. data/test/support/scenarios/basic_nested_scenario.rb +0 -15
  79. data/test/support/scenarios/custom_error_scenario.rb +0 -11
  80. data/test/support/scenarios/eval_nested_scenario.rb +0 -15
  81. data/test/support/scenarios/flat_scenario.rb +0 -9
  82. data/test/support/scenarios/reraised_scenario.rb +0 -21
  83. data/test/test_helper.rb +0 -78
  84. data/test/web_console/evaluator_test.rb +0 -73
  85. data/test/web_console/extensions_test.rb +0 -28
  86. data/test/web_console/helper_test.rb +0 -76
  87. data/test/web_console/integration_test.rb +0 -47
  88. data/test/web_console/middleware_test.rb +0 -116
  89. data/test/web_console/railtie_test.rb +0 -99
  90. data/test/web_console/request_test.rb +0 -82
  91. data/test/web_console/session_test.rb +0 -59
  92. data/test/web_console/whiny_request_test.rb +0 -33
  93. data/test/web_console/whitelist_test.rb +0 -43
@@ -25,20 +25,7 @@ for (var i = 0; i < traceFrames.length; i++) {
25
25
  }
26
26
 
27
27
  function changeBinding(frameId, callback) {
28
- var consoleEl = document.getElementById('console');
29
- if (! consoleEl) { return; }
30
- var url = consoleEl.dataset.remotePath + "/trace";
31
- var params = "frame_id=" + encodeURIComponent(frameId);
32
- var xhr = new XMLHttpRequest();
33
- xhr.open("POST", url, true);
34
- xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
35
- xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
36
- xhr.send(params);
37
- xhr.onreadystatechange = function() {
38
- if (xhr.readyState === 4) {
39
- callback();
40
- }
41
- }
28
+ REPLConsole.currentSession.switchBindingTo(frameId, callback);
42
29
  }
43
30
 
44
31
  function changeSourceExtract(frameId) {
@@ -60,7 +47,7 @@ function changeSourceExtract(frameId) {
60
47
  // better user experience, won't hurt.
61
48
  document.addEventListener('DOMContentLoaded', function() {
62
49
  var consoleElement = document.getElementById('console');
63
- var resizerElement = document.getElementById('resizer')
50
+ var resizerElement = consoleElement.getElementsByClassName('resizer')[0];
64
51
  var containerElement = document.getElementById('container');
65
52
 
66
53
  function setContainerElementBottomMargin(pixels) {
@@ -1,24 +1 @@
1
- var consoleDiv = document.getElementById('console');
2
- var replConsole = new REPLConsole({
3
- promptLabel: consoleDiv.dataset.initialPrompt,
4
- commandHandle: function(line) {
5
- var _this = this;
6
- var xhr = new XMLHttpRequest();
7
- var url = consoleDiv.dataset.remotePath;
8
- var params = "input=" + encodeURIComponent(line);
9
-
10
- xhr.open("PUT", url, true);
11
- xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
12
- xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
13
- xhr.send(params);
14
-
15
- xhr.onreadystatechange = function() {
16
- if (xhr.readyState === 4) {
17
- var response = JSON.parse(xhr.responseText);
18
- _this.writeOutput(response.output);
19
- }
20
- }
21
- }
22
- });
23
-
24
- replConsole.install(consoleDiv);
1
+ REPLConsole.installInto('console');
@@ -1,9 +1,22 @@
1
- #console { position: fixed; left: 0; bottom: 0; width: 100%; height: 148px; border: 1px solid; padding: 0 0 4px 0; overflow: none; margin: 0; background: none repeat scroll 0% 0% #333; z-index: 9999; }
2
- #console div.console-inner { font-family: monospace; font-size: 11px; height: 100%; overflow: auto; background: #333; border: 0; padding: 0; margin: 0; }
3
- #console div.console-prompt-box { color: #FFF; }
4
- #console pre.console-message { color: #1AD027; margin: 0; border: 0; white-space: pre-wrap; background-color: #333; padding: 0; }
5
- #console div.console-focus span.console-cursor { background: #FEFEFE; color: #333; font-weight: bold; }
6
- #console div#resizer { width: 100%; height: 4px; cursor: ns-resize; }
7
- #console input#clipboard { height: 0px; padding: 0px; margin: 0px; width: 0px; margin-left: -1000px; }
8
- #console span.console-prompt-label { display: inline; color: #FFF; background: none repeat scroll 0% 0% #333; border: 0; padding: 0; }
9
- #console pre.console-prompt-display { display: inline; color: #FFF; background: none repeat scroll 0% 0% #333; border: 0; padding: 0; }
1
+ .console .pos-absolute { position: absolute; }
2
+ .console .pos-fixed { position: fixed; }
3
+ .console .pos-right { right: 0; }
4
+ .console .border-box { box-sizing: border-box; }
5
+ .console .layer { width: 100%; height: 100%; }
6
+ .console .layer.console-outer { z-index: 1; }
7
+ .console .layer.resizer { z-index: 2; }
8
+ .console { position: fixed; left: 0; bottom: 0; width: 100%; height: 148px; padding: 0; margin: 0; background: none repeat scroll 0% 0% #333; z-index: 9999; }
9
+ .console .console-outer { overflow: auto; padding-top: 4px; }
10
+ .console .console-inner { font-family: monospace; font-size: 11px; width: 100%; height: 100%; overflow: none; background: #333; }
11
+ .console .console-prompt-box { color: #FFF; }
12
+ .console .console-message { color: #1AD027; margin: 0; border: 0; white-space: pre-wrap; background-color: #333; padding: 0; }
13
+ .console .console-focus .console-cursor { background: #FEFEFE; color: #333; font-weight: bold; }
14
+ .console .resizer { background: #333; width: 100%; height: 4px; cursor: ns-resize; }
15
+ .console .console-actions { padding-right: 3px; }
16
+ .console .console-actions .button { float: left; }
17
+ .console .button { cursor: pointer; border-radius: 1px; font-family: monospace; font-size: 13px; width: 14px; height: 14px; line-height: 14px; text-align: center; color: #ccc; }
18
+ .console .button:hover { background: #666; color: #fff; }
19
+ .console .button.close-button:hover { background: #966; }
20
+ .console .clipboard { height: 0px; padding: 0px; margin: 0px; width: 0px; margin-left: -1000px; }
21
+ .console .console-prompt-label { display: inline; color: #FFF; background: none repeat scroll 0% 0% #333; border: 0; padding: 0; }
22
+ .console .console-prompt-display { display: inline; color: #FFF; background: none repeat scroll 0% 0% #333; border: 0; padding: 0; }
@@ -0,0 +1,11 @@
1
+ module WebConsole
2
+ class BindingTracer
3
+ def initialize(exception)
4
+ @bindings = exception.bindings
5
+ @backtrace = exception.backtrace
6
+ end
7
+
8
+ def binding_for_trace(trace)
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module WebConsole
2
- VERSION = '2.1.3'
2
+ VERSION = '2.2.0'
3
3
  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.3
4
+ version: 2.2.0
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-06-16 00:00:00.000000000 Z
14
+ date: 2015-07-10 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: railties
@@ -113,6 +113,7 @@ executables: []
113
113
  extensions: []
114
114
  extra_rdoc_files: []
115
115
  files:
116
+ - CHANGELOG.markdown
116
117
  - MIT-LICENSE
117
118
  - README.markdown
118
119
  - Rakefile
@@ -141,85 +142,10 @@ files:
141
142
  - lib/web_console/templates/layouts/javascript.erb
142
143
  - lib/web_console/templates/main.js.erb
143
144
  - lib/web_console/templates/style.css.erb
145
+ - lib/web_console/tracer.rb
144
146
  - lib/web_console/version.rb
145
147
  - lib/web_console/whiny_request.rb
146
148
  - lib/web_console/whitelist.rb
147
- - test/dummy/README.rdoc
148
- - test/dummy/Rakefile
149
- - test/dummy/app/assets/javascripts/application.js
150
- - test/dummy/app/assets/stylesheets/application.css
151
- - test/dummy/app/controllers/application_controller.rb
152
- - test/dummy/app/controllers/controller_helper_test_controller.rb
153
- - test/dummy/app/controllers/exception_test_controller.rb
154
- - test/dummy/app/controllers/helper_error_controller.rb
155
- - test/dummy/app/controllers/helper_test_controller.rb
156
- - test/dummy/app/controllers/tests_controller.rb
157
- - test/dummy/app/helpers/application_helper.rb
158
- - test/dummy/app/views/controller_helper_test/index.html.erb
159
- - test/dummy/app/views/exception_test/xhr.html.erb
160
- - test/dummy/app/views/helper_error/index.html.erb
161
- - test/dummy/app/views/helper_test/index.html.erb
162
- - test/dummy/app/views/layouts/application.html.erb
163
- - test/dummy/bin/bundle
164
- - test/dummy/bin/rails
165
- - test/dummy/bin/rake
166
- - test/dummy/config.ru
167
- - test/dummy/config/application.rb
168
- - test/dummy/config/boot.rb
169
- - test/dummy/config/database.yml
170
- - test/dummy/config/environment.rb
171
- - test/dummy/config/environments/development.rb
172
- - test/dummy/config/environments/production.rb
173
- - test/dummy/config/environments/test.rb
174
- - test/dummy/config/initializers/backtrace_silencers.rb
175
- - test/dummy/config/initializers/filter_parameter_logging.rb
176
- - test/dummy/config/initializers/inflections.rb
177
- - test/dummy/config/initializers/mime_types.rb
178
- - test/dummy/config/initializers/secret_token.rb
179
- - test/dummy/config/initializers/session_store.rb
180
- - test/dummy/config/initializers/wrap_parameters.rb
181
- - test/dummy/config/locales/en.yml
182
- - test/dummy/config/routes.rb
183
- - test/dummy/db/schema.rb
184
- - test/dummy/db/test.sqlite3
185
- - test/dummy/log/test.log
186
- - test/dummy/public/404.html
187
- - test/dummy/public/422.html
188
- - test/dummy/public/500.html
189
- - test/dummy/public/favicon.ico
190
- - test/dummy/tmp/cache/assets/test/sprockets/0c9b99b1b975b36a5b686845ae729db3
191
- - test/dummy/tmp/cache/assets/test/sprockets/12e9f58adcf819cf65fd68b6859a438f
192
- - test/dummy/tmp/cache/assets/test/sprockets/1fd6abead3df36a4e4a2cb042a551b39
193
- - test/dummy/tmp/cache/assets/test/sprockets/33b5eb81b5aaaa1e6dd5dcb6517792b4
194
- - test/dummy/tmp/cache/assets/test/sprockets/3e460b2e021085f88b5597b38d194932
195
- - test/dummy/tmp/cache/assets/test/sprockets/52f04b2ea6e461f4661b6d0be393fa94
196
- - test/dummy/tmp/cache/assets/test/sprockets/688c344c2919f882338f06c5daaea209
197
- - test/dummy/tmp/cache/assets/test/sprockets/7f079298e19bbef40a5d6a37dc03033a
198
- - test/dummy/tmp/cache/assets/test/sprockets/91aa709f89e465f58056fabe5f75eef4
199
- - test/dummy/tmp/cache/assets/test/sprockets/95f4e4e5217aec9f71b2c1a65a9a9231
200
- - test/dummy/tmp/cache/assets/test/sprockets/9c41be9b6625756fbb6d05b7665dd911
201
- - test/dummy/tmp/cache/assets/test/sprockets/a95f64d41fcf8244b8f5b84a55f07822
202
- - test/dummy/tmp/cache/assets/test/sprockets/c5e6bf1efd5929bee63e28ad7c9f6f83
203
- - test/dummy/tmp/cache/assets/test/sprockets/d863259e9eeca657a1624135cfe24446
204
- - test/dummy/tmp/cache/assets/test/sprockets/e1d2fc4601b6423ec8a42415ee05dd14
205
- - test/dummy/tmp/cache/assets/test/sprockets/e82616536a759c2e87d703adc77d65da
206
- - test/support/scenarios/bad_custom_error_scenario.rb
207
- - test/support/scenarios/basic_nested_scenario.rb
208
- - test/support/scenarios/custom_error_scenario.rb
209
- - test/support/scenarios/eval_nested_scenario.rb
210
- - test/support/scenarios/flat_scenario.rb
211
- - test/support/scenarios/reraised_scenario.rb
212
- - test/test_helper.rb
213
- - test/web_console/evaluator_test.rb
214
- - test/web_console/extensions_test.rb
215
- - test/web_console/helper_test.rb
216
- - test/web_console/integration_test.rb
217
- - test/web_console/middleware_test.rb
218
- - test/web_console/railtie_test.rb
219
- - test/web_console/request_test.rb
220
- - test/web_console/session_test.rb
221
- - test/web_console/whiny_request_test.rb
222
- - test/web_console/whitelist_test.rb
223
149
  homepage: https://github.com/rails/web-console
224
150
  licenses:
225
151
  - MIT
@@ -244,80 +170,4 @@ rubygems_version: 2.4.5
244
170
  signing_key:
245
171
  specification_version: 4
246
172
  summary: A debugging tool for your Ruby on Rails applications.
247
- test_files:
248
- - test/dummy/app/assets/javascripts/application.js
249
- - test/dummy/app/assets/stylesheets/application.css
250
- - test/dummy/app/controllers/application_controller.rb
251
- - test/dummy/app/controllers/controller_helper_test_controller.rb
252
- - test/dummy/app/controllers/exception_test_controller.rb
253
- - test/dummy/app/controllers/helper_error_controller.rb
254
- - test/dummy/app/controllers/helper_test_controller.rb
255
- - test/dummy/app/controllers/tests_controller.rb
256
- - test/dummy/app/helpers/application_helper.rb
257
- - test/dummy/app/views/controller_helper_test/index.html.erb
258
- - test/dummy/app/views/exception_test/xhr.html.erb
259
- - test/dummy/app/views/helper_error/index.html.erb
260
- - test/dummy/app/views/helper_test/index.html.erb
261
- - test/dummy/app/views/layouts/application.html.erb
262
- - test/dummy/bin/bundle
263
- - test/dummy/bin/rails
264
- - test/dummy/bin/rake
265
- - test/dummy/config/application.rb
266
- - test/dummy/config/boot.rb
267
- - test/dummy/config/database.yml
268
- - test/dummy/config/environment.rb
269
- - test/dummy/config/environments/development.rb
270
- - test/dummy/config/environments/production.rb
271
- - test/dummy/config/environments/test.rb
272
- - test/dummy/config/initializers/backtrace_silencers.rb
273
- - test/dummy/config/initializers/filter_parameter_logging.rb
274
- - test/dummy/config/initializers/inflections.rb
275
- - test/dummy/config/initializers/mime_types.rb
276
- - test/dummy/config/initializers/secret_token.rb
277
- - test/dummy/config/initializers/session_store.rb
278
- - test/dummy/config/initializers/wrap_parameters.rb
279
- - test/dummy/config/locales/en.yml
280
- - test/dummy/config/routes.rb
281
- - test/dummy/config.ru
282
- - test/dummy/db/schema.rb
283
- - test/dummy/db/test.sqlite3
284
- - test/dummy/log/test.log
285
- - test/dummy/public/404.html
286
- - test/dummy/public/422.html
287
- - test/dummy/public/500.html
288
- - test/dummy/public/favicon.ico
289
- - test/dummy/Rakefile
290
- - test/dummy/README.rdoc
291
- - test/dummy/tmp/cache/assets/test/sprockets/0c9b99b1b975b36a5b686845ae729db3
292
- - test/dummy/tmp/cache/assets/test/sprockets/12e9f58adcf819cf65fd68b6859a438f
293
- - test/dummy/tmp/cache/assets/test/sprockets/1fd6abead3df36a4e4a2cb042a551b39
294
- - test/dummy/tmp/cache/assets/test/sprockets/33b5eb81b5aaaa1e6dd5dcb6517792b4
295
- - test/dummy/tmp/cache/assets/test/sprockets/3e460b2e021085f88b5597b38d194932
296
- - test/dummy/tmp/cache/assets/test/sprockets/52f04b2ea6e461f4661b6d0be393fa94
297
- - test/dummy/tmp/cache/assets/test/sprockets/688c344c2919f882338f06c5daaea209
298
- - test/dummy/tmp/cache/assets/test/sprockets/7f079298e19bbef40a5d6a37dc03033a
299
- - test/dummy/tmp/cache/assets/test/sprockets/91aa709f89e465f58056fabe5f75eef4
300
- - test/dummy/tmp/cache/assets/test/sprockets/95f4e4e5217aec9f71b2c1a65a9a9231
301
- - test/dummy/tmp/cache/assets/test/sprockets/9c41be9b6625756fbb6d05b7665dd911
302
- - test/dummy/tmp/cache/assets/test/sprockets/a95f64d41fcf8244b8f5b84a55f07822
303
- - test/dummy/tmp/cache/assets/test/sprockets/c5e6bf1efd5929bee63e28ad7c9f6f83
304
- - test/dummy/tmp/cache/assets/test/sprockets/d863259e9eeca657a1624135cfe24446
305
- - test/dummy/tmp/cache/assets/test/sprockets/e1d2fc4601b6423ec8a42415ee05dd14
306
- - test/dummy/tmp/cache/assets/test/sprockets/e82616536a759c2e87d703adc77d65da
307
- - test/support/scenarios/bad_custom_error_scenario.rb
308
- - test/support/scenarios/basic_nested_scenario.rb
309
- - test/support/scenarios/custom_error_scenario.rb
310
- - test/support/scenarios/eval_nested_scenario.rb
311
- - test/support/scenarios/flat_scenario.rb
312
- - test/support/scenarios/reraised_scenario.rb
313
- - test/test_helper.rb
314
- - test/web_console/evaluator_test.rb
315
- - test/web_console/extensions_test.rb
316
- - test/web_console/helper_test.rb
317
- - test/web_console/integration_test.rb
318
- - test/web_console/middleware_test.rb
319
- - test/web_console/railtie_test.rb
320
- - test/web_console/request_test.rb
321
- - test/web_console/session_test.rb
322
- - test/web_console/whiny_request_test.rb
323
- - test/web_console/whitelist_test.rb
173
+ test_files: []
@@ -1,28 +0,0 @@
1
- == README
2
-
3
- This README would normally document whatever steps are necessary to get the
4
- application up and running.
5
-
6
- Things you may want to cover:
7
-
8
- * Ruby version
9
-
10
- * System dependencies
11
-
12
- * Configuration
13
-
14
- * Database creation
15
-
16
- * Database initialization
17
-
18
- * How to run the test suite
19
-
20
- * Services (job queues, cache servers, search engines, etc.)
21
-
22
- * Deployment instructions
23
-
24
- * ...
25
-
26
-
27
- Please feel free to use a different markup language if you do not plan to run
28
- <tt>rake doc:app</tt>.
@@ -1,6 +0,0 @@
1
- # Add your own tasks in files placed in lib/tasks ending in .rake,
2
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
-
4
- require File.expand_path('../config/application', __FILE__)
5
-
6
- Dummy::Application.load_tasks
@@ -1,13 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file.
9
- //
10
- // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
- // GO AFTER THE REQUIRES BELOW.
12
- //
13
- //= require_tree .
@@ -1,13 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the top of the
9
- * compiled file, but it's generally better to create a new file per style scope.
10
- *
11
- *= require_self
12
- *= require_tree .
13
- */
@@ -1,5 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- # Prevent CSRF attacks by raising an exception.
3
- # For APIs, you may want to use :null_session instead.
4
- protect_from_forgery with: :exception
5
- end
@@ -1,7 +0,0 @@
1
- class ControllerHelperTestController < ApplicationController
2
- def index
3
- @instance_variable = "Helper Test"
4
- local_variable = 42
5
- console
6
- end
7
- end
@@ -1,15 +0,0 @@
1
- class ExceptionTestController < ApplicationController
2
- def index
3
- test = "Test"
4
- test_method
5
- end
6
-
7
- def xhr
8
- raise "asda" if request.xhr?
9
- end
10
-
11
- def test_method
12
- test2 = "Test2"
13
- raise StandardError
14
- end
15
- end
@@ -1,4 +0,0 @@
1
- class HelperErrorController < ApplicationController
2
- def index
3
- end
4
- end
@@ -1,5 +0,0 @@
1
- class HelperTestController < ApplicationController
2
- def index
3
- @helper_test = "Helper Test"
4
- end
5
- end
@@ -1,16 +0,0 @@
1
- class TestsController < ApplicationController
2
- def render_console_ontop_of_text
3
- render text: '<h1 id="greeting">Hello World</h1>'
4
- console
5
- end
6
-
7
- def renders_console_only_once
8
- render text: '<h1 id="greeting">Hello World</h1>'
9
- 2.times { console }
10
- end
11
-
12
- def doesnt_render_console_on_non_html_requests
13
- render json: {}
14
- console
15
- end
16
- end
@@ -1,2 +0,0 @@
1
- module ApplicationHelper
2
- end
@@ -1 +0,0 @@
1
- <h1>Controller Helper Test</h1>
@@ -1 +0,0 @@
1
- <p>Do an XHR request!</p>
@@ -1,2 +0,0 @@
1
- <% @ok = 42 %>
2
- <% raise %>
@@ -1,220 +0,0 @@
1
- <%= console %>
2
-
3
- <% content_for :head do %>
4
- <style type="text/css" media="screen">
5
- body {
6
- margin: 0;
7
- margin-bottom: 25px;
8
- padding: 0;
9
- background-color: #f0f0f0;
10
- font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
11
- font-size: 13px;
12
- color: #333;
13
- }
14
-
15
- h1 {
16
- font-size: 28px;
17
- color: #000;
18
- }
19
-
20
- a {color: #03c}
21
- a:hover {
22
- background-color: #03c;
23
- color: white;
24
- text-decoration: none;
25
- }
26
-
27
-
28
- #page {
29
- background-color: #f0f0f0;
30
- width: 750px;
31
- margin: 0;
32
- margin-left: auto;
33
- margin-right: auto;
34
- }
35
-
36
- #content {
37
- float: left;
38
- background-color: white;
39
- border: 3px solid #aaa;
40
- border-top: none;
41
- padding: 25px;
42
- width: 500px;
43
- }
44
-
45
- #sidebar {
46
- float: right;
47
- width: 175px;
48
- }
49
-
50
- #footer {
51
- clear: both;
52
- }
53
-
54
-
55
- #header, #about, #getting-started {
56
- padding-left: 75px;
57
- padding-right: 30px;
58
- }
59
-
60
-
61
- #header {
62
- height: 64px;
63
- }
64
- #header h1, #header h2 {margin: 0}
65
- #header h2 {
66
- color: #888;
67
- font-weight: normal;
68
- font-size: 16px;
69
- }
70
-
71
-
72
- #about h3 {
73
- margin: 0;
74
- margin-bottom: 10px;
75
- font-size: 14px;
76
- }
77
-
78
- #about-content {
79
- background-color: #ffd;
80
- border: 1px solid #fc0;
81
- margin-left: -55px;
82
- margin-right: -10px;
83
- }
84
- #about-content table {
85
- margin-top: 10px;
86
- margin-bottom: 10px;
87
- font-size: 11px;
88
- border-collapse: collapse;
89
- }
90
- #about-content td {
91
- padding: 10px;
92
- padding-top: 3px;
93
- padding-bottom: 3px;
94
- }
95
- #about-content td.name {color: #555}
96
- #about-content td.value {color: #000}
97
-
98
- #about-content ul {
99
- padding: 0;
100
- list-style-type: none;
101
- }
102
-
103
- #about-content.failure {
104
- background-color: #fcc;
105
- border: 1px solid #f00;
106
- }
107
- #about-content.failure p {
108
- margin: 0;
109
- padding: 10px;
110
- }
111
-
112
-
113
- #getting-started {
114
- border-top: 1px solid #ccc;
115
- margin-top: 25px;
116
- padding-top: 15px;
117
- }
118
- #getting-started h1 {
119
- margin: 0;
120
- font-size: 20px;
121
- }
122
- #getting-started h2 {
123
- margin: 0;
124
- font-size: 14px;
125
- font-weight: normal;
126
- color: #333;
127
- margin-bottom: 25px;
128
- }
129
- #getting-started ol {
130
- margin-left: 0;
131
- padding-left: 0;
132
- }
133
- #getting-started li {
134
- font-size: 18px;
135
- color: #888;
136
- margin-bottom: 25px;
137
- }
138
- #getting-started li h2 {
139
- margin: 0;
140
- font-weight: normal;
141
- font-size: 18px;
142
- color: #333;
143
- }
144
- #getting-started li p {
145
- color: #555;
146
- font-size: 13px;
147
- }
148
-
149
-
150
- #sidebar ul {
151
- margin-left: 0;
152
- padding-left: 0;
153
- }
154
- #sidebar ul h3 {
155
- margin-top: 25px;
156
- font-size: 16px;
157
- padding-bottom: 10px;
158
- border-bottom: 1px solid #ccc;
159
- }
160
- #sidebar li {
161
- list-style-type: none;
162
- }
163
- #sidebar ul.links li {
164
- margin-bottom: 5px;
165
- }
166
-
167
- </style>
168
- <% end %>
169
-
170
- <div id="page">
171
- <div id="sidebar">
172
- <ul id="sidebar-items">
173
- <li>
174
- <h3>Browse the documentation</h3>
175
- <ul class="links">
176
- <li><a href="http://api.rubyonrails.org/">Rails API</a></li>
177
- <li><a href="http://stdlib.rubyonrails.org/">Ruby standard library</a></li>
178
- <li><a href="http://corelib.rubyonrails.org/">Ruby core</a></li>
179
- <li><a href="http://guides.rubyonrails.org/">Rails Guides</a></li>
180
- </ul>
181
- </li>
182
- </ul>
183
- </div>
184
-
185
- <div id="content">
186
- <div id="header">
187
- <h1>Welcome aboard</h1>
188
- <h2>You&rsquo;re riding Ruby on Rails!</h2>
189
- </div>
190
-
191
- <div id="about">
192
- <h3><a href="rails/info/properties" onclick="about(); return false">About your application&rsquo;s environment</a></h3>
193
- <div id="about-content" style="display: none"></div>
194
- </div>
195
-
196
- <div id="getting-started">
197
- <h1>Getting started</h1>
198
- <h2>Here&rsquo;s how to get rolling:</h2>
199
-
200
- <ol>
201
- <li>
202
- <h2>Use <code>rails generate</code> to create your models and controllers</h2>
203
- <p>To see all available options, run it without parameters.</p>
204
- </li>
205
-
206
- <li>
207
- <h2>Set up a default route and remove or rename this file</h2>
208
- <p>Routes are set up in config/routes.rb.</p>
209
- </li>
210
-
211
- <li>
212
- <h2>Create your database</h2>
213
- <p>Run <code>rake db:migrate</code> to create your database. If you're not using SQLite (the default), edit <code>config/database.yml</code> with your username and password.</p>
214
- </li>
215
- </ol>
216
- </div>
217
- </div>
218
-
219
- <div id="footer">&nbsp;</div>
220
- </div>