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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cc9e30553a044b4643c309e84d8050ae5c18f23058a8a2a78150c3b299df4008
4
- data.tar.gz: af91f5fed9c14e313044dd0c679ea3a26fcec60bb20e7236d1e405ebffc6da2f
3
+ metadata.gz: e6ec5ec95320f8d2158fd9e91a5ba062097e934eafa74a62338fcca24ebba443
4
+ data.tar.gz: f8f49ca49a92f92194583c3d02b07e6af5eb52e167e15684f99046eaa94643e9
5
5
  SHA512:
6
- metadata.gz: dd090f8858ee591ee03448c98db3beeea3e9c6a7fd3b16267a955f5378f17098c922e8da2bf603e1aedd96cc937fd63e23679695eaa2dbd6e7ab92e021dd0bb3
7
- data.tar.gz: d97a700ec52614de349776f941b3e61bd732549822c6f78528297261cd2ad59cdf5b4e0b3ecf5c201a4e6e49738247a0dba648344bc37148b2011d41a9db5cfa
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 RailsPulse migrations from dummy app (exclude dummy app's own migrations)
17
- all_dummy_migrations = Dir["test/dummy/db/migrate/*.rb"].map { |f| File.basename(f) }
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
@@ -1,3 +1,3 @@
1
1
  module RailsPulse
2
- VERSION = "0.3.0.pre.1"
2
+ VERSION = "0.3.0.pre.2"
3
3
  end
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.1
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-19 00:00:00.000000000 Z
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