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.
- checksums.yaml +4 -4
- data/README.md +30 -1
- data/app/assets/javascripts/mbeditor/application.js +1 -0
- data/app/assets/javascripts/mbeditor/components/DiffViewer.js +14 -2
- data/app/assets/javascripts/mbeditor/components/EditorPanel.js +228 -10
- data/app/assets/javascripts/mbeditor/components/FileHistoryPanel.js +6 -1
- data/app/assets/javascripts/mbeditor/components/FileTree.js +12 -1
- data/app/assets/javascripts/mbeditor/components/MbeditorApp.js +226 -16
- data/app/assets/javascripts/mbeditor/components/TabBar.js +70 -1
- data/app/assets/javascripts/mbeditor/components/TestResultsPanel.js +150 -0
- data/app/assets/javascripts/mbeditor/file_service.js +5 -0
- data/app/assets/stylesheets/mbeditor/application.css +97 -11
- data/app/controllers/mbeditor/application_controller.rb +1 -1
- data/app/controllers/mbeditor/editors_controller.rb +45 -13
- data/app/controllers/mbeditor/git_controller.rb +13 -9
- data/app/services/mbeditor/git_diff_service.rb +3 -0
- data/app/services/mbeditor/git_service.rb +4 -2
- data/app/services/mbeditor/test_runner_service.rb +259 -0
- data/config/routes.rb +1 -0
- data/lib/mbeditor/configuration.rb +5 -1
- data/lib/mbeditor/rack/silence_ping_request.rb +13 -1
- data/lib/mbeditor/version.rb +1 -1
- metadata +4 -2
|
@@ -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
|
data/lib/mbeditor/version.rb
CHANGED
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.
|
|
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-
|
|
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
|