pgsync 0.8.0 → 0.8.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: 7a7083c722bb2060be572cc9e63911678b17063826fee239de9569f6eb9eb6e3
4
- data.tar.gz: 1953d0434c070d3123e15d2e25fa5a5a74981a298da08ae39d7bc57c7f2ea00b
3
+ metadata.gz: 7c19e7ffca9a1fa633d852e3a8462034fc9c376ae19230ab06cedc52e7bfe5d8
4
+ data.tar.gz: b4857744ee1501f9cef660b7ff1e20fbd69cde719edf3ae350cb9e148997204f
5
5
  SHA512:
6
- metadata.gz: 363586792548ac9e856382c241292e6645b32421acad8dd18e240c095b89ea9fc5bd8a925cc57b2d9cbecca436b6899aa1396aac27cc71876bbf27028e074b06
7
- data.tar.gz: 6ac5b582f9891428059106d0d40b3e7ddf3bac8442bd92aebb0cd2eff0bda99984ffcb16bd2df5ba6aacdacb58c89bbd0cd7f0d77d1bc59d2dc562c3a9630531
6
+ metadata.gz: 79a7d691465a579992e8191f7144e0e0991b649b080478aeb4853a8fea97b9ae9772fea34152cd642fc0d7cd060640797b043371a3f8e81e756c57f57bb442d8
7
+ data.tar.gz: b21286f1c75948283952ef80155b15f84af79a05f08197fd61aceafc84e15db867a5feb7403f451fe5395536367ec562b0ee6e38b6be613773085ffcaca5c9fa
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.8.1 (2025-09-12)
2
+
3
+ - Fixed local destination detection when no host present with pg 1.6+
4
+
1
5
  ## 0.8.0 (2024-07-10)
2
6
 
3
7
  - Added Docker image for `linux/arm64`
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015-2023 Andrew Kane
3
+ Copyright (c) 2015-2025 Andrew Kane
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -27,6 +27,8 @@ You can also install it with Homebrew:
27
27
  brew install pgsync
28
28
  ```
29
29
 
30
+ Or [Docker](#docker).
31
+
30
32
  ## Setup
31
33
 
32
34
  In your project directory, run:
@@ -369,11 +371,13 @@ Get the [Docker image](https://hub.docker.com/r/ankane/pgsync) with:
369
371
 
370
372
  ```sh
371
373
  docker pull ankane/pgsync
372
- alias pgsync="docker run -ti ankane/pgsync"
374
+ alias pgsync="docker run -ti --rm -v .:/conf -w /conf ankane/pgsync"
373
375
  ```
374
376
 
375
377
  This will give you the `pgsync` command.
376
378
 
379
+ For databases on the host machine, use `host.docker.internal` as the hostname (on Linux, this requires `--add-host=host.docker.internal:host-gateway`).
380
+
377
381
  ## Dependencies
378
382
 
379
383
  If installation fails, your system may be missing Ruby or libpq.
@@ -15,7 +15,12 @@ module PgSync
15
15
  end
16
16
 
17
17
  def local?
18
- !host || %w(localhost 127.0.0.1).include?(host)
18
+ socket? || %w(localhost 127.0.0.1).include?(host)
19
+ end
20
+
21
+ # host can be "/var/run/postgresql,/run/postgresql,/tmp" on Linux with pg 1.6+
22
+ def socket?
23
+ !host || host.split(",").all? { |v| v.start_with?("/") }
19
24
  end
20
25
 
21
26
  def host
data/lib/pgsync/sync.rb CHANGED
@@ -124,7 +124,7 @@ module PgSync
124
124
  end
125
125
 
126
126
  def print_description(prefix, source)
127
- location = " on #{source.host}:#{source.port}" if source.host
127
+ location = " on #{source.host}:#{source.port}" if !source.socket?
128
128
  log "#{prefix}: #{source.dbname}#{location}"
129
129
  end
130
130
 
@@ -1,3 +1,3 @@
1
1
  module PgSync
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pgsync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-07-11 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: bigdecimal
@@ -80,7 +79,6 @@ dependencies:
80
79
  - - ">="
81
80
  - !ruby/object:Gem::Version
82
81
  version: '0'
83
- description:
84
82
  email: andrew@ankane.org
85
83
  executables:
86
84
  - pgsync
@@ -109,7 +107,6 @@ homepage: https://github.com/ankane/pgsync
109
107
  licenses:
110
108
  - MIT
111
109
  metadata: {}
112
- post_install_message:
113
110
  rdoc_options: []
114
111
  require_paths:
115
112
  - lib
@@ -124,8 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
121
  - !ruby/object:Gem::Version
125
122
  version: '0'
126
123
  requirements: []
127
- rubygems_version: 3.5.11
128
- signing_key:
124
+ rubygems_version: 3.6.9
129
125
  specification_version: 4
130
126
  summary: Sync Postgres data between databases
131
127
  test_files: []