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-1.12.1 lib/awspec/generator/spec/acm.rb
awspec-1.12.0 lib/awspec/generator/spec/acm.rb
awspec-1.11.1 lib/awspec/generator/spec/acm.rb
awspec-1.11.0 lib/awspec/generator/spec/acm.rb
awspec-1.10.0 lib/awspec/generator/spec/acm.rb
awspec-1.9.0 lib/awspec/generator/spec/acm.rb
awspec-1.8.0 lib/awspec/generator/spec/acm.rb
awspec-1.7.0 lib/awspec/generator/spec/acm.rb
awspec-1.6.1 lib/awspec/generator/spec/acm.rb
awspec-1.6.0 lib/awspec/generator/spec/acm.rb
awspec-1.5.4 lib/awspec/generator/spec/acm.rb
awspec-1.5.3 lib/awspec/generator/spec/acm.rb
awspec-1.5.2 lib/awspec/generator/spec/acm.rb
awspec-1.5.1 lib/awspec/generator/spec/acm.rb
awspec-1.5.0 lib/awspec/generator/spec/acm.rb
awspec-1.4.3 lib/awspec/generator/spec/acm.rb
awspec-1.4.2 lib/awspec/generator/spec/acm.rb
awspec-1.4.1 lib/awspec/generator/spec/acm.rb
awspec-1.4.0 lib/awspec/generator/spec/acm.rb
awspec-1.3.1 lib/awspec/generator/spec/acm.rb