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 +4 -4
- data/lib/effective_developer/version.rb +1 -1
- data/lib/tasks/pg_pull.rake +13 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c1231725ea89da47006207e9c294b360f8bcdf23f751d93203f953a10166ace
|
4
|
+
data.tar.gz: f6c0afe87820d6c4b7039967950a95c56eed4baa5c4328048d1804bb3294d6be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '01825fae60603251da1753504cacaccb55ac5d7e93352a83a4ab523efad879683f360c58aa18d55452e20f44e097a87d9fad33fb8d7808fc96fb15b1498742c9'
|
7
|
+
data.tar.gz: 79cba4617ea0507768788a200e17a2a91bb1cacf0464e9cc95c5dbd51c6bee6733ad6159a7c0bb5e0ebfdd21178595bb6efdc25c6819ca0480bd053e84c55f2d
|
data/lib/tasks/pg_pull.rake
CHANGED
@@ -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, [:
|
199
|
-
args.with_defaults(:
|
198
|
+
task :clone, [:source, :target] => :environment do |t, args|
|
199
|
+
args.with_defaults(:source => nil, :target => nil)
|
200
200
|
|
201
|
-
|
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 --
|
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 --
|
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
|
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 --
|
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.
|
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-
|
11
|
+
date: 2023-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|