rails_pulse 0.3.0.pre.1 → 0.3.0.pre.2
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 +4 -4
- data/Rakefile +2 -11
- data/db/rails_pulse_migrate/20260417000001_add_diagnostic_fields.rb +1 -1
- data/db/rails_pulse_migrate/20260420000001_expand_normalized_sql_column.rb +28 -0
- data/lib/rails_pulse/version.rb +1 -1
- metadata +4 -3
- /data/db/rails_pulse_migrate/{20250209000001_add_p95_p99_duration_to_rails_pulse_jobs.rb → 20260419000001_add_p95_p99_duration_to_rails_pulse_jobs.rb} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e6ec5ec95320f8d2158fd9e91a5ba062097e934eafa74a62338fcca24ebba443
|
|
4
|
+
data.tar.gz: f8f49ca49a92f92194583c3d02b07e6af5eb52e167e15684f99046eaa94643e9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 80b06492afb0eb55a87e422fc0bf2920b9c6dd8d8a025b3851f060b06e08792158250199a93ca6caca111c055f07033e981788473cc90e0733dc90d5c15e25b9
|
|
7
|
+
data.tar.gz: 7e97409c2903f3847b99ce5259354ebaf841c47975be411094b4440a74f89b0d51f64db9bae1fb9f5ca81649f65d4ac79230aee5f752946b9ac2da7ec1a1cf0b
|
data/Rakefile
CHANGED
|
@@ -13,17 +13,8 @@ task :verify_dummy_migrations do
|
|
|
13
13
|
if Dir.exist?("db/rails_pulse_migrate")
|
|
14
14
|
gem_migrations = Dir["db/rails_pulse_migrate/*.rb"].map { |f| File.basename(f) }.sort
|
|
15
15
|
|
|
16
|
-
# Get all
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
# Filter to only RailsPulse migrations (contain "rails_pulse" in name or match known patterns)
|
|
20
|
-
dummy_migrations = all_dummy_migrations.select do |m|
|
|
21
|
-
m.include?("rails_pulse") ||
|
|
22
|
-
m.include?("jobs") ||
|
|
23
|
-
m.include?("query") ||
|
|
24
|
-
m.include?("request_uuid") ||
|
|
25
|
-
m.include?("diagnostic")
|
|
26
|
-
end.sort
|
|
16
|
+
# Get all migrations from dummy app
|
|
17
|
+
dummy_migrations = Dir["test/dummy/db/migrate/*.rb"].map { |f| File.basename(f) }
|
|
27
18
|
|
|
28
19
|
missing = gem_migrations - dummy_migrations
|
|
29
20
|
|
|
@@ -4,7 +4,7 @@ class AddDiagnosticFields < ActiveRecord::Migration[7.0]
|
|
|
4
4
|
add_column :rails_pulse_operations, :row_count, :integer
|
|
5
5
|
end
|
|
6
6
|
unless column_exists?(:rails_pulse_operations, :cache_hit)
|
|
7
|
-
add_column :rails_pulse_operations, :cache_hit, :boolean
|
|
7
|
+
add_column :rails_pulse_operations, :cache_hit, :boolean, null: false, default: false
|
|
8
8
|
end
|
|
9
9
|
unless column_exists?(:rails_pulse_operations, :repeated_query_group)
|
|
10
10
|
add_column :rails_pulse_operations, :repeated_query_group, :text
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
class ExpandNormalizedSqlColumn < ActiveRecord::Migration[7.0]
|
|
2
|
+
def up
|
|
3
|
+
return unless table_exists?(:rails_pulse_queries)
|
|
4
|
+
|
|
5
|
+
adapter = connection.adapter_name.downcase
|
|
6
|
+
|
|
7
|
+
# SQLite doesn't enforce string length limits, so no migration needed there.
|
|
8
|
+
# change_column is also not supported on SQLite.
|
|
9
|
+
return unless adapter.include?("postgresql") || adapter.include?("mysql")
|
|
10
|
+
|
|
11
|
+
column = connection.columns(:rails_pulse_queries).find { |c| c.name == "normalized_sql" }
|
|
12
|
+
return unless column
|
|
13
|
+
|
|
14
|
+
# Only migrate if the column is still a limited string type (not already text)
|
|
15
|
+
return unless column.type == :string
|
|
16
|
+
|
|
17
|
+
change_column :rails_pulse_queries, :normalized_sql, :text, null: false
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def down
|
|
21
|
+
return unless table_exists?(:rails_pulse_queries)
|
|
22
|
+
|
|
23
|
+
adapter = connection.adapter_name.downcase
|
|
24
|
+
return unless adapter.include?("postgresql") || adapter.include?("mysql")
|
|
25
|
+
|
|
26
|
+
change_column :rails_pulse_queries, :normalized_sql, :string, limit: 1000, null: false
|
|
27
|
+
end
|
|
28
|
+
end
|
data/lib/rails_pulse/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_pulse
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.0.pre.
|
|
4
|
+
version: 0.3.0.pre.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rails Pulse
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-04-
|
|
11
|
+
date: 2026-04-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -431,8 +431,9 @@ files:
|
|
|
431
431
|
- config/importmap.rb
|
|
432
432
|
- config/initializers/rails_pulse.rb
|
|
433
433
|
- config/routes.rb
|
|
434
|
-
- db/rails_pulse_migrate/20250209000001_add_p95_p99_duration_to_rails_pulse_jobs.rb
|
|
435
434
|
- db/rails_pulse_migrate/20260417000001_add_diagnostic_fields.rb
|
|
435
|
+
- db/rails_pulse_migrate/20260419000001_add_p95_p99_duration_to_rails_pulse_jobs.rb
|
|
436
|
+
- db/rails_pulse_migrate/20260420000001_expand_normalized_sql_column.rb
|
|
436
437
|
- db/rails_pulse_schema.rb
|
|
437
438
|
- exe/rails_pulse_server
|
|
438
439
|
- lib/generators/rails_pulse/base_methods.rb
|