heroku-db-sync 0.2.1 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8577f710bf6e803bbe21f7be33975c58e3de4bbf
4
+ data.tar.gz: 5120d558f35a933fa7883dc64e8a2cb7070e87c0
5
+ SHA512:
6
+ metadata.gz: a440059e2fe116b41a8b5ed21ade0040dc13a38b2bc30698b3573095b532ff092a4e2cac1eb2332fda7a2b62db6fc582a05ae9278b493f80d770116825685d90
7
+ data.tar.gz: 3734ed9a73f0f33cebe91561637d16699e25654be3e90262fecf50979b54af700ec8dc148ca142894854f18dc585463f83a7a4a622722c62725747ea53c4e4f7
@@ -7,17 +7,16 @@ module HerokuDbSync
7
7
  @arguments = arguments
8
8
  from_remote = arguments[:from_remote] || 'production'
9
9
  to_remote = arguments[:to_remote]
10
-
11
10
  puts "(1/4) capturing #{from_remote} database snapshot..."
12
- run "heroku pgbackups:capture --expire --remote #{from_remote}"
11
+ run "heroku pg:backups capture --remote #{from_remote}"
13
12
 
14
13
  if to_remote
15
14
  puts "(2/4) fetching backup url from remote #{from_remote}"
16
- backup_url = runr("heroku pgbackups:url --remote #{from_remote}")
15
+ backup_url = runr("heroku pg:backups public-url -q --remote #{from_remote}")
17
16
  print "(3/4) backing up #{to_remote} and restoring it from snapshot from #{from_remote} ... "
18
- run "heroku pgbackups:capture --expire --remote #{to_remote}"
17
+ run "heroku pg:backups capture --remote #{to_remote}"
19
18
  puts "captured. restoring .."
20
- restore_cmd = "heroku pgbackups:restore DATABASE '#{backup_url}' --remote #{to_remote}"
19
+ restore_cmd = "heroku pg:backups restore DATABASE '#{backup_url}' --remote #{to_remote}"
21
20
  puts restore_cmd
22
21
  run restore_cmd # use 'system' as heroku prompts for confirmation of db restore.
23
22
  puts "(4/4) restarting remote #{to_remote}"
@@ -25,7 +24,7 @@ module HerokuDbSync
25
24
  else
26
25
  dumpfile = 'latest.dump'
27
26
  puts "(2/4) downloading snapshot..."
28
- run "curl -o #{dumpfile} \`heroku pgbackups:url --remote #{from_remote}\`"
27
+ run "curl -o #{dumpfile} \`heroku pg:backups public-url -q --remote #{from_remote}\`"
29
28
  puts "(3/4) restoring snapshot to #{host} database #{database} ... "
30
29
  `pg_restore --verbose --clean --no-acl --no-owner -h #{host} -U #{user} -d #{database} #{dumpfile}`
31
30
  keep = arguments[:keepdump] || false
@@ -1,3 +1,3 @@
1
1
  module HerokuDbSync
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,46 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku-db-sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
5
- prerelease:
4
+ version: 0.2.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ole Morten Amundsen
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-07-04 00:00:00.000000000 Z
11
+ date: 2015-12-07 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: sqlite3
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  description: adds rake task to perform backup and restore between heroku remotes
@@ -50,20 +45,23 @@ executables: []
50
45
  extensions: []
51
46
  extra_rdoc_files: []
52
47
  files:
48
+ - MIT-LICENSE
49
+ - README.md
50
+ - Rakefile
51
+ - lib/heroku-db-sync.rb
53
52
  - lib/heroku-db-sync/deploy_and_migrate.rb
54
53
  - lib/heroku-db-sync/task_helper.rb
55
54
  - lib/heroku-db-sync/version.rb
56
- - lib/heroku-db-sync.rb
57
55
  - lib/tasks/heroku_sync_db_tasks.rake
58
56
  - lib/tasks/heroku_sync_deploy.rake
59
- - MIT-LICENSE
60
- - Rakefile
61
- - README.md
57
+ - test/dummy/README.rdoc
58
+ - test/dummy/Rakefile
62
59
  - test/dummy/app/assets/javascripts/application.js
63
60
  - test/dummy/app/assets/stylesheets/application.css
64
61
  - test/dummy/app/controllers/application_controller.rb
65
62
  - test/dummy/app/helpers/application_helper.rb
66
63
  - test/dummy/app/views/layouts/application.html.erb
64
+ - test/dummy/config.ru
67
65
  - test/dummy/config/application.rb
68
66
  - test/dummy/config/boot.rb
69
67
  - test/dummy/config/database.yml
@@ -79,7 +77,6 @@ files:
79
77
  - test/dummy/config/initializers/wrap_parameters.rb
80
78
  - test/dummy/config/locales/en.yml
81
79
  - test/dummy/config/routes.rb
82
- - test/dummy/config.ru
83
80
  - test/dummy/db/development.sqlite3
84
81
  - test/dummy/db/test.sqlite3
85
82
  - test/dummy/log/development.log
@@ -88,35 +85,32 @@ files:
88
85
  - test/dummy/public/422.html
89
86
  - test/dummy/public/500.html
90
87
  - test/dummy/public/favicon.ico
91
- - test/dummy/Rakefile
92
- - test/dummy/README.rdoc
93
88
  - test/dummy/script/rails
94
89
  - test/heroku-db-sync_test.rb
95
90
  - test/test_helper.rb
96
91
  homepage: https://github.com/rubynor/heroku_db_sync
97
92
  licenses:
98
93
  - MIT
94
+ metadata: {}
99
95
  post_install_message:
100
96
  rdoc_options: []
101
97
  require_paths:
102
98
  - lib
103
99
  required_ruby_version: !ruby/object:Gem::Requirement
104
- none: false
105
100
  requirements:
106
- - - ! '>='
101
+ - - ">="
107
102
  - !ruby/object:Gem::Version
108
103
  version: '0'
109
104
  required_rubygems_version: !ruby/object:Gem::Requirement
110
- none: false
111
105
  requirements:
112
- - - ! '>='
106
+ - - ">="
113
107
  - !ruby/object:Gem::Version
114
108
  version: '0'
115
109
  requirements: []
116
110
  rubyforge_project:
117
- rubygems_version: 1.8.25
111
+ rubygems_version: 2.2.2
118
112
  signing_key:
119
- specification_version: 3
113
+ specification_version: 4
120
114
  summary: rake db:sync:heroku:local
121
115
  test_files:
122
116
  - test/dummy/app/assets/javascripts/application.js