vmc 0.3.13.beta.4 → 0.3.13.beta.5
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/cli/commands/apps.rb +19 -16
- data/lib/cli/version.rb +1 -1
- data/lib/vmc/client.rb +1 -1
- metadata +2 -2
data/lib/cli/commands/apps.rb
CHANGED
@@ -219,7 +219,7 @@ module VMC::Cli::Command
|
|
219
219
|
app_services = app[:services]
|
220
220
|
services_apps_hash = provisioned_services_apps_hash
|
221
221
|
app_services.each { |service|
|
222
|
-
del_service = force && no_prompt
|
222
|
+
del_service = force && no_prompt
|
223
223
|
unless no_prompt || force
|
224
224
|
del_service = ask(
|
225
225
|
"Provisioned service [#{service}] detected, would you like to delete it?",
|
@@ -629,18 +629,23 @@ module VMC::Cli::Command
|
|
629
629
|
|
630
630
|
end
|
631
631
|
|
632
|
+
# If no resource needs to be sent, add an empty file to ensure we have
|
633
|
+
# a multi-part request that is expected by nginx fronting the CC.
|
634
|
+
if VMC::Cli::ZipUtil.get_files_to_pack(explode_dir).empty?
|
635
|
+
Dir.chdir(explode_dir) do
|
636
|
+
File.new(".__empty__", "w")
|
637
|
+
end
|
638
|
+
end
|
632
639
|
# Perform Packing of the upload bits here.
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
display 'OK'.green
|
640
|
+
display ' Packing application: ', false
|
641
|
+
VMC::Cli::ZipUtil.pack(explode_dir, upload_file)
|
642
|
+
display 'OK'.green
|
637
643
|
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
end
|
644
|
+
upload_size = File.size(upload_file);
|
645
|
+
if upload_size > 1024*1024
|
646
|
+
upload_size = (upload_size/(1024.0*1024.0)).round.to_s + 'M'
|
647
|
+
elsif upload_size > 0
|
648
|
+
upload_size = (upload_size/1024.0).round.to_s + 'K'
|
644
649
|
else
|
645
650
|
upload_size = '0K'
|
646
651
|
end
|
@@ -648,11 +653,9 @@ module VMC::Cli::Command
|
|
648
653
|
upload_str = " Uploading (#{upload_size}): "
|
649
654
|
display upload_str, false
|
650
655
|
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
file = FileWithPercentOutput.open(upload_file, 'rb')
|
655
|
-
end
|
656
|
+
FileWithPercentOutput.display_str = upload_str
|
657
|
+
FileWithPercentOutput.upload_size = File.size(upload_file);
|
658
|
+
file = FileWithPercentOutput.open(upload_file, 'rb')
|
656
659
|
|
657
660
|
client.upload_app(appname, file, appcloud_resources)
|
658
661
|
display 'OK'.green if VMC::Cli::ZipUtil.get_files_to_pack(explode_dir).empty?
|
data/lib/cli/version.rb
CHANGED
data/lib/vmc/client.rb
CHANGED
@@ -369,7 +369,7 @@ class VMC::Client
|
|
369
369
|
|
370
370
|
req = {
|
371
371
|
:method => method, :url => "#{@target}#{path}",
|
372
|
-
:payload => payload, :headers => headers
|
372
|
+
:payload => payload, :headers => headers, :multipart => true
|
373
373
|
}
|
374
374
|
status, body, response_headers = perform_http_request(req)
|
375
375
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: vmc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease: 7
|
5
|
-
version: 0.3.13.beta.
|
5
|
+
version: 0.3.13.beta.5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- VMware
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-10-
|
13
|
+
date: 2011-10-24 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|