parity 0.5.1 → 0.6.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/README.md +7 -1
- data/lib/parity/environment.rb +16 -3
- data/lib/parity/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5820afa0155fd39efe340fd444c85408e7f30fe0
|
4
|
+
data.tar.gz: 89373918858509d80851610345f9864386ad1236
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e808de518351dd5268cf3a899139224b9e1a83a04c95df6821df25a8f0f9927db5ffb8bd3b2689c54cf54ddbdc5fa0257460f06db4dc9c43d0a5856b6cad7b00
|
7
|
+
data.tar.gz: b87bed8804a48c0ae81ccb92bcb4453a8fef7a50d18c0976f2118d6bb4ff66994746f82ceb25ccc2d46c1aa3f1b8ad59455fdb37dbe92711a5b60a86bf4ad14d
|
data/README.md
CHANGED
@@ -8,12 +8,13 @@ Prerequisites
|
|
8
8
|
|
9
9
|
Your development machine will need these command-line programs:
|
10
10
|
|
11
|
+
git
|
11
12
|
curl
|
12
13
|
heroku
|
13
14
|
pg_restore
|
14
15
|
|
15
16
|
On a Mac,
|
16
|
-
`curl`
|
17
|
+
`curl` and `git` are installed by default
|
17
18
|
and the other programs can be installed with Homebrew:
|
18
19
|
|
19
20
|
brew install heroku-toolbelt
|
@@ -62,6 +63,11 @@ Restore a production database backup into staging:
|
|
62
63
|
|
63
64
|
staging restore production
|
64
65
|
|
66
|
+
Deploy from master, and migrate and restart the dynos if necessary:
|
67
|
+
|
68
|
+
production deploy
|
69
|
+
staging deploy
|
70
|
+
|
65
71
|
Open a console:
|
66
72
|
|
67
73
|
production console
|
data/lib/parity/environment.rb
CHANGED
@@ -27,13 +27,23 @@ module Parity
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def run_via_cli
|
30
|
-
Kernel.system "heroku
|
30
|
+
Kernel.system "heroku", subcommand, *arguments, "--remote", environment
|
31
31
|
end
|
32
32
|
|
33
33
|
def backup
|
34
34
|
Kernel.system "heroku pgbackups:capture --expire --remote #{environment}"
|
35
35
|
end
|
36
36
|
|
37
|
+
def deploy
|
38
|
+
skip_migration = skip_migration?
|
39
|
+
|
40
|
+
Kernel.system "git push #{environment} master"
|
41
|
+
|
42
|
+
unless skip_migration
|
43
|
+
migrate
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
37
47
|
def restore
|
38
48
|
if environment == "production"
|
39
49
|
$stdout.puts "Parity does not support restoring backups into your "\
|
@@ -97,8 +107,11 @@ module Parity
|
|
97
107
|
Parity.config.heroku_app_basename || Dir.pwd.split('/').last
|
98
108
|
end
|
99
109
|
|
100
|
-
def
|
101
|
-
|
110
|
+
def skip_migration?
|
111
|
+
Kernel.system %{
|
112
|
+
git fetch #{environment} &&
|
113
|
+
git diff --quiet #{environment}/master..master -- db/migrate
|
114
|
+
}
|
102
115
|
end
|
103
116
|
end
|
104
117
|
end
|
data/lib/parity/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Croak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |2
|
14
14
|
Development/staging/production parity makes it easier for
|