cloner 0.7.0 → 0.8.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 +4 -4
- data/.ruby-version +1 -1
- data/LICENSE.txt +1 -1
- data/README.md +18 -0
- data/lib/cloner/rsync.rb +11 -2
- data/lib/cloner/version.rb +1 -1
- metadata +2 -4
- data/.ruby-gemset +0 -1
- data/HISTORY.md +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84c8fe363198647047f69099007af0a106d4820cdc7758b9cae1d26909b79c73
|
4
|
+
data.tar.gz: e96bc96b11c84cc67d2a06747e379cacdc633eb94e1f435d19227cb2b26c8550
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bceec6cdef8aef9384a003ed93607e6d7bb27c22ddf61326b45dee79b17deb92fbbe1806f33405b4882201d9a330a820b44cb84722dab1a7bca4b7e6ffd23142
|
7
|
+
data.tar.gz: deaa7c11906fd6a184fba2abbe1fc05d510064665aefdf10f0d29e744ab6956687b62dcd37ac88811758412558af564f4fea6af0fb29eb5677ef2cd18237a488
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
ruby-2.6.6
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,9 @@
|
|
2
2
|
|
3
3
|
Easily clone your production Mongoid or PostgreSQL / MySQL database and files for local development or staging area.
|
4
4
|
|
5
|
+
Uses rsync and database-specific default dump/restore tools (pg_dump/pg_restore, mysqldump/mysql, mongodump/mongorestore)
|
6
|
+
|
7
|
+
|
5
8
|
## Installation
|
6
9
|
|
7
10
|
Add this line to your application's Gemfile:
|
@@ -104,6 +107,21 @@ All functions from cloner/internal.rb can be overriden, for example:
|
|
104
107
|
{}
|
105
108
|
end
|
106
109
|
|
110
|
+
## Changelog
|
111
|
+
|
112
|
+
### 0.8.0
|
113
|
+
|
114
|
+
- Change default rsync flags - -z to -zz to support newer versions of rsync
|
115
|
+
- Allow overriding rsync flags via ```rsync_flags``` and ```rsync_compression```
|
116
|
+
|
117
|
+
### 0.7.0
|
118
|
+
|
119
|
+
- Add thor file generators
|
120
|
+
|
121
|
+
### 0.6.0
|
122
|
+
|
123
|
+
- Support MySQL
|
124
|
+
|
107
125
|
## Contributing
|
108
126
|
|
109
127
|
1. Fork it ( https://github.com/[my-github-username]/cloner/fork )
|
data/lib/cloner/rsync.rb
CHANGED
@@ -1,8 +1,17 @@
|
|
1
1
|
module Cloner::RSync
|
2
2
|
extend ActiveSupport::Concern
|
3
|
-
|
3
|
+
|
4
|
+
def rsync_compression
|
5
|
+
"-zz"
|
6
|
+
end
|
7
|
+
|
8
|
+
def rsync_flags
|
4
9
|
port = ssh_opts[:port] || 22
|
5
|
-
|
10
|
+
"#{rsync_compression} -utvr --checksum -e \"ssh -p #{port}\""
|
11
|
+
end
|
12
|
+
|
13
|
+
def rsync(from, to)
|
14
|
+
cmd = "rsync #{rsync_flags} #{e ssh_user}@#{e ssh_host}:#{e from}/ #{e to}/"
|
6
15
|
puts "Running RSync: #{cmd}"
|
7
16
|
pipe = IO.popen(cmd)
|
8
17
|
while (line = pipe.gets)
|
data/lib/cloner/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- glebtv
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -88,10 +88,8 @@ extensions: []
|
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
90
|
- ".gitignore"
|
91
|
-
- ".ruby-gemset"
|
92
91
|
- ".ruby-version"
|
93
92
|
- Gemfile
|
94
|
-
- HISTORY.md
|
95
93
|
- LICENSE.txt
|
96
94
|
- README.md
|
97
95
|
- Rakefile
|
data/.ruby-gemset
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
cloner
|
data/HISTORY.md
DELETED