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 +4 -4
- data/CHANGELOG.md +4 -0
- data/LICENSE.txt +1 -1
- data/README.md +5 -1
- data/lib/pgsync/data_source.rb +6 -1
- data/lib/pgsync/sync.rb +1 -1
- data/lib/pgsync/version.rb +1 -1
- metadata +3 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c19e7ffca9a1fa633d852e3a8462034fc9c376ae19230ab06cedc52e7bfe5d8
|
4
|
+
data.tar.gz: b4857744ee1501f9cef660b7ff1e20fbd69cde719edf3ae350cb9e148997204f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79a7d691465a579992e8191f7144e0e0991b649b080478aeb4853a8fea97b9ae9772fea34152cd642fc0d7cd060640797b043371a3f8e81e756c57f57bb442d8
|
7
|
+
data.tar.gz: b21286f1c75948283952ef80155b15f84af79a05f08197fd61aceafc84e15db867a5feb7403f451fe5395536367ec562b0ee6e38b6be613773085ffcaca5c9fa
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
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.
|
data/lib/pgsync/data_source.rb
CHANGED
@@ -15,7 +15,12 @@ module PgSync
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def local?
|
18
|
-
|
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.
|
127
|
+
location = " on #{source.host}:#{source.port}" if !source.socket?
|
128
128
|
log "#{prefix}: #{source.dbname}#{location}"
|
129
129
|
end
|
130
130
|
|
data/lib/pgsync/version.rb
CHANGED
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.
|
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:
|
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.
|
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: []
|