avm-eac_postgresql_base0 0.5.3 → 0.6.0

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: b225a9cd207947f745ff37aaa23d898088217ff8787076ee9752407c81cbca86
4
- data.tar.gz: 375aab52990242c88133d75b04d84b8ba1b8fbcada204413317e1959e92aa105
3
+ metadata.gz: 30d9adec0df407334be0ce013c4f23e3d6b8869f60ea5a93ccce0de95f3a3ed2
4
+ data.tar.gz: 10ea286adcc5921d581185248f22c035c63c8c4ec50af9d3a29e22d72354a81f
5
5
  SHA512:
6
- metadata.gz: 8b98c338d49e17da1a7da5c7697e3e83403bbbaff559e9ef1b58a16ffabe556e971c421cc8ce4f3f19dfc49af2ee802e83ee1797458a619337c0105991a7598d
7
- data.tar.gz: 0a6a68ac3769c9c011a35f07c1486ef15318e3b5122b923b34baf4b3403f2544a5d3eab36ae946184df0323fffbe44360d6f80ee876eb7a45028190ecfa928ac
6
+ metadata.gz: 451a03834485483067fd8a938f19475d65a660b0f3e85482c08b6d263632c39ad7133db293acd715b72a30682d5b0c71b6394cf93fee339c7e3b1e8e01edaa43
7
+ data.tar.gz: 59e223d228d3f1a00a0719d7de8f8dd95e815c43ff10486fe3510f7f4c618b3925fd162f090c9df931a5d04222b511002fb22705c1d7632fa94d1ffd5ed840a3
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/core_ext'
4
-
5
3
  module Avm
6
4
  module EacPostgresqlBase0
7
5
  class Instance
@@ -60,7 +58,7 @@ module Avm
60
58
 
61
59
  private
62
60
 
63
- def root_boolean_query(sql_after_projection)
61
+ def root_boolean_query(sql_after_projection) # rubocop:disable Naming/PredicateMethod
64
62
  root_query("SELECT 1 #{sql_after_projection}") == '1'
65
63
  end
66
64
 
@@ -1,39 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/eac_postgresql_base0/instance/data_unit'
4
- require 'eac_ruby_utils/core_ext'
5
-
6
3
  module Avm
7
4
  module EacPostgresqlBase0
8
5
  class Instance
9
6
  module Commands
10
- DUMP_EXCLUDE_PATTERNS = ['(CREATE|COMMENT ON) EXTENSION',
11
- 'SET default_table_access_method'].freeze
12
-
13
7
  # @return [EacRubyUtils::Envs::Command]
14
8
  def dump_command
15
- DUMP_EXCLUDE_PATTERNS
16
- .inject(pg_dump_command) { |a, e| a.pipe(exclude_pattern_command(e)) }
9
+ pg_dump_command
17
10
  end
18
11
 
19
12
  # @return [EacRubyUtils::Envs::Command]
20
13
  def dump_gzip_command
21
- dump_command.pipe(gzip_compress_command)
22
- end
23
-
24
- # @return [EacRubyUtils::Envs::Command]
25
- def gzip_compress_command
26
- env.command('gzip', '-9', '-c')
27
- end
28
-
29
- # @return [EacRubyUtils::Envs::Command]
30
- def gzip_decompress_command
31
- env.command('gzip', '-d')
14
+ dump_command
32
15
  end
33
16
 
34
17
  # @return [EacRubyUtils::Envs::Command]
35
18
  def load_gzip_command
36
- gzip_decompress_command.pipe(psql_command)
19
+ pg_restore_command
37
20
  end
38
21
 
39
22
  # @return [String]
@@ -57,21 +40,29 @@ module Avm
57
40
  end
58
41
 
59
42
  def common_command_args(database = true) # rubocop:disable Style/OptionalBooleanParameter
60
- ['--host', host, '--username', user, '--port', port,
61
- (database ? name : MAINTENANCE_DATABASE)]
43
+ ['--host', host, '--username', user, '--port', port] + database_args(database)
62
44
  end
63
45
 
64
46
  private
65
47
 
66
- # @return [EacRubyUtils::Envs::Command]
67
- def exclude_pattern_command(pattern)
68
- env.command('sed', '--regexp-extended', "s/(^|\\n)#{pattern}[^;]*;//gm")
48
+ # @param database [Boolean, String]
49
+ # @return [String]
50
+ def database_args(database)
51
+ return [database, name] if database.is_a?(String)
52
+
53
+ [database ? name : MAINTENANCE_DATABASE]
69
54
  end
