Skip to content
Permalink
Browse files

Add `any_instances` method

  • Loading branch information...
winebarrel committed Sep 23, 2016
1 parent 76f0f35 commit f0a85d8f54b61c1ab5c91f3489789048be1cffc9
Showing with 9 additions and 1 deletion.
  1. +1 −0 README.md
  2. +5 −0 lib/kelbim/dsl/load-balancer.rb
  3. +1 −1 lib/kelbim/version.rb
  4. +2 −0 lib/kelbim/wrapper/load-balancer.rb
@@ -113,6 +113,7 @@ ec2 "vpc-XXXXXXXXX" do
"nyar",
"yog"
)
# or `any_instances`
listeners do
listener [:tcp, 80] => [:tcp, 80]
@@ -51,6 +51,11 @@ def instances(*values)
end
end

def any_instances
call_once(:instances)
@result.any_instances = true
end

def listeners(&block)
call_once(:listeners)
@result.listeners = Listeners.new(@context, @name, &block).result
@@ -1,5 +1,5 @@
module Kelbim
VERSION = "0.3.0.beta8"
VERSION = "0.3.0.beta9"
end

Version = Kelbim::VERSION
@@ -236,6 +236,8 @@ def compare_availability_zones(dsl)
end

def compare_instances(dsl)
return true if dsl.any_instances

aws_instance_ids = @load_balancer.instances.map {|i| i.id }.sort

dsl_instance_ids = dsl.instances.map {|i|

0 comments on commit f0a85d8

Please sign in to comment.
You can’t perform that action at this time.