debugbar 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/app/controllers/debugbar/polling_controller.rb +4 -0
- data/build_extension.sh +8 -0
- data/config/routes.rb +2 -0
- data/debugbar.gemspec +2 -0
- data/lib/debugbar/buffers/cache_buffer.rb +4 -0
- data/lib/debugbar/buffers/memory_buffer.rb +4 -0
- data/lib/debugbar/buffers/null_buffer.rb +4 -0
- data/lib/debugbar/buffers/request_buffer.rb +4 -0
- data/lib/debugbar/engine.rb +4 -1
- data/lib/debugbar/middlewares/track_current_request.rb +8 -3
- data/lib/debugbar/version.rb +1 -1
- data/public/debugbar.js +50 -24
- metadata +4 -8
- data/build_client.sh +0 -8
- data/build_demo.sh +0 -18
- data/build_fixtures.rb +0 -32
- data/build_gem.sh +0 -4
- data/release.sh +0 -70
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5baf46392ef6971651278629311c31ce702eff3c07cf85f1e46a0975f9535474
|
4
|
+
data.tar.gz: fce99f252cd68cfbd6d81b87276c6f3a0218371aa6069a6007a7def71b674769
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f5f1f3108f0c6f5d2d5140f23c61aac35e79ba4e233d4c4c83978bd19b3e0b48acbe5d53b9dbf768d6e757e96ae8347101e128cc0a3dea513300f9967f70d82
|
7
|
+
data.tar.gz: ef27aa4a78e8f398ef2c8dc3bf30f5437b911f18913a0653b3b654e2e343854f052e374123fea5e478239f438c3b431c57ac7cd07d86069e223dec4d169695b1
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v0.4.3 - 2025-02-04
|
4
|
+
|
5
|
+
* Small fixes - See [#54](https://github.com/julienbourdeau/debugbar/issues/54) and [#56](https://github.com/julienbourdeau/debugbar/issues/56)
|
6
|
+
|
3
7
|
## v0.4.2 - 2025-01-11
|
4
8
|
|
5
9
|
* Mount `Debugbar::Engine` automatically from the gem to simplify setup - See [#51](https://github.com/julienbourdeau/debugbar/pull/51)
|
data/build_extension.sh
ADDED
data/config/routes.rb
CHANGED
data/debugbar.gemspec
CHANGED
@@ -24,6 +24,8 @@ Gem::Specification.new do |spec|
|
|
24
24
|
bin/ test/ spec/ features/ fixtures/
|
25
25
|
client/
|
26
26
|
.git .circleci appveyor Gemfile package.json package-lock.json .prettierrc
|
27
|
+
release.sh build_client.sh build_demo.sh build_fixtures.rb build_gem.sh
|
28
|
+
extension.zip
|
27
29
|
]
|
28
30
|
|
29
31
|
spec.files = Dir.chdir(__dir__) do
|
data/lib/debugbar/engine.rb
CHANGED
@@ -18,6 +18,9 @@ module Debugbar
|
|
18
18
|
|
19
19
|
initializer 'debugbar.override_config' do |app|
|
20
20
|
if defined? ActionCable
|
21
|
+
next if app.config.action_cable.allowed_request_origins.is_a?(Array) && app.config.action_cable.allowed_request_origins.any?
|
22
|
+
next if app.config.action_cable.allowed_request_origins.is_a?(Regexp)
|
23
|
+
|
21
24
|
unless app.config.action_cable.disable_request_forgery_protection
|
22
25
|
app.config.action_cable.disable_request_forgery_protection = true
|
23
26
|
log "Debugbar: Action Cable request forgery protection is enabled. This can cause issues with Debugbar. Overriding setting config.action_cable.disable_request_forgery_protection = true now. Update your configuration to get rid of this message."
|
@@ -49,7 +52,7 @@ module Debugbar
|
|
49
52
|
initializer 'debugbar.init' do |app|
|
50
53
|
# Display error message if running in multi-process mode without proper configuration
|
51
54
|
if ENV["WEB_CONCURRENCY"].to_i > 1
|
52
|
-
cache_nok = %i[null_store memory_store].include?(Rails.configuration.cache_store.
|
55
|
+
cache_nok = %i[null_store memory_store].include?(Rails.configuration.cache_store.to_sym)
|
53
56
|
action_cable_nok = ActionCable.server.config.cable[:adapter].to_s == "async"
|
54
57
|
adapter_nok = app.config.debugbar.buffer_adapter != :cache
|
55
58
|
|
@@ -12,9 +12,10 @@ module Debugbar
|
|
12
12
|
|
13
13
|
return @app.call(env) if Debugbar::Current.ignore?
|
14
14
|
|
15
|
-
|
15
|
+
req_id = SecureRandom.uuid
|
16
|
+
Debugbar::Current.new_request!(req_id)
|
16
17
|
|
17
|
-
|
18
|
+
status, headers, body = @app.call(env)
|
18
19
|
|
19
20
|
# TODO: Remove this if statement?
|
20
21
|
# We check meta because the frontend doesn't support request without meta yet.
|
@@ -29,7 +30,11 @@ module Debugbar
|
|
29
30
|
end
|
30
31
|
end
|
31
32
|
|
32
|
-
|
33
|
+
# We can't use Rails.application.url_helper here because 1. we have to set up manually the hosts, 2. the route I
|
34
|
+
# want is inside the engine routes and I didn't manage to access them via the helper
|
35
|
+
headers["X-Debugbar-Url"] = "#{ActionDispatch::Request.new(env).base_url}#{Debugbar.config.prefix}/get/#{req_id}"
|
36
|
+
|
37
|
+
[status, headers, body]
|
33
38
|
end
|
34
39
|
end
|
35
40
|
|
data/lib/debugbar/version.rb
CHANGED