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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cd5fecb7e4a3afe1866fc24cd00319a2403b066e
4
- data.tar.gz: 4f6a16bf359303f90c2324f9987a2b43bed10380
3
+ metadata.gz: 5820afa0155fd39efe340fd444c85408e7f30fe0
4
+ data.tar.gz: 89373918858509d80851610345f9864386ad1236
5
5
  SHA512:
6
- metadata.gz: 368680903a8174045536d55b244f65ae9b8c452dad14eda953d9645904f028ba3bfe6d927ca856469d7bacd814c91c602146160d833a5607586876343ced728b
7
- data.tar.gz: b1383bcd3a6dc081c8ca5af9028ac136389b68923a44158b9e32dd6cf9c5fa14ce8598a3c8b9eaff9732fdc8284e3c15093625b947c19671e74448d6d1e7f7bd
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` is installed by default
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
@@ -27,13 +27,23 @@ module Parity
27
27
  end
28
28
 
29
29
  def run_via_cli
30
- Kernel.system "heroku #{pass_through} --remote #{environment}"
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 pass_through
101
- [subcommand, arguments].join(' ').strip
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
@@ -1,3 +1,3 @@
1
1
  module Parity
2
- VERSION = "0.5.1"
2
+ VERSION = "0.6.0"
3
3
  end
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.5.1
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-03-19 00:00:00.000000000 Z
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