vmc 0.4.0.beta.48 → 0.4.0.beta.49
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/vmc-ng/lib/vmc/cli/app.rb +19 -9
- data/vmc-ng/lib/vmc/version.rb +1 -1
- metadata +3 -3
data/vmc-ng/lib/vmc/cli/app.rb
CHANGED
@@ -164,7 +164,7 @@ module VMC
|
|
164
164
|
app.name = name
|
165
165
|
app.space = client.current_space if client.current_space
|
166
166
|
app.total_instances = input[:instances]
|
167
|
-
app.production = input[:plan]
|
167
|
+
app.production = input[:plan] =~ /^p/i if v2?
|
168
168
|
|
169
169
|
detector = Detector.new(client, path)
|
170
170
|
frameworks = detector.all_frameworks
|
@@ -431,18 +431,28 @@ module VMC
|
|
431
431
|
memory = input[:memory, app.memory]
|
432
432
|
end
|
433
433
|
|
434
|
-
|
435
|
-
|
434
|
+
instances = instances.to_i
|
435
|
+
instances_changed = instances && instances != app.total_instances
|
436
436
|
|
437
|
-
|
438
|
-
|
439
|
-
|
437
|
+
if memory
|
438
|
+
memory = megabytes(memory)
|
439
|
+
memory_changed = memory != app.memory
|
440
|
+
end
|
441
|
+
|
442
|
+
if plan_name
|
443
|
+
fail "Plans not supported on target cloud." unless v2?
|
440
444
|
|
441
|
-
|
445
|
+
production = plan_name =~ /^p/i
|
446
|
+
plan_changed = production != app.production
|
447
|
+
end
|
448
|
+
|
449
|
+
unless memory_changed || instances_changed || plan_changed
|
450
|
+
fail "No changes!"
|
451
|
+
end
|
442
452
|
|
443
453
|
with_progress("Scaling #{c(app.name, :name)}") do
|
444
|
-
app.total_instances = instances
|
445
|
-
app.memory =
|
454
|
+
app.total_instances = instances if instances_changed
|
455
|
+
app.memory = memory if memory_changed
|
446
456
|
app.production = production if plan_changed
|
447
457
|
app.update!
|
448
458
|
end
|
data/vmc-ng/lib/vmc/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vmc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: -
|
4
|
+
hash: -3173992204
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
9
|
- 0
|
10
10
|
- beta
|
11
|
-
-
|
12
|
-
version: 0.4.0.beta.
|
11
|
+
- 49
|
12
|
+
version: 0.4.0.beta.49
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- VMware
|