app_profiler 0.0.4 → 0.0.5
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98267c893c5f34a6f4f1423093cf48059c1f22ca9e63ec70d8f7a2c7b2dda2a8
|
4
|
+
data.tar.gz: ad8c50e169904b526b7cf2d891253635a2c3209f712ab919cecce6b5070c8b49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6749cd765d02ad703ccbf7aaaa7c69b9df88ef036cbce00de9aaadf8e3099635d406076ceaae3a66e4c2c174b25da681b69f4165e645b583e357d88e7c5c5e2
|
7
|
+
data.tar.gz: a1d948cb61a6171cd97e8cea5514a024fca92b49b28e1383d69f1e9f9ddd4c0ed5b3a1ccafa0267d71086d4d35ce4392300781f60915816eb2000a15c7676947
|
data/lib/app_profiler.rb
CHANGED
@@ -32,6 +32,7 @@ module AppProfiler
|
|
32
32
|
mattr_accessor :autoredirect, default: false
|
33
33
|
mattr_reader :profile_header, default: "X-Profile"
|
34
34
|
mattr_accessor :context, default: nil
|
35
|
+
mattr_reader :profile_url_formatter, default: nil
|
35
36
|
|
36
37
|
mattr_accessor :storage, default: Storage::FileStorage
|
37
38
|
mattr_accessor :viewer, default: Viewer::SpeedscopeViewer
|
@@ -57,5 +58,9 @@ module AppProfiler
|
|
57
58
|
def profile_data_header
|
58
59
|
@@profile_data_header ||= profile_header.dup << "-Data" # rubocop:disable Style/ClassVars
|
59
60
|
end
|
61
|
+
|
62
|
+
def profile_url_formatter=(block)
|
63
|
+
@@profile_url_formatter = block # rubocop:disable Style/ClassVars
|
64
|
+
end
|
60
65
|
end
|
61
66
|
end
|
@@ -34,7 +34,11 @@ module AppProfiler
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def profile_url(upload)
|
37
|
-
|
37
|
+
if AppProfiler.profile_url_formatter.nil?
|
38
|
+
"#{AppProfiler.speedscope_host}#profileURL=#{upload.url}"
|
39
|
+
else
|
40
|
+
AppProfiler.profile_url_formatter.call(upload)
|
41
|
+
end
|
38
42
|
end
|
39
43
|
|
40
44
|
def profile_data_url(upload)
|
data/lib/app_profiler/railtie.rb
CHANGED
@@ -25,6 +25,7 @@ module AppProfiler
|
|
25
25
|
"tmp", "app_profiler"
|
26
26
|
)
|
27
27
|
AppProfiler.context = app.config.app_profiler.context || Rails.env
|
28
|
+
AppProfiler.profile_url_formatter = app.config.app_profiler.profile_url_formatter
|
28
29
|
end
|
29
30
|
|
30
31
|
initializer "app_profiler.add_middleware" do |app|
|
data/lib/app_profiler/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: app_profiler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gannon McGibbon
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2020-
|
16
|
+
date: 2020-06-17 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: activesupport
|