wal 0.0.18 → 0.0.20

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: d279bf26f64494f4f52cff1122ade2a9435cd3942be615a92a49f7a5dd64b5d6
4
- data.tar.gz: 6b899eacde8085da1ab80bd9cb63741f9b0a7357c1fc86f7821d52d07fbbe48f
3
+ metadata.gz: 823832e9e8ecbc21c1369c093e21da2f6feefc9d9ef0eb44ec73c38048075322
4
+ data.tar.gz: 23d82a6e7b0d7630fef5e34fc46db32bfb7786300c9a8b2ebbaad44098a1dc8f
5
5
  SHA512:
6
- metadata.gz: 8ad343f0b1a3468cf4707e68fcda76ba9859dbba1243c2dfa90c33eef1d0ea50e2791d57ca824163c4f1c7f231ddfeea0c3919400ecba3836c5314947caab6ad
7
- data.tar.gz: d5975b490f804064db2e1fba3dd02821d2877927d9333cbc8aa780a347295dd6816eb35a9468163c0d5f301a66d494504b4c195f79f30deb52f56cf48ef2b75a
6
+ metadata.gz: 3398ab723fab693c7c9ffa653fa7a3f399431b2cf05106dc56127a31240b4d72f158e515a402312553db4729fe8f39937e490a0f338aa9bf94afc7c3984cad22
7
+ data.tar.gz: cd5d54cb4ca4351ccff83090dbfd78b5d64a17b4119d6c9b49eb1c31da39d1ce6c7cb577f60137f1c88ad6222436b39b85b2ae623e3319c84e57cf44072cae71
data/exe/wal CHANGED
@@ -75,10 +75,10 @@ if cli["watch"]
75
75
  replication_slot = cli["--slot"]
76
76
  replication_slot = replication_slot.presence || "wal_watcher_#{SecureRandom.alphanumeric(4)}" if use_temporary_slot
77
77
  publications = cli["--publication"] || []
78
- replicator = cli["--replicator"].presence&.constantize || Wal::Replicator
78
+ replicator_class = cli["--replicator"].presence&.constantize || Wal::Replicator
79
79
 
80
80
  puts "Watcher started for #{replication_slot} slot (#{publications.join(", ")})"
81
- replicator = replicator.new(replication_slot:, use_temporary_slot:, db_config:)
81
+ replicator = replicator_class.new(replication_slot:, use_temporary_slot:, db_config:)
82
82
  replicator = Wal::LoggingReplicator.new(replication_slot, replicator)
83
83
  replicator.replicate_forever(watcher, publications:)
84
84
  puts "Watcher finished for #{replication_slot}"
@@ -90,14 +90,14 @@ elsif cli["start"]
90
90
  watcher = config["watcher"].constantize.new
91
91
  temporary = config["temporary"] || false
92
92
  publications = config["publications"] || []
93
- replicator = config["replicator"].presence&.constantize || Wal::Replicator
93
+ replicator_class = config["replicator"].presence&.constantize || Wal::Replicator
94
94
  retries = config["retries"]&.to_i || 5
95
95
 
96
96
  Thread.new(slot, watcher, temporary, publications) do |replication_slot, watcher, use_temporary_slot, publications|
97
97
  replication_slot = "#{replication_slot}_#{SecureRandom.alphanumeric(4)}" if use_temporary_slot
98
98
  puts "Watcher started for #{replication_slot} slot (#{publications.join(", ")})"
99
99
 
100
- replicator = replicator.new(replication_slot:, use_temporary_slot:, db_config:)
100
+ replicator = replicator_class.new(replication_slot:, use_temporary_slot:, db_config:)
101
101
  replicator = Wal::LoggingReplicator.new(replication_slot, replicator)
102
102
 
103
103
  begin
data/lib/wal/migration.rb CHANGED
@@ -33,6 +33,7 @@ module Wal
33
33
  BEGIN
34
34
  CASE WHEN NOT EXISTS (SELECT 1 FROM pg_publication WHERE pubname = '#{name}') THEN
35
35
  CREATE PUBLICATION #{name};
36
+ ELSE NULL;
36
37
  END CASE;
37
38
  END;
38
39
  $$;
data/lib/wal/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wal
4
- VERSION = "0.0.18"
4
+ VERSION = "0.0.20"
5
5
  end
data/rbi/wal.rbi CHANGED
@@ -7,7 +7,7 @@ module Wal
7
7
  UpdateEvent,
8
8
  DeleteEvent,
9
9
  ) }
10
- VERSION = "0.0.18"
10
+ VERSION = "0.0.20"
11
11
 
12
12
  class << self
13
13
  sig { returns(T.class_of(Logger)) }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Navarro
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-09-19 00:00:00.000000000 Z
10
+ date: 2025-09-20 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: pg