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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a4ad8a985dadd893a7202086e0da85996ae8558
4
- data.tar.gz: 78c75fddf7df2acb61d2be2315a9cafab9997098
3
+ metadata.gz: ab19af3851a95c814e88e88037d24445aa464301
4
+ data.tar.gz: 182e5d1e36515d4d7dff7b448ef3f9538796fb3c
5
5
  SHA512:
6
- metadata.gz: cca9f7f38b992e9f446ec0e5ad0b1eb745b89dd0b797c8c3ca2fb228872861eaadbb2efdbde051c22c8653f482ae4a3cd2b24b3166c475806d23b1676e06764f
7
- data.tar.gz: 309b8d8009b6b51a354f71253d1ca5b83fa2cf158d7f17c129d0a2bc315719b84bbba8e36c5d71c7d61decb67802b75aee91ab0a2617e636165eaa7eda7f21b1
6
+ metadata.gz: 230918a7340634e31366d9919c9b0949c498e5727793e54ba15ee719076145d6272a1f73f3d5b15dbe98120a3e8d0fc42ca3c48389068988ced76f3c3bfc81aa
7
+ data.tar.gz: 6ee596c53623f712b701c7fbfbd89caf987b77930b472fe4ff50b508668cfeb7c055e58222a5217d3f199089710fac5b62ffebc23614df7fddc83785cef0868b
@@ -34,21 +34,33 @@ module Parity
34
34
  end
35
35
 
36
36
  def restore_to_development
37
- drop_development_database
38
- pull_remote_database_to_development
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 drop_development_database
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 pull_remote_database_to_development
47
+ def download_remote_backup
46
48
  Kernel.system(
47
- "heroku pg:pull DATABASE_URL #{development_db} --remote #{from} "\
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} "\
@@ -1,3 +1,3 @@
1
1
  module Parity
2
- VERSION = "0.10.0".freeze
2
+ VERSION = "1.0.0".freeze
3
3
  end
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.10.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-07-29 00:00:00.000000000 Z
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.5.0
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:
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require File.join(File.dirname(__FILE__), '..', 'lib', 'parity')
4
-
5
- if ARGV.empty?
6
- puts Parity::Usage.new
7
- else
8
- exit Parity::Environment.new('development', ARGV).run
9
- end
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require File.join(File.dirname(__FILE__), '..', 'lib', 'parity')
4
-
5
- if ARGV.empty?
6
- puts Parity::Usage.new
7
- else
8
- exit Parity::Environment.new('production', ARGV).run
9
- end
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require File.join(File.dirname(__FILE__), '..', 'lib', 'parity')
4
-
5
- if ARGV.empty?
6
- puts Parity::Usage.new
7
- else
8
- exit Parity::Environment.new('staging', ARGV).run
9
- end