manageiq-postgres_ha_admin 3.0.1 → 3.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 69058e26d2972bfc1d80272447fccb3c2c7f489d
4
- data.tar.gz: 3361d3e280fbb91f4e62aaca639816a8d40b4a77
2
+ SHA256:
3
+ metadata.gz: 8b4c03cda17ed0475dbc8fbe5bf68aa11704047da6067bf40e33fc41a1945a9f
4
+ data.tar.gz: 63db9fd31ea8a59e9a8967afc36d75fe9419c79a7e8f3b75964e47fd0c3cb20c
5
5
  SHA512:
6
- metadata.gz: 466386de6374dc0f02100d1641ee5b0ce82f8a42ecc0d15ad1de5e1a492192c0f34c2d5b02fbc0e5a256d5d5ea0171a1915d8fad3e5faea7ccd7f69678a53531
7
- data.tar.gz: 2c304a3e5452f00dc28bce7733e9c1f80e8679a781afe7729a7f0b1daca4acec41a63984880b8dc4ef64c8338f0dd91ca360dcb39e85bb76d3831a0f460d36e0
6
+ metadata.gz: 9d3b92acf8ec4e2266543b610985a5bdd8c4d69d322f92c05dd3dc0d52cb14e536f1abb78c91b2fd0ca337fe045b5f5c3b0af2fb9aec8cfe26746e792e474679
7
+ data.tar.gz: 03e0ccd79e54f83d6cec84c387aa3eeb547b4a6b8fe59fef03fa704f335447a47ec73da245aef2ad84bc6aacda3bfb0e8fea7e99b6db4834a87732f0b0fd863f
data/.codeclimate.yml CHANGED
@@ -1,18 +1,21 @@
1
- ---
2
- exclude_paths:
3
- - ".git/"
4
- - "**.xml"
5
- - "**.yaml"
6
- - "**.yml"
7
- - "locale/"
8
- - "spec/"
9
- - "tools/"
10
- engines:
1
+ prepare:
2
+ fetch:
3
+ - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/.rubocop_base.yml
4
+ path: ".rubocop_base.yml"
5
+ - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/.rubocop_cc_base.yml
6
+ path: ".rubocop_cc_base.yml"
7
+ - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/styles/base.yml
8
+ path: styles/base.yml
9
+ - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/styles/cc_base.yml
10
+ path: styles/cc_base.yml
11
+ plugins:
12
+ rubocop:
13
+ enabled: true
14
+ config: ".rubocop_cc.yml"
15
+ channel: rubocop-0-82
11
16
  brakeman:
12
- # very slow :sad_panda:
13
17
  enabled: false
14
18
  bundler-audit:
15
- # requires Gemfile.lock
16
19
  enabled: false
17
20
  csslint:
18
21
  enabled: false
@@ -24,24 +27,17 @@ engines:
24
27
  - javascript
25
28
  eslint:
26
29
  enabled: false
27
- channel: "eslint-3"
30
+ channel: eslint-3
28
31
  fixme:
29
- # let's enable later
30
32
  enabled: false
31
33
  markdownlint:
32
- # let's enable later
33
34
  enabled: false
34
- rubocop:
35
- enabled: true
36
- config: '.rubocop_cc.yml'
37
- prepare:
38
- fetch:
39
- - url: "https://raw.githubusercontent.com/ManageIQ/guides/master/.rubocop_base.yml"
40
- path: ".rubocop_base.yml"
41
- - url: "https://raw.githubusercontent.com/ManageIQ/guides/master/.rubocop_cc_base.yml"
42
- path: ".rubocop_cc_base.yml"
43
- ratings:
44
- paths:
45
- - Gemfile.lock
46
- - "**.rake"
47
- - "**.rb"
35
+ exclude_patterns:
36
+ - ".git/"
37
+ - "**.xml"
38
+ - "**.yaml"
39
+ - "**.yml"
40
+ - locale/
41
+ - spec/
42
+ - tools/
43
+ version: '2'
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  inherit_from:
2
- - https://raw.githubusercontent.com/ManageIQ/guides/master/.rubocop_base.yml
3
- # put all local rubocop config into .rubocop_local.yml as it will be loaded by .rubocop_cc.yml as well
4
- - .rubocop_local.yml
2
+ - ".rubocop_local.yml"
3
+ inherit_gem:
4
+ manageiq-style: ".rubocop_base.yml"
data/.rubocop_cc.yml CHANGED
@@ -1,5 +1,4 @@
1
1
  inherit_from:
2
- # this is downloaded by .codeclimate.yml
3
- - .rubocop_base.yml
4
- - .rubocop_cc_base.yml
5
- - .rubocop_local.yml
2
+ - ".rubocop_base.yml"
3
+ - ".rubocop_cc_base.yml"
4
+ - ".rubocop_local.yml"
data/.travis.yml CHANGED
@@ -1,9 +1,9 @@
1
- dist: xenial
2
1
  language: ruby
3
2
  rvm:
4
- - '2.3.1'
5
- - '2.4.2'
6
- sudo: false
3
+ - 2.5.8
4
+ - 2.6.6
5
+ - 2.7.2
6
+ - 3.0.0
7
7
  cache: bundler
8
8
  env:
9
9
  global:
data/CHANGELOG.md CHANGED
@@ -3,6 +3,24 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## [3.1.3] - 2021-09-27
7
+
8
+ ### Changed
9
+ - Loosen manageiq-password dependency to < 2 [#26](https://github.com/ManageIQ/manageiq-postgres_ha_admin/pull/26)
10
+ - Update ruby versions to 2.5.8 minimum [#25](https://github.com/ManageIQ/manageiq-postgres_ha_admin/pull/25)
11
+ - Switch to manageiq-style [#24](https://github.com/ManageIQ/manageiq-postgres_ha_admin/pull/24)
12
+
13
+ ## [3.1.2] - 2020-12-21
14
+ - Allow for Rails 6.0 [#23](https://github.com/ManageIQ/manageiq-postgres_ha_admin/pull/23)
15
+
16
+ ## [3.1.1] - 2019-12-12
17
+ - Remove the dependency on linux_admin [#19](https://github.com/ManageIQ/manageiq-postgres_ha_admin/pull/19)
18
+
19
+ ## [3.1.0] - 2019-05-09
20
+
21
+ ### Added
22
+ - Add a logical replication config handler [#17](https://github.com/ManageIQ/manageiq-postgres_ha_admin/pull/17)
23
+
6
24
  ## [3.0.1] - 2019-03-19
7
25
 
8
26
  ### Changed
@@ -27,7 +45,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
27
45
  ### Changed
28
46
  - Make changes for upgrading repmgr to version 4 [#4](https://github.com/ManageIQ/manageiq-postgres_ha_admin/pull/4)
29
47
 
30
- [Unreleased]: https://github.com/ManageIQ/manageiq-postgres_ha_admin/compare/v3.0.1...master
48
+ [Unreleased]: https://github.com/ManageIQ/manageiq-postgres_ha_admin/compare/v3.1.2...master
49
+ [3.1.2]: https://github.com/ManageIQ/manageiq-postgres_ha_admin/compare/v3.1.1...v3.1.2
50
+ [3.1.1]: https://github.com/ManageIQ/manageiq-postgres_ha_admin/compare/v3.1.0...v3.1.1
51
+ [3.1.0]: https://github.com/ManageIQ/manageiq-postgres_ha_admin/compare/v3.0.1...v3.1.0
31
52
  [3.0.1]: https://github.com/ManageIQ/manageiq-postgres_ha_admin/compare/v3.0.0...v3.0.1
32
53
  [3.0.0]: https://github.com/ManageIQ/manageiq-postgres_ha_admin/compare/v2.0.0...v3.0.0
33
54
  [2.0.0]: https://github.com/ManageIQ/manageiq-postgres_ha_admin/compare/v1.0.0...v2.0.0
data/CODEOWNERS ADDED
@@ -0,0 +1 @@
1
+ * @carbonin
data/Gemfile CHANGED
@@ -1,7 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in manageiq-smartstate.gemspec
3
+ # Specify your gem's dependencies in manageiq-postgres_ha_admin.gemspec
4
4
  gemspec
5
-
6
- # For util/postgres_admin
7
- gem "manageiq-gems-pending", :git => "https://github.com/ManageIQ/manageiq-gems-pending", :branch => "master"
data/README.md CHANGED
@@ -4,7 +4,6 @@
4
4
  [![Build Status](https://travis-ci.org/ManageIQ/manageiq-postgres_ha_admin.svg)](https://travis-ci.org/ManageIQ/manageiq-postgres_ha_admin)
5
5
  [![Code Climate](https://codeclimate.com/github/ManageIQ/manageiq-postgres_ha_admin.svg)](https://codeclimate.com/github/ManageIQ/manageiq-postgres_ha_admin)
6
6
  [![Test Coverage](https://codeclimate.com/github/ManageIQ/manageiq-postgres_ha_admin/badges/coverage.svg)](https://codeclimate.com/github/ManageIQ/manageiq-postgres_ha_admin/coverage)
7
- [![Dependency Status](https://gemnasium.com/ManageIQ/manageiq-postgres_ha_admin.svg)](https://gemnasium.com/ManageIQ/manageiq-postgres_ha_admin)
8
7
  [![Security](https://hakiri.io/github/ManageIQ/manageiq-postgres_ha_admin/master.svg)](https://hakiri.io/github/ManageIQ/manageiq-postgres_ha_admin/master)
9
8
 
10
9
  [![Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ManageIQ/manageiq-postgres_ha_admin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
@@ -0,0 +1,34 @@
1
+ require 'pg'
2
+ require 'pg/dsn_parser'
3
+
4
+ module ManageIQ
5
+ module PostgresHaAdmin
6
+ class LogicalReplicationConfigHandler < ConfigHandler
7
+ attr_reader :subscription, :conn_info
8
+
9
+ def initialize(options = {})
10
+ @subscription = options[:subscription]
11
+ @conn_info = options[:conn_info]
12
+ end
13
+
14
+ def name
15
+ "Logical Replication subscription #{subscription} Config Handler"
16
+ end
17
+
18
+ def read
19
+ conn = PG::Connection.open(@conn_info)
20
+ dsn = conn.exec_params(<<~SQL, [@subscription]).first["subconninfo"]
21
+ SELECT subconninfo
22
+ FROM pg_subscription
23
+ WHERE subname = $1
24
+ SQL
25
+ PG::DSNParser.new.parse(dsn)
26
+ end
27
+
28
+ def write(_params)
29
+ # Nothing to do here as the expectation is that the user will
30
+ # remove and re-add the subscription in the after failover callback
31
+ end
32
+ end
33
+ end
34
+ end
@@ -1,6 +1,5 @@
1
1
  require 'active_support/all'
2
2
  require 'pg'
3
- require 'linux_admin'
4
3
 
5
4
  module ManageIQ
6
5
  module PostgresHaAdmin
@@ -1,5 +1,5 @@
1
1
  module ManageIQ
2
2
  module PostgresHaAdmin
3
- VERSION = '3.0.1'.freeze
3
+ VERSION = '3.1.3'.freeze
4
4
  end
5
5
  end
@@ -9,6 +9,7 @@ require 'manageiq/postgres_ha_admin/failover_monitor'
9
9
  require 'manageiq/postgres_ha_admin/config_handler'
10
10
  require 'manageiq/postgres_ha_admin/config_handler/rails_config_handler'
11
11
  require 'manageiq/postgres_ha_admin/config_handler/pglogical_config_handler'
12
+ require 'manageiq/postgres_ha_admin/config_handler/logical_replication_config_handler'
12
13
 
13
14
  module ManageIQ
14
15
  module PostgresHaAdmin
@@ -20,16 +20,18 @@ Gem::Specification.new do |spec|
20
20
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
21
  spec.require_paths = ["lib"]
22
22
 
23
- spec.add_runtime_dependency "awesome_spawn", "~> 1.4"
24
- spec.add_runtime_dependency "linux_admin", "~> 1.0"
25
- spec.add_runtime_dependency "manageiq-password", "~> 0.3"
23
+ spec.required_ruby_version = ">= 2.5.8"
24
+
25
+ spec.add_runtime_dependency "activesupport", ">=5.0", "< 6.1"
26
+ spec.add_runtime_dependency "awesome_spawn", "~> 1.4"
27
+ spec.add_runtime_dependency "manageiq-password", "< 2"
26
28
  spec.add_runtime_dependency "pg"
27
- spec.add_runtime_dependency "pg-dsn_parser", "~> 0.1"
29
+ spec.add_runtime_dependency "pg-dsn_parser", "~> 0.1"
28
30
 
29
31
  spec.add_development_dependency "bundler"
30
32
  spec.add_development_dependency "codeclimate-test-reporter", "~> 1.0.0"
33
+ spec.add_development_dependency "manageiq-style"
31
34
  spec.add_development_dependency "rake"
32
- spec.add_development_dependency "rspec", "~> 3.0"
33
- spec.add_development_dependency "rubocop"
35
+ spec.add_development_dependency "rspec", "~> 3.0"
34
36
  spec.add_development_dependency "simplecov"
35
37
  end
metadata CHANGED
@@ -1,57 +1,63 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manageiq-postgres_ha_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ManageIQ Developers
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-19 00:00:00.000000000 Z
11
+ date: 2021-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: awesome_spawn
14
+ name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.4'
19
+ version: '5.0'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '6.1'
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: '1.4'
29
+ version: '5.0'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '6.1'
27
33
  - !ruby/object:Gem::Dependency
28
- name: linux_admin
34
+ name: awesome_spawn
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
37
  - - "~>"
32
38
  - !ruby/object:Gem::Version
33
- version: '1.0'
39
+ version: '1.4'
34
40
  type: :runtime
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
44
  - - "~>"
39
45
  - !ruby/object:Gem::Version
40
- version: '1.0'
46
+ version: '1.4'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: manageiq-password
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
- - - "~>"
51
+ - - "<"
46
52
  - !ruby/object:Gem::Version
47
- version: '0.3'
53
+ version: '2'
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
- - - "~>"
58
+ - - "<"
53
59
  - !ruby/object:Gem::Version
54
- version: '0.3'
60
+ version: '2'
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: pg
57
63
  requirement: !ruby/object:Gem::Requirement
@@ -109,7 +115,7 @@ dependencies:
109
115
  - !ruby/object:Gem::Version
110
116
  version: 1.0.0
111
117
  - !ruby/object:Gem::Dependency
112
- name: rake
118
+ name: manageiq-style
113
119
  requirement: !ruby/object:Gem::Requirement
114
120
  requirements:
115
121
  - - ">="
@@ -123,33 +129,33 @@ dependencies:
123
129
  - !ruby/object:Gem::Version
124
130
  version: '0'
125
131
  - !ruby/object:Gem::Dependency
126
- name: rspec
132
+ name: rake
127
133
  requirement: !ruby/object:Gem::Requirement
128
134
  requirements:
129
- - - "~>"
135
+ - - ">="
130
136
  - !ruby/object:Gem::Version
131
- version: '3.0'
137
+ version: '0'
132
138
  type: :development
133
139
  prerelease: false
134
140
  version_requirements: !ruby/object:Gem::Requirement
135
141
  requirements:
136
- - - "~>"
142
+ - - ">="
137
143
  - !ruby/object:Gem::Version
138
- version: '3.0'
144
+ version: '0'
139
145
  - !ruby/object:Gem::Dependency
140
- name: rubocop
146
+ name: rspec
141
147
  requirement: !ruby/object:Gem::Requirement
142
148
  requirements:
143
- - - ">="
149
+ - - "~>"
144
150
  - !ruby/object:Gem::Version
145
- version: '0'
151
+ version: '3.0'
146
152
  type: :development
147
153
  prerelease: false
148
154
  version_requirements: !ruby/object:Gem::Requirement
149
155
  requirements:
150
- - - ">="
156
+ - - "~>"
151
157
  - !ruby/object:Gem::Version
152
- version: '0'
158
+ version: '3.0'
153
159
  - !ruby/object:Gem::Dependency
154
160
  name: simplecov
155
161
  requirement: !ruby/object:Gem::Requirement
@@ -165,7 +171,7 @@ dependencies:
165
171
  - !ruby/object:Gem::Version
166
172
  version: '0'
167
173
  description: ManageIQ Postgres H.A. Admin
168
- email:
174
+ email:
169
175
  executables: []
170
176
  extensions: []
171
177
  extra_rdoc_files: []
@@ -179,12 +185,14 @@ files:
179
185
  - ".rubocop_local.yml"
180
186
  - ".travis.yml"
181
187
  - CHANGELOG.md
188
+ - CODEOWNERS
182
189
  - Gemfile
183
190
  - LICENSE.txt
184
191
  - README.md
185
192
  - Rakefile
186
193
  - lib/manageiq-postgres_ha_admin.rb
187
194
  - lib/manageiq/postgres_ha_admin/config_handler.rb
195
+ - lib/manageiq/postgres_ha_admin/config_handler/logical_replication_config_handler.rb
188
196
  - lib/manageiq/postgres_ha_admin/config_handler/pglogical_config_handler.rb
189
197
  - lib/manageiq/postgres_ha_admin/config_handler/rails_config_handler.rb
190
198
  - lib/manageiq/postgres_ha_admin/failover_monitor.rb
@@ -197,7 +205,7 @@ homepage: https://github.com/ManageIQ/manageiq-postgres_ha_admin
197
205
  licenses:
198
206
  - Apache-2.0
199
207
  metadata: {}
200
- post_install_message:
208
+ post_install_message:
201
209
  rdoc_options: []
202
210
  require_paths:
203
211
  - lib
@@ -205,16 +213,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
205
213
  requirements:
206
214
  - - ">="
207
215
  - !ruby/object:Gem::Version
208
- version: '0'
216
+ version: 2.5.8
209
217
  required_rubygems_version: !ruby/object:Gem::Requirement
210
218
  requirements:
211
219
  - - ">="
212
220
  - !ruby/object:Gem::Version
213
221
  version: '0'
214
222
  requirements: []
215
- rubyforge_project:
216
- rubygems_version: 2.6.14
217
- signing_key:
223
+ rubygems_version: 3.2.22
224
+ signing_key:
218
225
  specification_version: 4
219
226
  summary: ManageIQ Postgres H.A. Admin
220
227
  test_files: []