vmc 0.4.0.beta.68 → 0.4.0.beta.69
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 +16 -16
- data/vmc-ng/lib/vmc/cli/service.rb +1 -1
- data/vmc-ng/lib/vmc/version.rb +1 -1
- metadata +6 -6
data/vmc-ng/lib/vmc/cli/app.rb
CHANGED
|
@@ -344,32 +344,32 @@ module VMC
|
|
|
344
344
|
def scale
|
|
345
345
|
app = input[:app]
|
|
346
346
|
|
|
347
|
-
|
|
348
|
-
memory = input.given(:memory)
|
|
349
|
-
plan_name = input.given(:plan)
|
|
350
|
-
|
|
351
|
-
unless instances || memory || plan_name
|
|
347
|
+
if input.given?(:instances)
|
|
352
348
|
instances = input[:instances, app.total_instances]
|
|
353
|
-
memory = input[:memory, app.memory]
|
|
354
349
|
end
|
|
355
350
|
|
|
356
|
-
if
|
|
357
|
-
|
|
358
|
-
instances_changed = instances != app.total_instances
|
|
359
|
-
end
|
|
360
|
-
|
|
361
|
-
if memory
|
|
362
|
-
memory = megabytes(memory)
|
|
363
|
-
memory_changed = memory != app.memory
|
|
351
|
+
if input.given?(:memory)
|
|
352
|
+
memory = input[:memory, app.memory]
|
|
364
353
|
end
|
|
365
354
|
|
|
366
|
-
if
|
|
355
|
+
if input.given?(:plan)
|
|
367
356
|
fail "Plans not supported on target cloud." unless v2?
|
|
368
357
|
|
|
358
|
+
plan_name = input[:plan]
|
|
369
359
|
production = !!(plan_name =~ /^p/i)
|
|
370
|
-
plan_changed = production != app.production
|
|
371
360
|
end
|
|
372
361
|
|
|
362
|
+
unless instances || memory || plan_name
|
|
363
|
+
instances = input[:instances, app.total_instances]
|
|
364
|
+
memory = input[:memory, app.memory]
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
memory = megabytes(memory) if memory
|
|
368
|
+
|
|
369
|
+
instances_changed = instances && instances != app.total_instances
|
|
370
|
+
memory_changed = memory && memory != app.memory
|
|
371
|
+
plan_changed = plan_name && production != app.production
|
|
372
|
+
|
|
373
373
|
unless memory_changed || instances_changed || plan_changed
|
|
374
374
|
fail "No changes!"
|
|
375
375
|
end
|
|
@@ -130,7 +130,7 @@ module VMC
|
|
|
130
130
|
services.reject! { |s| s.version != input[:version] }
|
|
131
131
|
end
|
|
132
132
|
|
|
133
|
-
if plan = input.given(:plan)
|
|
133
|
+
if v2? && plan = input.given(:plan)
|
|
134
134
|
services.reject! do |s|
|
|
135
135
|
if plan.is_a?(String)
|
|
136
136
|
s.service_plans.none? { |p| p.name == plan.upcase }
|
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: -49077658
|
|
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
|
+
- 69
|
|
12
|
+
version: 0.4.0.beta.69
|
|
13
13
|
platform: ruby
|
|
14
14
|
authors:
|
|
15
15
|
- VMware
|
|
@@ -297,12 +297,12 @@ dependencies:
|
|
|
297
297
|
requirements:
|
|
298
298
|
- - ~>
|
|
299
299
|
- !ruby/object:Gem::Version
|
|
300
|
-
hash:
|
|
300
|
+
hash: 31
|
|
301
301
|
segments:
|
|
302
302
|
- 0
|
|
303
303
|
- 2
|
|
304
|
-
-
|
|
305
|
-
version: 0.2.
|
|
304
|
+
- 4
|
|
305
|
+
version: 0.2.4
|
|
306
306
|
type: :runtime
|
|
307
307
|
version_requirements: *id017
|
|
308
308
|
- !ruby/object:Gem::Dependency
|