vmc_knife 0.0.49 → 0.0.52
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.
- data/lib/vmc_knife/data_services.rb +5 -5
- data/lib/vmc_knife/version.rb +1 -1
- data/lib/vmc_knife/vmc_knife.rb +0 -2
- metadata +2 -2
@@ -309,7 +309,7 @@ module VMC
|
|
309
309
|
|
310
310
|
if is_unzipped
|
311
311
|
#`rm #{basename}`
|
312
|
-
files = Dir.glob("*.sql") if is_postgresql
|
312
|
+
files = Dir.glob(["*.sql", "*.dump"]) if is_postgresql
|
313
313
|
files = Dir.glob("**/*.bson") if is_mongodb
|
314
314
|
files ||= Dir.glob("*")
|
315
315
|
raise "Can't find the db-dump file." if files.empty?
|
@@ -367,15 +367,15 @@ module VMC
|
|
367
367
|
if is_postgresql
|
368
368
|
if file.nil?
|
369
369
|
extension = @wrapped['director']['file_extension'] if @wrapped['director']
|
370
|
-
extension ||= "sql"
|
371
370
|
file = "#{name()}.#{extension}"
|
372
371
|
else
|
373
372
|
unless File.exists?(File.dirname(file))
|
374
373
|
raise "The output folder #{File.dirname(file)} does not exist."
|
375
374
|
end
|
376
375
|
end
|
377
|
-
|
378
|
-
archive_unzipped="#{name()}
|
376
|
+
extension ||= "dump"
|
377
|
+
archive_unzipped = "#{name()}.#{extension}"
|
378
|
+
#archive_unzipped="#{name()}.sql" unless /\.sql$/ =~ extension
|
379
379
|
`touch #{archive_unzipped}`
|
380
380
|
unless File.exists? archive_unzipped
|
381
381
|
raise "Unable to create the file #{archive_unzipped}"
|
@@ -385,7 +385,7 @@ module VMC
|
|
385
385
|
#sudo -u postgres env PGPASSWORD=intalio DBNAME=intalio DUMPFILE=intalio_dump.sql pg_dump --format=p --file=$DUMPFILE --no-owner --clean --blobs --no-acl --oid --no-tablespaces $DBNAME
|
386
386
|
#sudo -u postgres env PGPASSWORD=$PGPASSWORD DUMPFILE=$DUMPFILE pg_dump --format=p --file=$DUMPFILE --no-owner --clean --blobs --no-acl --oid --no-tablespaces $DBNAME
|
387
387
|
|
388
|
-
cmd = VMC::KNIFE.pg_connect_cmd(credentials(app_name), 'pg_dump', false, "--format=
|
388
|
+
cmd = VMC::KNIFE.pg_connect_cmd(credentials(app_name), 'pg_dump', false, "--format=c --file=#{archive_unzipped} --no-owner --clean --oids --blobs --no-acl --no-privileges --no-tablespaces")
|
389
389
|
puts cmd
|
390
390
|
puts `#{cmd}`
|
391
391
|
|
data/lib/vmc_knife/version.rb
CHANGED
data/lib/vmc_knife/vmc_knife.rb
CHANGED
@@ -994,13 +994,11 @@ wget #{wget_args()} --output-document=$version_built_download #{version_availabl
|
|
994
994
|
end
|
995
995
|
post_download_script = @application_json['repository']['post_download_script']
|
996
996
|
if post_download_script
|
997
|
-
curr_dir=Dir.pwd
|
998
997
|
post_download_script = post_download_script.join("\n") if post_download_script.kind_of?(Array)
|
999
998
|
p "Executing the post_download script : #{post_download_script}"
|
1000
999
|
success = system(post_download_script)
|
1001
1000
|
p "Done executing the post_download script succcess #{success}"
|
1002
1001
|
exit unless success
|
1003
|
-
Dir.chdir(curr_dir)
|
1004
1002
|
end
|
1005
1003
|
upload_app_bits()
|
1006
1004
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vmc_knife
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.52
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-06-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: vmc
|