wal 0.0.9 → 0.0.11

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: '08cf62e21e9cd21bca29345d2e666d2d390e886d4ea8c43b9926b2807d7732ac'
4
- data.tar.gz: 6396204641b2b13f6dc64291f61072f2283a808a271fbed4f1a6b84dfe59245f
3
+ metadata.gz: 8a6543d93ccf8c59c612d32933117d99902b405d5d0eeed318a1881bd631dcad
4
+ data.tar.gz: 64068c771898951e4a92ed17bf6eb2bf19218f9c96c952d0b149b709ed73dbcc
5
5
  SHA512:
6
- metadata.gz: 4aa20fe9dd40ba5c66eb8d9499be96590bd2ab51e835c49d09e91307c1b978809e266e781312e502264bd446294e273a5796ad98dd9eece2ea7cd9a98f86a6e3
7
- data.tar.gz: ed72b21ca9e0e6d770d0cf2121f8ec9fb22aacf47b6cfd46d70946ec5200bc2d57feeb211d7edc65875171540f48f94dc376ccb0d3e4c38ffc855812eb6fb089
6
+ metadata.gz: 2ca56b7a682d6c3416466bcc11b845d862a28d6105a2e1bb24a51f6d8227fe676410a4db181bc7cd6ff1e564b46038b8d88c9030fe67857afe85c1cdc866792c
7
+ data.tar.gz: a21ca214983644b387de0cb6904ca35920b4486e3459cc816ee6331f0e47e018ca1de9785a82f8d86369b7a5d8058dae62d62ea59020965b69420d5a683b9fbc
data/exe/wal CHANGED
@@ -43,7 +43,14 @@ if cli["watch"]
43
43
  puts "Watcher finished for #{replication_slot}"
44
44
 
45
45
  elsif cli["start"]
46
- workers = YAML.load_file(cli["<config-file>"])["slots"].map do |slot, config|
46
+ slots = YAML.load_file(cli["<config-file>"])["slots"]
47
+
48
+ if slots.size > 1 && slots.values.any? { |slot| slot["replicator"] == "Wal::Pro::Replicator" }
49
+ $stderr.puts "Error: wal-pro doesn't support multiple replication slots"
50
+ exit 1
51
+ end
52
+
53
+ workers = slots.map do |slot, config|
47
54
  watcher = config["watcher"].constantize.new
48
55
  temporary = config["temporary"] || false
49
56
  publications = config["publications"] || []
@@ -10,7 +10,8 @@ module Wal
10
10
 
11
11
  source_root File.expand_path("templates", __dir__)
12
12
 
13
- argument :watcher, type: :string
13
+ argument :watcher, type: :string, required: true, banner: "WATCHER_CLASS", desc: "Wal Watcher class name"
14
+ class_option :columns, type: :boolean, required: false, default: false
14
15
 
15
16
  def self.next_migration_number(dir)
16
17
  ::ActiveRecord::Generators::Base.next_migration_number(dir)
@@ -53,6 +54,7 @@ module Wal
53
54
  .delete_callbacks
54
55
  .keys
55
56
  .reduce(tables) { |tables, table| tables.reverse_merge(table => []) }
57
+ .transform_values { |cols| options[:columns] ? cols : [] }
56
58
  else
57
59
  []
58
60
  end
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.9"
4
+ VERSION = "0.0.11"
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.9"
10
+ VERSION = "0.0.11"
11
11
 
12
12
  class BeginTransactionEvent < T::Struct
13
13
  prop :transaction_id, Integer, immutable: true
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.9
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Navarro
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-08-30 00:00:00.000000000 Z
10
+ date: 2025-09-08 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: pg