rails_spotlight 0.3.2 → 0.3.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: cad3b5a0625c0bbe18a749bd2ea5ea2fda11d235917b2c518125364aaf540562
|
4
|
+
data.tar.gz: dcd4f115cec94cca2671df28ac6f111bd305e00e00391f7fdf1b4e6d2c9846a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b82a68c8915d42c93370d8007c9c8b2bed94cf253c6cd4c82b728cb514ef11d0e3d8f3d96dd478f851afcb18e04f89d99c48e4d6b691205ddd7a1c6d1abcbd63
|
7
|
+
data.tar.gz: 56119e84a018d3f2e6370c70204d2648d644211d89bac1327735ebf356556f8ac0e3ddb538c321702bf85e1a191dbe7c5075168cbf3c828d0e64dcc148a091fe
|
@@ -62,6 +62,9 @@ module RailsSpotlight
|
|
62
62
|
# Subscribe to all events relevant to RailsPanel
|
63
63
|
#
|
64
64
|
def self.subscribe
|
65
|
+
# Skip RailsSpotlight subscriptions during migrations
|
66
|
+
return if migrating?
|
67
|
+
|
65
68
|
new
|
66
69
|
.subscribe('rsl.notification.log')
|
67
70
|
.subscribe('sql.active_record', &SQL_BLOCK)
|
@@ -92,6 +95,12 @@ module RailsSpotlight
|
|
92
95
|
# such as the collection name and the partial being used to render each item.
|
93
96
|
end
|
94
97
|
|
98
|
+
def self.migrating?
|
99
|
+
defined?(Rake) && Rake.application.top_level_tasks.any? do |task|
|
100
|
+
task.start_with?('db:migrate', 'db:schema:load', 'db:rollback')
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
95
104
|
def subscribe(event_name)
|
96
105
|
ActiveSupport::Notifications.subscribe(event_name) do |*args|
|
97
106
|
event = block_given? ? yield(*args) : Event.new(*args)
|
@@ -6,7 +6,12 @@ require 'erb'
|
|
6
6
|
module RailsSpotlight
|
7
7
|
class Configuration # rubocop:disable Metrics/ClassLength
|
8
8
|
DEFAULT_NOT_ENCODABLE_EVENT_VALUES = {
|
9
|
-
'ActiveRecord' => [
|
9
|
+
'ActiveRecord' => [
|
10
|
+
'ActiveRecord::ConnectionAdapters::AbstractAdapter',
|
11
|
+
'ActiveRecord::ConnectionAdapters::PostgreSQLAdapter',
|
12
|
+
'ActiveRecord::ConnectionAdapters::RealTransaction',
|
13
|
+
'ActiveRecord::SchemaMigration'
|
14
|
+
],
|
10
15
|
'ActionDispatch' => ['ActionDispatch::Request', 'ActionDispatch::Response']
|
11
16
|
}.freeze
|
12
17
|
|