70
55
 
71
56
  # @return [EacRubyUtils::Envs::Command]
72
57
  def pg_dump_command
73
- env.command('pg_dump', '--no-privileges', '--no-owner', *common_command_args)
74
- .envvar('PGPASSWORD', password)
58
+ env.command('pg_dump', '--no-privileges', '--no-owner', '--format=custom',
59
+ *common_command_args).envvar('PGPASSWORD', password)
60
+ end
61
+
62
+ # @return [EacRubyUtils::Envs::Command]
63
+ def pg_restore_command
64
+ env.command('pg_restore', '--exit-on-error', '--no-owner', '--no-comments',
65
+ *common_command_args('--dbname')).envvar('PGPASSWORD', password)
75
66
  end
76
67
  end
77
68
  end
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/instances/data/unit'
4
-
5
3
  module Avm
6
4
  module EacPostgresqlBase0
7
5
  class Instance
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/eac_postgresql_base0/instance/data_unit'
4
- require 'eac_ruby_utils/core_ext'
5
-
6
3
  module Avm
7
4
  module EacPostgresqlBase0
8
5
  class Instance
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/instances/entry_keys'
4
- require 'avm/eac_postgresql_base0/instance'
5
-
6
3
  module Avm
7
4
  module EacPostgresqlBase0
8
5
  module InstanceWith
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacPostgresqlBase0
5
- VERSION = '0.5.3'
5
+ VERSION = '0.6.0'
6
6
  end
7
7
  end
@@ -1,9 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/core_ext'
3
+ require 'eac_ruby_utils'
4
+ EacRubyUtils::RootModuleSetup.perform __FILE__
4
5
 
5
6
  module Avm
6
7
  module EacPostgresqlBase0
7
- require_sub __FILE__
8
8
  end
9
9
  end
10
+
11
+ require 'avm'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm-eac_postgresql_base0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Put here the authors
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-18 00:00:00.000000000 Z
11
+ date: 2026-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm
@@ -16,44 +16,62 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.85'
19
+ version: '0.98'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.98.4
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
- version: '0.85'
29
+ version: '0.98'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.98.4
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: eac_ruby_utils
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
37
  - - "~>"
32
38
  - !ruby/object:Gem::Version
33
- version: '0.121'
39
+ version: '0.129'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 0.129.1
34
43
  type: :runtime
35
44
  prerelease: false
36
45
  version_requirements: !ruby/object:Gem::Requirement
37
46
  requirements:
38
47
  - - "~>"
39
48
  - !ruby/object:Gem::Version
40
- version: '0.121'
49
+ version: '0.129'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 0.129.1
41
53
  - !ruby/object:Gem::Dependency
42
54
  name: eac_ruby_gem_support
43
55
  requirement: !ruby/object:Gem::Requirement
44
56
  requirements:
45
57
  - - "~>"
46
58
  - !ruby/object:Gem::Version
47
- version: '0.10'
59
+ version: '0.12'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 0.12.1
48
63
  type: :development
49
64
  prerelease: false
50
65
  version_requirements: !ruby/object:Gem::Requirement
51
66
  requirements:
52
67
  - - "~>"
53
68
  - !ruby/object:Gem::Version
54
- version: '0.10'
55
- description:
56
- email:
69
+ version: '0.12'
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 0.12.1
73
+ description:
74
+ email:
57
75
  executables: []
58
76
  extensions: []
59
77
  extra_rdoc_files: []
@@ -65,10 +83,10 @@ files:
65
83
  - lib/avm/eac_postgresql_base0/instance/data_unit.rb
66
84
  - lib/avm/eac_postgresql_base0/instance_with.rb
67
85
  - lib/avm/eac_postgresql_base0/version.rb
68
- homepage:
86
+ homepage:
69
87
  licenses: []
70
88
  metadata: {}
71
- post_install_message:
89
+ post_install_message:
72
90
  rdoc_options: []
73
91
  require_paths:
74
92
  - lib
@@ -83,8 +101,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
101
  - !ruby/object:Gem::Version
84
102
  version: '0'
85
103
  requirements: []
86
- rubygems_version: 3.1.6
87
- signing_key:
104
+ rubygems_version: 3.4.19
105
+ signing_key:
88
106
  specification_version: 4
89
107
  summary: Put here de description.
90
108
  test_files: []