effective_developer 0.7.6 → 0.7.7

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
  SHA256:
3
- metadata.gz: 812eb3c808c0afcfb4aa7f4c15ae03ba04f131ab248ab5e094954ae41c25c4c5
4
- data.tar.gz: 9f84dc4b3192a43b5b3a7a7c6f42a0879b67a8b117bfd2c2bee5746fc43446c4
3
+ metadata.gz: 1c1231725ea89da47006207e9c294b360f8bcdf23f751d93203f953a10166ace
4
+ data.tar.gz: f6c0afe87820d6c4b7039967950a95c56eed4baa5c4328048d1804bb3294d6be
5
5
  SHA512:
6
- metadata.gz: c7930157a4c09d201106e8eeeafac90ce700af522dad8110ab587e0f59a814a48918eb3822e7fc95b86bf239bdebef6d99c67954b0e675881762fad9bdac5c4b
7
- data.tar.gz: f41ab1734067a3523622f39e948c53fea471a192e0a9279d1cad0bf89a6d76a3a0f27534b488ba733b696dae66a59c6ef82b81040463b34f7ec9dc6dbf65fc71
6
+ metadata.gz: '01825fae60603251da1753504cacaccb55ac5d7e93352a83a4ab523efad879683f360c58aa18d55452e20f44e097a87d9fad33fb8d7808fc96fb15b1498742c9'
7
+ data.tar.gz: 79cba4617ea0507768788a200e17a2a91bb1cacf0464e9cc95c5dbd51c6bee6733ad6159a7c0bb5e0ebfdd21178595bb6efdc25c6819ca0480bd053e84c55f2d
@@ -1,3 +1,3 @@
1
1
  module EffectiveDeveloper
2
- VERSION = '0.7.6'.freeze
2
+ VERSION = '0.7.7'.freeze
3
3
  end
@@ -195,23 +195,29 @@ namespace :pg do
195
195
  end
196
196
 
197
197
  desc 'Clones the production (--remote heroku by default) database to staging (--remote staging by default)'
198
- task :clone, [:source_remote, :target_remote] => :environment do |t, args|
199
- args.with_defaults(:source_remote => 'heroku', :target_remote => 'staging')
198
+ task :clone, [:source, :target] => :environment do |t, args|
199
+ args.with_defaults(:source => nil, :target => nil)
200
200
 
201
- puts "=== Cloning remote '#{args.source_remote}' to '#{args.target_remote}'"
201
+ if args.source.blank? || args.target.blank?
202
+ puts 'Need a source and target. Try: bundle exec rake "pg:clone[example,example-staging]"'
203
+ exit
204
+ end
205
+
206
+
207
+ puts "=== Cloning remote '#{args.source}' to '#{args.target}'"
202
208
 
203
209
  Bundler.with_unbundled_env do
204
- unless system("heroku pg:backups:capture --remote #{args.source_remote}")
210
+ unless system("heroku pg:backups:capture --app #{args.source}")
205
211
  abort "Error capturing heroku backup"
206
212
  end
207
213
 
208
- url = (`heroku pg:backups:public-url --remote #{args.source_remote}`).chomp
214
+ url = (`heroku pg:backups:public-url --app #{args.source}`).chomp
209
215
 
210
216
  unless (url || '').length > 0
211
- abort "Error reading public-url from remote #{args.source_remote}"
217
+ abort "Error reading public-url from app #{args.source}"
212
218
  end
213
219
 
214
- unless system("heroku pg:backups:restore '#{url}' DATABASE_URL --remote #{args.target_remote}")
220
+ unless system("heroku pg:backups:restore '#{url}' DATABASE_URL --app #{args.target}")
215
221
  abort "Error cloning heroku backup"
216
222
  end
217
223
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_developer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.6
4
+ version: 0.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-16 00:00:00.000000000 Z
11
+ date: 2023-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails