mbeditor 0.1.6 → 0.1.7

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.

Potentially problematic release.


This version of mbeditor might be problematic. Click here for more details.

@@ -16,7 +16,7 @@ module Mbeditor
16
16
  def call(env)
17
17
  if root_request?(env)
18
18
  @app.call(env)
19
- elsif mbeditor_request?(env)
19
+ elsif mbeditor_request?(env) || editor_asset_request?(env)
20
20
  Rails.logger.silence { @app.call(env) }
21
21
  else
22
22
  @app.call(env)
@@ -29,6 +29,18 @@ module Mbeditor
29
29
  normalized_request_path(env).start_with?("/mbeditor/")
30
30
  end
31
31
 
32
+ # Silence asset pipeline requests that belong to the editor:
33
+ # - /assets/mbeditor/... is always an editor asset (CSS/JS bundle)
34
+ # - other /assets/... requests are silenced only when the browser is
35
+ # currently on the editor page (Referer contains /mbeditor)
36
+ def editor_asset_request?(env)
37
+ path = normalized_request_path(env)
38
+ return true if path.start_with?("/assets/mbeditor/")
39
+ return false unless path.start_with?("/assets/")
40
+
41
+ env["HTTP_REFERER"].to_s.include?("/mbeditor")
42
+ end
43
+
32
44
  def root_request?(env)
33
45
  env["REQUEST_METHOD"] == "GET" && normalized_request_path(env) == "/mbeditor"
34
46
  end
@@ -1,3 +1,3 @@
1
1
  module Mbeditor
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mbeditor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Noonan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-03-25 00:00:00.000000000 Z
11
+ date: 2026-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -67,6 +67,7 @@ files:
67
67
  - app/assets/javascripts/mbeditor/components/QuickOpenDialog.js
68
68
  - app/assets/javascripts/mbeditor/components/ShortcutHelp.js
69
69
  - app/assets/javascripts/mbeditor/components/TabBar.js
70
+ - app/assets/javascripts/mbeditor/components/TestResultsPanel.js
70
71
  - app/assets/javascripts/mbeditor/editor_plugins.js
71
72
  - app/assets/javascripts/mbeditor/editor_store.js
72
73
  - app/assets/javascripts/mbeditor/file_icon.js
@@ -85,6 +86,7 @@ files:
85
86
  - app/services/mbeditor/git_file_history_service.rb
86
87
  - app/services/mbeditor/git_service.rb
87
88
  - app/services/mbeditor/redmine_service.rb
89
+ - app/services/mbeditor/test_runner_service.rb
88
90
  - app/views/layouts/mbeditor/application.html.erb
89
91
  - app/views/mbeditor/editors/index.html.erb
90
92
  - config/environments/development.rb