Sha256: cceef368dce938b5759b5d2aa43eb9654f3ebf9b640bd6c4f42a7bdd9ad512ea
Contents?: true
Size: 717 Bytes
Versions: 103
Compression:
Stored size: 717 Bytes
Contents
module Awspec::Generator module Spec class Eip include Awspec::Helper::Finder def select_all_addresses res = ec2_client.describe_addresses res.addresses end def generate_all eips = select_all_addresses raise 'Not Found Elastic IP addresses.' if eips.empty? ERB.new(eip_spec_template, nil, '-').result(binding).chomp end def eip_spec_template template = <<-'EOF' <% eips.each do |eip| %> describe eip('<%= eip.public_ip %>') do it { should exist } it { should be_associated_to('<%= eip.instance_id %>') } it { should belong_to_domain('<%= eip.domain %>') } end <% end %> EOF template end end end end
Version data entries
103 entries across 103 versions & 4 rubygems