active_record_mysql_repl 0.1.12 → 0.1.13

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: fb8ee6363c8b678044b161c2226a2c8f3260797b1f6373d29ccf444149219504
4
- data.tar.gz: 0cb27fd8dc02ce73834a56985ef10b6b6a8aafdb7bb429c399d4bd9f17c22f69
3
+ metadata.gz: 160466e890cc14e62324cc901b40a0c6d6e763975acfb63277c986be775ebf59
4
+ data.tar.gz: aada8ca1327db2781938c15d4d0856fd5145873ab4a94bb280342d619f7eac7a
5
5
  SHA512:
6
- metadata.gz: b029d35e7f40a62adccecbf47bc2a0262c4ed83386408252e79d4d05910eb45d268564ba4ffbc1ad63f0552232bf456a44fab0d6172ab03d94831a92eaeb44d6
7
- data.tar.gz: f726cefaad6d521c3d44a5f6df61f63fec00d7ed065d8215b54afe29ec0f2196b65b27419ecb2aef8feeb137855a3dfaa902a6c079a88e3bd71f0c0909bec1bc
6
+ metadata.gz: 59f475c00a2f0dfcb62353e32c7737109a73beccfd9b1a43e98b8f7539828b4959555de4f3178d82701cbc14d66ddbbe5d58c4b43aa97fa85e7169cd93ea9923
7
+ data.tar.gz: e584f60bdb9eb7928873ca8ef0bda40ce7444111ac3ef122dee096de5c8dd520185dac482cf5126a380d437c297392c6a6d7fa8b4055d2f05bc9d4993af2f936
@@ -53,10 +53,12 @@ module ActiverecordMysqlRepl
53
53
  t.rows = arr.map(&:values)
54
54
 
55
55
  when :vertical
56
- t.headings = ["Name", "Value"]
57
- arr.each.with_index do |row, i|
58
- row.each { |col, val| t.add_row [col, val] }
59
- t.add_separator if i < arr.size - 1
56
+ headings = ["Column", arr.map.with_index { |_, i| "Record#{i+1}" }].flatten
57
+ t.headings = headings
58
+
59
+ arr.first.keys.each_with_index do |col|
60
+ cols = [col, arr.map { |r| r[col] }].flatten
61
+ t.add_row cols
60
62
  end
61
63
  end
62
64
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRecordMysqlRepl
4
- VERSION = "0.1.12"
4
+ VERSION = "0.1.13"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_mysql_repl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroki Kishi
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-04-12 00:00:00.000000000 Z
10
+ date: 2025-09-16 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: byebug