svelte-on-rails 18.2.0 → 18.3.0
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: 8db3e2e5e29e03c62cb4b49ea343194a12a61e1dfe4e36879ac79555f63e86ed
|
|
4
|
+
data.tar.gz: 7e41289fe014691b7521af7966500072c69a01dbfacd01b2eec90468fd1fcf2a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3e6009374c45685b47f7cb39ea5b913e60c5c77ae553551ac12559c795f6c1cf4fd1e277d3049ce4fea8d6963d7ab78f1a5221decd8f8b1dbd80695d3942f988
|
|
7
|
+
data.tar.gz: 3682d6b970753ac6a06b1791c145a7c94ebacb59286439a7263fd819be8ebdc2942098b14428cd4014c7df9015432d290c3d99edc7afed75696a8d7e46a494fc
|
|
@@ -18,6 +18,7 @@ module SvelteOnRails
|
|
|
18
18
|
@configs = redis_cache_store_configs
|
|
19
19
|
|
|
20
20
|
@component_paths_cache = {}
|
|
21
|
+
@request_metrics = {}
|
|
21
22
|
|
|
22
23
|
return unless defined?(Rails.root)
|
|
23
24
|
|
|
@@ -177,15 +178,13 @@ module SvelteOnRails
|
|
|
177
178
|
end
|
|
178
179
|
|
|
179
180
|
def initialize_request_metrics(request_uuid)
|
|
180
|
-
@request_metrics
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
end
|
|
181
|
+
return if request_uuid == @request_metrics[:request_uuid]
|
|
182
|
+
|
|
183
|
+
@request_metrics = {
|
|
184
|
+
request_uuid: request_uuid,
|
|
185
|
+
total_time: 0.0
|
|
186
|
+
}
|
|
187
|
+
|
|
189
188
|
end
|
|
190
189
|
|
|
191
190
|
private
|
|
@@ -63,11 +63,12 @@ module SvelteOnRails
|
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
def model_attributes(model)
|
|
66
|
+
mn = model.model_name
|
|
66
67
|
{
|
|
67
|
-
'humanName' =>
|
|
68
|
-
'humanNamePlural' =>
|
|
69
|
-
'
|
|
70
|
-
'
|
|
68
|
+
'humanName' => mn.human,
|
|
69
|
+
'humanNamePlural' => mn.human(count: :many),
|
|
70
|
+
'paramKey' => mn.param_key,
|
|
71
|
+
'routeKey' => mn.route_key,
|
|
71
72
|
}
|
|
72
73
|
end
|
|
73
74
|
|