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.3.0 lib/awspec/generator/spec/acm.rb
awspec-1.2.0 lib/awspec/generator/spec/acm.rb
awspec-1.1.0 lib/awspec/generator/spec/acm.rb
awspec-1.0.0 lib/awspec/generator/spec/acm.rb
awspec-1.0.0.rc lib/awspec/generator/spec/acm.rb
awspec-0.88.2 lib/awspec/generator/spec/acm.rb
awspec-0.88.1 lib/awspec/generator/spec/acm.rb
awspec-0.88.0 lib/awspec/generator/spec/acm.rb
awspec-0.87.1 lib/awspec/generator/spec/acm.rb
awspec-0.87.0 lib/awspec/generator/spec/acm.rb
awspec-0.86.0 lib/awspec/generator/spec/acm.rb
cmonson_2ndwatch_awspec-0.85.4 lib/awspec/generator/spec/acm.rb
awspec-0.85.3 lib/awspec/generator/spec/acm.rb
cmonson_2ndwatch_awspec-0.85.3 lib/awspec/generator/spec/acm.rb
awspec-0.85.2 lib/awspec/generator/spec/acm.rb
awspec-0.85.1 lib/awspec/generator/spec/acm.rb
awspec-0.85.0 lib/awspec/generator/spec/acm.rb
awspec-0.84.1 lib/awspec/generator/spec/acm.rb
awspec-0.84.0 lib/awspec/generator/spec/acm.rb
awspec-0.83.0 lib/awspec/generator/spec/acm.rb