ruby-pg-extras 3.2.0 → 3.2.1

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: 3fd26a79ff47d4681d4e39888c8f1b362ff2c585c526c06b779e0fd84c3bdd7b
4
- data.tar.gz: c516bc6586e939a6bdf9c815823094a1e1b92ef30c3dcf7064eb9a2b3394a845
3
+ metadata.gz: 05d2e5841e02ca2a6ea167296d565a0df5e9a516c9e975589db3bd1b7856a5f7
4
+ data.tar.gz: 21a2d1b015d0558f4875f5cf1862b5e63a6e1ecbface59d88439712894716d17
5
5
  SHA512:
6
- metadata.gz: ecc8790295246456eb2ff3bd7025a08ed0a44b435bcf2af7070b35e2f081eeb302061e976a96d0ef5ef21422168637053fed1931687ec96d44e64f457ec21f51
7
- data.tar.gz: 4a87d50af4289473bbf40bfe1dfae20bb214feca969ff56b34b3f27ba9321b28c3415443c3374970747877e3d5b3c14c0780e4e3108cdbf757eb1e0426c088d8
6
+ metadata.gz: 0bf1ddceb1d24b718b979abc9dc03c04b94d6500487318e32805c8885f8a244bb548dd7c9dd7f738be7de0fa73f1212493a3a22c431ace69478aed2a38901dc7
7
+ data.tar.gz: 628eeea090e2839bc38d512a801f13ab7ef7413eb2c45719171dd9946800e9a98444f81a96d14102da749de85776931a616aee5e06f46a4d4f0469cca0e6cb1c
@@ -10,7 +10,6 @@ module RubyPGExtras
10
10
 
11
11
  def call(data)
12
12
  rows = data.sort do |el|
13
- p el
14
13
  el.fetch(:ok) ? 1 : -1
15
14
  end.map do |el|
16
15
  symbol = el.fetch(:ok) ? "√" : "x"
@@ -11,10 +11,13 @@ module RubyPGExtras
11
11
  else
12
12
  index_data.fetch("tablename") == table_name
13
13
  end
14
+ end.sort_by do |index_data|
15
+ index_data.fetch("tablename")
14
16
  end.map do |index_data|
15
17
  index_name = index_data.fetch("indexname")
18
+
16
19
  {
17
- index_name: index_data.fetch("indexname"),
20
+ index_name: index_name,
18
21
  table_name: index_data.fetch("tablename"),
19
22
  columns: index_data.fetch("columns").split(',').map(&:strip),
20
23
  index_size: index_size_data.find do |el|
@@ -11,6 +11,8 @@ module RubyPGExtras
11
11
  else
12
12
  table_data.fetch("tablename") == table_name
13
13
  end
14
+ end.sort_by do |table_data|
15
+ table_data.fetch("tablename")
14
16
  end.map do |table_data|
15
17
  table_name = table_data.fetch("tablename")
16
18
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyPGExtras
4
- VERSION = "3.2.0"
4
+ VERSION = "3.2.1"
5
5
  end
@@ -87,7 +87,7 @@ module RubyPGExtras
87
87
  end
88
88
  end
89
89
 
90
- def self.index_info(args:, in_format: :display_table)
90
+ def self.index_info(args: {}, in_format: :display_table)
91
91
  data = RubyPGExtras::IndexInfo.call(args[:table_name])
92
92
 
93
93
  if in_format == :display_table
@@ -101,7 +101,7 @@ module RubyPGExtras
101
101
  end
102
102
  end
103
103
 
104
- def self.table_info(args:, in_format: :display_table)
104
+ def self.table_info(args: {}, in_format: :display_table)
105
105
  data = RubyPGExtras::TableInfo.call(args[:table_name])
106
106
 
107
107
  if in_format == :display_table
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-pg-extras
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawurb