pg-logical_replication 1.1.0 → 1.2.0

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
2
  SHA256:
3
- metadata.gz: e75500586b542cd04f68c0dbb33f8196ac3eb142eed9c4ce91a4629634620d8c
4
- data.tar.gz: 29f7f99ce968ffb4365a1a062d4d976c23f0291a374cd0e9ac80531150951c64
3
+ metadata.gz: e11add0e7a5508c809e3a689c25bb136e97fdf35eee469355645e64a846e7789
4
+ data.tar.gz: d3d1d40265793bd10b2432e15b5733b4f36d0467d74e080daacb2cc47dbcd4f3
5
5
  SHA512:
6
- metadata.gz: 678bc7a4e39cf77600e04571a32a36c0f252da079dc68bcaae928b0cb589387da049d22b31384f110e6a713e90e53a91ba034224959aeabdcc1c1eff45db6eab
7
- data.tar.gz: 67065974b3328afd258ca3cd82415470a91f1320e92f2e18657f8ac77ab56e095c2f63d8e1f9b81570f43f2170e0b403820f7ddad1fc742bf41487f00104c452
6
+ metadata.gz: 80e4e01444a112ed4e48feeaafa6b543a4087dee4e3f32e9ddd62e373b2a7e1b7fede239710ed55d2b22e13f87aa3bab73ad1ca4a15f90ddb8a7d170b775d4c7
7
+ data.tar.gz: 2e7b24fc3906eb780d4f90f7607c71a3dbf28fe37e4d443dad36016177a41327b5dbc3ecda24c0b3ad223eb3381f329c2f15fee99f1ba7e62bf01b3afc492c96
data/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ This project adheres to [Semantic Versioning](https://semver.org/).
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [1.2.0] - 2021-07-07
9
+ ### Added
10
+ - Default the sub slot name to the sub name if create_slot false and no name given [[#10](https://github.com/ManageIQ/pg-logical_replication/pull/10)]
11
+ - Add support for symbol keyed options to create_subscription [[#10](https://github.com/ManageIQ/pg-logical_replication/pull/10)]
12
+ - Support removal of subscriptions created without a slot [[#10](https://github.com/ManageIQ/pg-logical_replication/pull/10)]
13
+
8
14
  ## [1.1.0] - 2021-06-29
9
15
  ### Added
10
16
  - Support providing the db name to the subscriber? method [[#7](https://github.com/ManageIQ/pg-logical_replication/pull/7)]
@@ -15,6 +21,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
15
21
 
16
22
  ## [1.0.0] - 2019-05-08
17
23
 
18
- [Unreleased]: https://github.com/ManageIQ/pg-logical_replication/compare/v1.1.0...master
24
+ [Unreleased]: https://github.com/ManageIQ/pg-logical_replication/compare/v1.2.0...master
25
+ [1.2.0]: https://github.com/ManageIQ/pg-logical_replication/compare/v1.1.0...v1.2.0
19
26
  [1.1.0]: https://github.com/ManageIQ/pg-logical_replication/compare/v1.0.0...v1.1.0
20
27
  [1.0.0]: https://github.com/ManageIQ/pg-logical_replication/tree/v1.0.0
@@ -59,6 +59,8 @@ module PG
59
59
  # @param publications [Array<String>] publication names to subscribe to
60
60
  # @param options [Hash] optional parameters for CREATE SUBSCRIPTION
61
61
  def create_subscription(name, conninfo_hash, publications, options = {})
62
+ options[:slot_name] = name if !options.key?(:slot_name) && !options.key?("slot_name") && (options['create_slot'] == false || options[:create_slot] == false)
63
+
62
64
  connection_string = connection.escape_string(PG::Connection.parse_connect_args(conninfo_hash))
63
65
  base_command = <<-SQL
64
66
  CREATE SUBSCRIPTION #{connection.quote_ident(name)}
@@ -26,7 +26,7 @@ module PG
26
26
 
27
27
  def parameters_list(options)
28
28
  options.to_a.map do |k, v|
29
- "#{connection.quote_ident(k)} = #{safe_value(k, v)}"
29
+ "#{connection.quote_ident(k.to_s)} = #{safe_value(k.to_s, v)}"
30
30
  end.join(", ")
31
31
  end
32
32
 
@@ -1,5 +1,5 @@
1
1
  module PG
2
2
  module LogicalReplication
3
- VERSION = "1.1.0".freeze
3
+ VERSION = "1.2.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg-logical_replication
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Carboni
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-29 00:00:00.000000000 Z
11
+ date: 2021-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg