web-console 2.1.0 → 2.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9668f63dcb4699154e023fe36cfc97167572f43a
4
- data.tar.gz: 238fc2451d041ea8a063052ee3665edce6a4db3b
3
+ metadata.gz: f36d5c7c669507af4276ff85de8588553bafb4b3
4
+ data.tar.gz: 9908519e49c5c0c471037b129a42b8befa1256f0
5
5
  SHA512:
6
- metadata.gz: d7a8aa82a257fd3386fc0506f6af4d73c727771824e97d5474755485597dcc15ef517c9bd7b1561258d9b38c46219f1d62ae7ea6cf1e56dc23cd214fc3fa2548
7
- data.tar.gz: 4707a1c5c5c4d5d2d22d8931b99fad9e91f6f411db89d364a7b381585a523aad3b23818b12f142743c0bc961b17059ebe17cec7e68235d4b93c0823487a41b99
6
+ metadata.gz: f359b6084e213e8cb8d8fc5401b33847bb452ec1a3ed8fcdf07a3a928d5cd84184ec28b0ba7de703c143337eccf392249335e27d45e58f2fbe16a6eb3d469e22
7
+ data.tar.gz: 806117cab90a04c6eba6f061e3a35285640670f89f278a2694b0fe5ac497cdc708531ebac180e627c2f699ce7a07a12d359e368ac50e7eb0eedd994a01880819
@@ -4,7 +4,7 @@ module WebConsole
4
4
  # While most of the servers will return blank content type if none given,
5
5
  # Puma will return text/plain.
6
6
  cattr_accessor :acceptable_content_types
7
- @@acceptable_content_types = [Mime::HTML, Mime::TEXT]
7
+ @@acceptable_content_types = [Mime::HTML, Mime::TEXT, Mime::URL_ENCODED_FORM]
8
8
 
9
9
  # Configurable set of whitelisted networks.
10
10
  cattr_accessor :whitelisted_ips
@@ -1,3 +1,3 @@
1
1
  module WebConsole
2
- VERSION = '2.1.0'
2
+ VERSION = '2.1.1'
3
3
  end
@@ -191180,3 +191180,301 @@ WebConsole::RailtieTest: test_config.whitelisted_ips_sets_whitelisted_networks
191180
191180
  ------------------------------------------------------------------------
191181
191181
  WebConsole::RailtieTest: test_config.whiny_request_removes_extra_logging
191182
191182
  ------------------------------------------------------------------------
