torque-postgresql 1.1.4 → 1.1.5
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 +5 -5
- data/lib/torque/postgresql/schema_dumper.rb +16 -16
- data/lib/torque/postgresql/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 91a42a9a04ba195e57f4b87af2931a6ecf82e9d58a4acec84b95350404ee4977
|
4
|
+
data.tar.gz: e4fce1b312a40bf6e98a1f8bee8351795a45a5afddf25ce0f7765cd6c01d89ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56a370889f5ffbb09a2c414bd1a9c4311d4d415675fd8ac7f00a09ffb4b2aa4b70998b475f6ab494ad06f0e0b9783ddea599268f04d0c5d3184b9e1d0d644d44
|
7
|
+
data.tar.gz: 7341f28b3805af398868be6a4095c9dcf4b9e7d6be28a0ce4e2af0340004490e2e75b9eb6e7e63f9d6ac0bba1caf5fdb7154cd5b8d7928c6c093f748cda96d71
|
@@ -31,21 +31,21 @@ module Torque
|
|
31
31
|
if inherited_tables.present?
|
32
32
|
stream.puts " # These are tables that has inheritance"
|
33
33
|
inherited_tables.each do |table_name, inherits|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
34
|
+
next if ignored?(table_name)
|
35
|
+
|
36
|
+
sub_stream = StringIO.new
|
37
|
+
table(table_name, sub_stream)
|
38
|
+
|
39
|
+
# Add the inherits setting
|
40
|
+
sub_stream.rewind
|
41
|
+
inherits.map!(&:to_sym)
|
42
|
+
inherits = inherits.first if inherits.size === 1
|
43
|
+
inherits = ", inherits: #{inherits.inspect} do |t|"
|
44
|
+
table_dump = sub_stream.read.gsub(/ do \|t\|$/, inherits)
|
45
|
+
|
46
|
+
# Ensure bodyless definitions
|
47
|
+
table_dump.gsub!(/do \|t\|\n end/, '')
|
48
|
+
stream.print table_dump
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -63,7 +63,7 @@ module Torque
|
|
63
63
|
return unless types.any?
|
64
64
|
|
65
65
|
stream.puts " # These are user-defined types used on this database"
|
66
|
-
types.each { |name, type| send(type.to_sym, name, stream) }
|
66
|
+
types.sort_by(&:first).each { |name, type| send(type.to_sym, name, stream) }
|
67
67
|
stream.puts
|
68
68
|
rescue => e
|
69
69
|
stream.puts "# Could not dump user-defined types because of following #{e.class}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: torque-postgresql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Silva
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -260,8 +260,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
260
260
|
- !ruby/object:Gem::Version
|
261
261
|
version: 1.8.11
|
262
262
|
requirements: []
|
263
|
-
|
264
|
-
rubygems_version: 2.6.14
|
263
|
+
rubygems_version: 3.1.4
|
265
264
|
signing_key:
|
266
265
|
specification_version: 4
|
267
266
|
summary: ActiveRecord extension to access PostgreSQL advanced resources
|