Sha256: 5c6e6c554385139452a8a105ef53a1b22b04c119f289295c7909922146499c74

Contents?: true

Size: 664 Bytes

Versions: 65

Compression:

Stored size: 664 Bytes

Contents

module Awspec::Generator
  module Spec
    class Acm
      include Awspec::Helper::Finder
      def generate_all
        certificates = select_all_certificates
        raise 'Not Found Certificates' if certificates.empty?
        ERB.new(acm_spec_template, nil, '-').result(binding).chomp
      end

      def acm_spec_template
        template = <<-'EOF'
<% certificates.each do |certificate| %>
describe acm('<%= certificate.domain_name %>') do
  it { should exist }
<%- if certificate.status == 'ISSUED' -%>
  it { should be_issued }
<% end -%>
  its(:type) { should eq '<%= certificate.type %>' }
end
<% end %>
EOF
        template
      end
    end
  end
end

Version data entries

65 entries across 65 versions & 2 rubygems

Version Path
awspec-0.82.3 lib/awspec/generator/spec/acm.rb
awspec-0.82.2 lib/awspec/generator/spec/acm.rb
awspec-0.82.1 lib/awspec/generator/spec/acm.rb
awspec-0.82.0 lib/awspec/generator/spec/acm.rb
awspec-0.81.1 lib/awspec/generator/spec/acm.rb
awspec-0.81.0 lib/awspec/generator/spec/acm.rb
awspec-0.80.1 lib/awspec/generator/spec/acm.rb
awspec-0.80.0 lib/awspec/generator/spec/acm.rb
awspec-0.79.2 lib/awspec/generator/spec/acm.rb
awspec-0.79.1 lib/awspec/generator/spec/acm.rb
awspec-0.79.0 lib/awspec/generator/spec/acm.rb
awspec-0.78.1 lib/awspec/generator/spec/acm.rb
awspec-0.77.1 lib/awspec/generator/spec/acm.rb
awspec-0.77.0 lib/awspec/generator/spec/acm.rb
awspec-0.76.1 lib/awspec/generator/spec/acm.rb
awspec-0.76.0 lib/awspec/generator/spec/acm.rb
awspec-0.75.2 lib/awspec/generator/spec/acm.rb
awspec-0.75.1 lib/awspec/generator/spec/acm.rb
awspec-0.75.0 lib/awspec/generator/spec/acm.rb
awspec-0.74.1 lib/awspec/generator/spec/acm.rb