parity 0.10.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/parity/backup.rb +19 -7
- data/lib/parity/version.rb +1 -1
- metadata +21 -12
- data/bin/development +0 -9
- data/bin/production +0 -9
- data/bin/staging +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab19af3851a95c814e88e88037d24445aa464301
|
4
|
+
data.tar.gz: 182e5d1e36515d4d7dff7b448ef3f9538796fb3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 230918a7340634e31366d9919c9b0949c498e5727793e54ba15ee719076145d6272a1f73f3d5b15dbe98120a3e8d0fc42ca3c48389068988ced76f3c3bfc81aa
|
7
|
+
data.tar.gz: 6ee596c53623f712b701c7fbfbd89caf987b77930b472fe4ff50b508668cfeb7c055e58222a5217d3f199089710fac5b62ffebc23614df7fddc83785cef0868b
|
data/lib/parity/backup.rb
CHANGED
@@ -34,21 +34,33 @@ module Parity
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def restore_to_development
|
37
|
-
|
38
|
-
|
37
|
+
download_remote_backup
|
38
|
+
wipe_development_database
|
39
|
+
restore_from_local_temp_backup
|
40
|
+
delete_local_temp_backup
|
39
41
|
end
|
40
42
|
|
41
|
-
def
|
42
|
-
Kernel.system("dropdb #{development_db}")
|
43
|
+
def wipe_development_database
|
44
|
+
Kernel.system("dropdb #{development_db} && createdb #{development_db}")
|
43
45
|
end
|
44
46
|
|
45
|
-
def
|
47
|
+
def download_remote_backup
|
46
48
|
Kernel.system(
|
47
|
-
"
|
48
|
-
"#{additional_args}",
|
49
|
+
"curl -o tmp/latest.backup \"$(#{from} pg:backups public-url -q)\"",
|
49
50
|
)
|
50
51
|
end
|
51
52
|
|
53
|
+
def restore_from_local_temp_backup
|
54
|
+
Kernel.system(
|
55
|
+
"pg_restore tmp/latest.backup --verbose --clean --no-acl --no-owner "\
|
56
|
+
"-d #{development_db} #{additional_args}",
|
57
|
+
)
|
58
|
+
end
|
59
|
+
|
60
|
+
def delete_local_temp_backup
|
61
|
+
Kernel.system("rm tmp/latest.backup")
|
62
|
+
end
|
63
|
+
|
52
64
|
def restore_to_remote_environment
|
53
65
|
Kernel.system(
|
54
66
|
"heroku pg:backups restore #{backup_from} --remote #{to} "\
|
data/lib/parity/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Croak
|
@@ -9,24 +9,18 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-09-16 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: |2
|
15
15
|
Development/staging/production parity makes it easier for
|
16
16
|
those who write the code to deploy the code.
|
17
17
|
email:
|
18
18
|
- dan@thoughtbot.com
|
19
|
-
executables:
|
20
|
-
- development
|
21
|
-
- staging
|
22
|
-
- production
|
19
|
+
executables: []
|
23
20
|
extensions: []
|
24
21
|
extra_rdoc_files: []
|
25
22
|
files:
|
26
23
|
- README.md
|
27
|
-
- bin/development
|
28
|
-
- bin/production
|
29
|
-
- bin/staging
|
30
24
|
- lib/parity.rb
|
31
25
|
- lib/parity/backup.rb
|
32
26
|
- lib/parity/environment.rb
|
@@ -36,7 +30,23 @@ homepage: https://github.com/thoughtbot/parity
|
|
36
30
|
licenses:
|
37
31
|
- MIT
|
38
32
|
metadata: {}
|
39
|
-
post_install_message:
|
33
|
+
post_install_message: |+
|
34
|
+
##################################################
|
35
|
+
# NOTE FOR UPGRADING FROM 0.9.3 OR EARLIER #
|
36
|
+
##################################################
|
37
|
+
|
38
|
+
As of version 1.0.0, Parity no longer distributes its executables via Rubygems.
|
39
|
+
|
40
|
+
If you use apt or Homebrew to install dependencies, you can install Parity
|
41
|
+
through those package managers to get the `development`, `staging`, and
|
42
|
+
`production` executables. Installing the executables via package manager makes
|
43
|
+
the programs available across Ruby versions.
|
44
|
+
|
45
|
+
Users without access to those package managers or who prefer to self-install can
|
46
|
+
find the executables at our Github repository:
|
47
|
+
|
48
|
+
https://github.com/thoughtbot/parity
|
49
|
+
|
40
50
|
rdoc_options: []
|
41
51
|
require_paths:
|
42
52
|
- lib
|
@@ -52,9 +62,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
52
62
|
version: '0'
|
53
63
|
requirements: []
|
54
64
|
rubyforge_project:
|
55
|
-
rubygems_version: 2.
|
65
|
+
rubygems_version: 2.6.6
|
56
66
|
signing_key:
|
57
67
|
specification_version: 4
|
58
68
|
summary: Shell commands for development, staging, and production parity.
|
59
69
|
test_files: []
|
60
|
-
has_rdoc:
|
data/bin/development
DELETED
data/bin/production
DELETED