191183
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
191184
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
191185
+  (0.0ms) select sqlite_version(*)
191186
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
191187
+  (0.1ms) SELECT version FROM "schema_migrations"
191188
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
191189
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
191190
+  (0.1ms) begin transaction
191191
+ -------------------------------------------------------------------------------
191192
+ WebConsole::MiddlewareTest: test_doesn't_render_console_in_non_html_application
191193
+ -------------------------------------------------------------------------------
191194
+  (0.0ms) rollback transaction
191195
+  (0.0ms) begin transaction
191196
+ -----------------------------------------------------------------------------------------
191197
+ WebConsole::MiddlewareTest: test_render_console_in_an_html_application_with_non_text/html
191198
+ -----------------------------------------------------------------------------------------
191199
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/_markup.html (0.5ms)
191200
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/style.css within layouts/inlined_string (0.3ms)
191201
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/_inner_console_markup.html within layouts/inlined_string (0.4ms)
191202
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/_prompt_box_markup.html within layouts/inlined_string (0.4ms)
191203
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/console.js within layouts/javascript (13.8ms)
191204
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/main.js within layouts/javascript (0.4ms)
191205
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/index.html (27.2ms)
191206
+  (0.1ms) rollback transaction
191207
+  (0.1ms) begin transaction
191208
+ -------------------------------------------------------------------------------------------------
191209
+ WebConsole::MiddlewareTest: test_render_console_in_an_html_application_from_web_console.exception
191210
+ -------------------------------------------------------------------------------------------------
191211
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/_markup.html (0.3ms)
191212
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/style.css within layouts/inlined_string (0.3ms)
191213
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/_inner_console_markup.html within layouts/inlined_string (0.3ms)
191214
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/_prompt_box_markup.html within layouts/inlined_string (0.3ms)
191215
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/console.js within layouts/javascript (8.2ms)
191216
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/main.js within layouts/javascript (0.3ms)
191217
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/error_page.js within layouts/javascript (0.4ms)
191218
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/index.html (19.2ms)
191219
+  (0.1ms) rollback transaction
191220
+  (0.0ms) begin transaction
191221
+ ---------------------------------------------------------------------------------
191222
+ WebConsole::MiddlewareTest: test_unavailable_sessions_can_occur_on_binding_switch
191223
+ ---------------------------------------------------------------------------------
191224
+  (0.1ms) rollback transaction
191225
+  (0.1ms) begin transaction
191226
+ -------------------------------------------------------------------------------------------
191227
+ WebConsole::MiddlewareTest: test_prioritizes_web_console.exception_over_web_console.binding
191228
+ -------------------------------------------------------------------------------------------
191229
+  (0.0ms) rollback transaction
191230
+  (0.1ms) begin transaction
191231
+ -------------------------------------------------------------------------------
191232
+ WebConsole::MiddlewareTest: test_doesn't_render_console_from_non_whitelisted_IP
191233
+ -------------------------------------------------------------------------------
191234
+  (0.0ms) rollback transaction
191235
+  (0.1ms) begin transaction
191236
+ -----------------------------------------------------------------------------------------------
191237
+ WebConsole::MiddlewareTest: test_render_console_in_an_html_application_from_web_console.binding
191238
+ -----------------------------------------------------------------------------------------------
191239
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/_markup.html (0.3ms)
191240
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/style.css within layouts/inlined_string (0.3ms)
191241
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/_inner_console_markup.html within layouts/inlined_string (0.3ms)
191242
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/_prompt_box_markup.html within layouts/inlined_string (0.2ms)
191243
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/console.js within layouts/javascript (7.8ms)
191244
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/main.js within layouts/javascript (0.2ms)
191245
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/index.html (14.0ms)
191246
+  (0.1ms) rollback transaction
191247
+  (0.1ms) begin transaction
191248
+ --------------------------------------------------------------------------------------------------------------
191249
+ WebConsole::MiddlewareTest: test_doesn't_render_console_without_a_web_console.binding_or_web_console.exception
191250
+ --------------------------------------------------------------------------------------------------------------
191251
+  (0.0ms) rollback transaction
191252
+  (0.1ms) begin transaction
191253
+ --------------------------------------------------------------------------
191254
+ WebConsole::MiddlewareTest: test_can_evaluate_code_and_return_it_as_a_JSON
191255
+ --------------------------------------------------------------------------
191256
+  (0.0ms) rollback transaction
191257
+  (0.1ms) begin transaction
191258
+ -------------------------------------------------------------------
191259
+ WebConsole::MiddlewareTest: test_can_switch_bindings_on_error_pages
191260
+ -------------------------------------------------------------------
191261
+  (0.0ms) rollback transaction
191262
+  (0.1ms) begin transaction
191263
+ ----------------------------------------------------------------------------------------
191264
+ WebConsole::MiddlewareTest: test_unavailable_sessions_respond_to_the_user_with_a_message
191265
+ ----------------------------------------------------------------------------------------
191266
+  (0.0ms) rollback transaction
191267
+  (0.0ms) begin transaction
191268
+ --------------------------------------------------------------------------------
191269
+ WebConsole::RequestTest: test_#from_whitelited_ip?_is_truthy_for_whitelisted_IPs
191270
+ --------------------------------------------------------------------------------
191271
+  (0.0ms) rollback transaction
191272
+  (0.1ms) begin transaction
191273
+ ----------------------------------------------------------------------------------------
191274
+ WebConsole::RequestTest: test_#acceptable_content_type?_is_truthy_during_form_submission
191275
+ ----------------------------------------------------------------------------------------
191276
+  (0.0ms) rollback transaction
191277
+  (0.1ms) begin transaction
191278
+ ----------------------------------------------------------------------------------------
191279
+ WebConsole::RequestTest: test_#acceptable_content_type?_is_truthy_for_blank_content_type
191280
+ ----------------------------------------------------------------------------------------
191281
+  (0.0ms) rollback transaction
191282
+  (0.0ms) begin transaction
191283
+ ------------------------------------------------------------------------------------------------
191284
+ WebConsole::RequestTest: test_#acceptable_content_type?_is_truthy_for_explicit_HTML_content_type
191285
+ ------------------------------------------------------------------------------------------------
191286
+  (0.0ms) rollback transaction
191287
+  (0.1ms) begin transaction
191288
+ ---------------------------------------------------------------------------------------------
191289
+ WebConsole::RequestTest: test_#acceptable_content_type?_is_truthy_for_plain_text_content_type
191290
+ ---------------------------------------------------------------------------------------------
191291
+  (0.0ms) rollback transaction
191292
+  (0.1ms) begin transaction
191293
+ -------------------------------------------------------------------------------
191294
+ WebConsole::RequestTest: test_#from_whitelited_ip?_is_falsy_for_blacklisted_IPs
191295
+ -------------------------------------------------------------------------------
191296
+  (0.0ms) rollback transaction
191297
+  (0.0ms) begin transaction
191298
+ --------------------------------------------------------------------------------------------------------
191299
+ WebConsole::RequestTest: test_#acceptable_content_type?_is_falsy_for_non_blank_and_non_HTML_content_type
191300
+ --------------------------------------------------------------------------------------------------------
191301
+  (0.0ms) rollback transaction
191302
+  (0.0ms) begin transaction
191303
+ ---------------------------------------------------------------
191304
+ WebConsole::WhitelistTest: test_localhost_is_always_whitelisted
191305
+ ---------------------------------------------------------------
191306
+  (0.0ms) rollback transaction
191307
+  (0.1ms) begin transaction
191308
+ ---------------------------------------------------------------
191309
+ WebConsole::WhitelistTest: test_can_whitelist_multiple_networks
191310
+ ---------------------------------------------------------------
191311
+  (0.1ms) rollback transaction
191312
+  (0.1ms) begin transaction
191313
+ ------------------------------------------------------------
191314
+ WebConsole::WhitelistTest: test_can_whitelist_whole_networks
191315
+ ------------------------------------------------------------
191316
+  (0.0ms) rollback transaction
191317
+  (0.1ms) begin transaction
191318
+ --------------------------------------------------------
191319
+ WebConsole::WhitelistTest: test_can_whitelist_single_IPs
191320
+ --------------------------------------------------------
191321
+  (0.0ms) rollback transaction
191322
+  (0.1ms) begin transaction
191323
+ ---------------------------------------------------------------------------
191324
+ WebConsole::WhitelistTest: test_can_be_represented_in_a_human_readable_form
191325
+ ---------------------------------------------------------------------------
191326
+  (0.0ms) rollback transaction
191327
+  (0.0ms) begin transaction
191328
+ ----------------------------------------------------------
191329
+ WebConsole::HelperTest: test_renders_a_console_into_a_view
191330
+ ----------------------------------------------------------
191331
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/_markup.html (0.3ms)
191332
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/style.css within layouts/inlined_string (0.3ms)
191333
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/_inner_console_markup.html within layouts/inlined_string (0.2ms)
191334
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/_prompt_box_markup.html within layouts/inlined_string (0.2ms)
191335
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/console.js within layouts/javascript (7.2ms)
191336
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/main.js within layouts/javascript (0.2ms)
191337
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/index.html (14.2ms)
191338
+  (0.0ms) rollback transaction
191339
+  (0.1ms) begin transaction
191340
+ ------------------------------------------------------------------------------------------
191341
+ WebConsole::HelperTest: test_raises_an_error_when_trying_to_spawn_a_console_more_than_once
191342
+ ------------------------------------------------------------------------------------------
191343
+  (0.0ms) rollback transaction
191344
+  (0.1ms) begin transaction
191345
+ --------------------------------------------------------
191346
+ WebConsole::HelperTest: test_doesn't_hijack_current_view
191347
+ --------------------------------------------------------
191348
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/_markup.html (0.3ms)
191349
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/style.css within layouts/inlined_string (0.2ms)
191350
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/_inner_console_markup.html within layouts/inlined_string (0.2ms)
191351
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/_prompt_box_markup.html within layouts/inlined_string (0.3ms)
191352
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/console.js within layouts/javascript (7.2ms)
191353
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/main.js within layouts/javascript (0.3ms)
191354
+ Rendered /Users/genadi/Development/web-console/lib/web_console/templates/index.html (13.0ms)
191355
+  (0.0ms) rollback transaction
191356
+  (0.0ms) begin transaction
191357
+ ------------------------------------------------------------------------------
191358
+ WebConsole::RailtieTest: test_config.whitelisted_ips_always_includes_localhost
191359
+ ------------------------------------------------------------------------------
191360
+  (0.2ms) begin transaction
191361
+ ------------------------------------------------------------------------
191362
+ WebConsole::RailtieTest: test_config.whiny_request_removes_extra_logging
191363
+ ------------------------------------------------------------------------
191364
+  (0.2ms) begin transaction
191365
+ ------------------------------------------------------------------------------
191366
+ WebConsole::RailtieTest: test_config.template_paths_prepend_paths_if_it_exists
191367
+ ------------------------------------------------------------------------------
191368
+  (0.2ms) begin transaction
191369
+ ------------------------------------------------------------------------------
191370
+ WebConsole::RailtieTest: test_config.whitelisted_ips_sets_whitelisted_networks
191371
+ ------------------------------------------------------------------------------
191372
+  (0.2ms) begin transaction
191373
+ --------------------------------------------------------------------------------------
191374
+ WebConsole::RailtieTest: test_config.acceptable_content_types_adds_extra_content_types
191375
+ --------------------------------------------------------------------------------------
191376
+  (0.2ms) begin transaction
191377
+ --------------------------------------------------------------------------
191378
+ WebConsole::WhinyRequestTest: test_#from_whitelited_ip?_logs_out_to_stderr
191379
+ --------------------------------------------------------------------------
191380
+  (0.1ms) rollback transaction
191381
+  (0.0ms) begin transaction
191382
+ -------------------------------------------------------------------------------
191383
+ WebConsole::WhinyRequestTest: test_#acceptable_content_type?_logs_out_to_stderr
191384
+ -------------------------------------------------------------------------------
191385
+  (0.0ms) rollback transaction
191386
+  (0.0ms) begin transaction
191387
+ --------------------------------------------------------------------
191388
+ WebConsole::EvaluatorTest: test_preserves_the_session_in_the_binding
191389
+ --------------------------------------------------------------------
191390
+  (0.0ms) rollback transaction
191391
+  (0.0ms) begin transaction
191392
+ -------------------------------------------------------------------------------------
191393
+ WebConsole::EvaluatorTest: test_no_backtrace_is_shown_if_exception_backtrace_is_blank
191394
+ -------------------------------------------------------------------------------------
191395
+  (0.0ms) rollback transaction
191396
+  (0.0ms) begin transaction
191397
+ ---------------------------------------------------------------------------------------
191398
+ WebConsole::EvaluatorTest: test_Evaluator_callers_are_cleaned_up_of_unneeded_backtraces
191399
+ ---------------------------------------------------------------------------------------
191400
+  (0.0ms) rollback transaction
191401
+  (0.0ms) begin transaction
191402
+ --------------------------------------------------------------------------
191403
+ WebConsole::EvaluatorTest: test_sending_input_returns_the_result_as_output
191404
+ --------------------------------------------------------------------------
191405
+  (0.0ms) rollback transaction
191406
+  (0.0ms) begin transaction
191407
+ ---------------------------------------------------------------------------
191408
+ WebConsole::EvaluatorTest: test_session_preservation_requires_same_bindings
191409
+ ---------------------------------------------------------------------------
191410
+  (0.0ms) rollback transaction
191411
+  (0.0ms) begin transaction
191412
+ -------------------------------------------------------------------
191413
+ WebConsole::EvaluatorTest: test_formats_exceptions_similarly_to_IRB
191414
+ -------------------------------------------------------------------
191415
+  (0.0ms) rollback transaction
191416
+  (0.1ms) begin transaction
191417
+ -------------------------------------------------------------
191418
+ WebConsole::SessionTest: test_find_returns_a_persisted_object
191419
+ -------------------------------------------------------------
191420
+  (0.0ms) rollback transaction
191421
+  (0.0ms) begin transaction
191422
+ ----------------------------------------------------------------------
191423
+ WebConsole::SessionTest: test_can_create_session_from_a_single_binding
191424
+ ----------------------------------------------------------------------
191425
+  (0.1ms) rollback transaction
191426
+  (0.1ms) begin transaction
191427
+ ----------------------------------------------------
191428
+ WebConsole::SessionTest: test_can_switch_to_bindings
191429
+ ----------------------------------------------------
191430
+  (0.0ms) rollback transaction
191431
+  (0.0ms) begin transaction
191432
+ ------------------------------------------------------------------
191433
+ WebConsole::SessionTest: test_can_create_session_from_an_exception
191434
+ ------------------------------------------------------------------
191435
+  (0.0ms) rollback transaction
191436
+  (0.1ms) begin transaction
191437
+ ---------------------------------------------------------------------------------
191438
+ WebConsole::SessionTest: test_can_evaluate_code_in_the_currently_selected_binding
191439
+ ---------------------------------------------------------------------------------
191440
+  (0.0ms) rollback transaction
191441
+  (0.1ms) begin transaction
191442
+ ---------------------------------------------------------------------
191443
+ WebConsole::SessionTest: test_returns_nil_when_a_session_is_not_found
191444
+ ---------------------------------------------------------------------
191445
+  (0.0ms) rollback transaction
191446
+  (0.0ms) begin transaction
191447
+ ------------------------------------------------------------------------------------------------
191448
+ WebConsole::IntegrationTest: test_Exception#bindings_returns_all_the_bindings_for_a_custom_error
191449
+ ------------------------------------------------------------------------------------------------
191450
+  (0.0ms) rollback transaction
191451
+  (0.1ms) begin transaction
191452
+ ----------------------------------------------------------------------------------------------------
191453
+ WebConsole::IntegrationTest: test_Exception#bindings_returns_all_the_bindings_for_a_bad_custom_error
191454
+ ----------------------------------------------------------------------------------------------------
191455
+  (0.0ms) rollback transaction
191456
+  (0.0ms) begin transaction
191457
+ ------------------------------------------------------------------------
191458
+ WebConsole::IntegrationTest: test_Exception#bindings_goes_down_the_stack
191459
+ ------------------------------------------------------------------------
191460
+  (0.0ms) rollback transaction
191461
+  (0.0ms) begin transaction
191462
+ ------------------------------------------------------------------------------------------------
191463
+ WebConsole::IntegrationTest: test_Exception#bindings_is_empty_when_exception_is_still_not_raised
191464
+ ------------------------------------------------------------------------------------------------
191465
+  (0.0ms) rollback transaction
191466
+  (0.1ms) begin transaction
191467
+ ----------------------------------------------------------------------------------------
191468
+ WebConsole::IntegrationTest: test_re-raising_doesn't_lose_Exception#bindings_information
191469
+ ----------------------------------------------------------------------------------------
191470
+  (0.0ms) rollback transaction
191471
+  (0.0ms) begin transaction
191472
+ ----------------------------------------------------------------------
191473
+ WebConsole::IntegrationTest: test_Exception#bindings_inside_of_an_eval
191474
+ ----------------------------------------------------------------------
191475
+  (0.0ms) rollback transaction
191476
+  (0.1ms) begin transaction
191477
+ -----------------------------------------------------------------------------------------------------------
191478
+ WebConsole::IntegrationTest: test_Exception#bindings_returns_all_the_bindings_of_where_the_error_originated
191479
+ -----------------------------------------------------------------------------------------------------------
191480
+  (0.0ms) rollback transaction
@@ -31,6 +31,12 @@ module WebConsole
31
31
  assert req.acceptable_content_type?
32
32
  end
33
33
 
34
+ test '#acceptable_content_type? is truthy during form submission' do
35
+ req = request('http://example.com', 'CONTENT_TYPE' => 'application/x-www-form-urlencoded')
36
+
37
+ assert req.acceptable_content_type?
38
+ end
39
+
34
40
  test '#acceptable_content_type? is truthy for blank content type' do
35
41
  req = request('http://example.com', 'CONTENT_TYPE' => '')
36
42
 
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.0
4
+ version: 2.1.1
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-02-28 00:00:00.000000000 Z
14
+ date: 2015-03-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: railties
@@ -266,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
266
266
  version: '0'
267
267
  requirements: []
268
268
  rubyforge_project:
269
- rubygems_version: 2.2.2
269
+ rubygems_version: 2.4.5
270
270
  signing_key:
271
271
  specification_version: 4
272
272
  summary: A debugging tool for your Ruby on Rails applications.