diff options
Diffstat (limited to 'spec/support/builders.rb')
-rw-r--r-- | spec/support/builders.rb | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/spec/support/builders.rb b/spec/support/builders.rb index 8b529e5099..ebb132ba70 100644 --- a/spec/support/builders.rb +++ b/spec/support/builders.rb @@ -265,6 +265,22 @@ module Spec end end + def build_security_repo + build_repo security_repo do + build_gem "rack" + + build_gem "signed_gem" do |s| + cert = 'signing-cert.pem' + pkey = 'signing-pkey.pem' + s.write cert, TEST_CERT + s.write pkey, TEST_PKEY + s.signing_key = pkey + s.cert_chain = [cert] + end + end + + end + def build_repo(path, &blk) return if File.directory?(path) rake_path = Dir["#{Path.base_system_gems}/**/rake*.gem"].first @@ -601,5 +617,57 @@ module Spec @context.gem_repo1('gems') end end + + TEST_CERT=<<CERT +-----BEGIN CERTIFICATE----- +MIIDLDCCAhSgAwIBAgIBADANBgkqhkiG9w0BAQUFADA8MRAwDgYDVQQDDAdleGFt +cGxlMRMwEQYKCZImiZPyLGQBGRYDZm9vMRMwEQYKCZImiZPyLGQBGRYDY29tMB4X +DTEzMDIwNDIxMTYzNVoXDTE0MDIwNDIxMTYzNVowPDEQMA4GA1UEAwwHZXhhbXBs +ZTETMBEGCgmSJomT8ixkARkWA2ZvbzETMBEGCgmSJomT8ixkARkWA2NvbTCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANVgibTKM0ux14SXQU9M2Ec2mTHG +hoPJl/3Qq+p4wEalT87/Ascc2BaT6hXWWfAJ4oxReZnPfVop+fXZZDgtVC0JijPC +v+5JHs5KLEG1N+wzaVI7238yv4N62t48XD585bPp1meiVh9wE2kdax1bIJBwcRhd +gzR5kFfr2+O7u/g1nO/LN6aAWlKBXqntUmG0wEoWAibWDqpv4AIJhSGrzAqw648F +5TWiOEvKyrwohAt7IWbmiS8Cr3qT+GSq6tR9Hi6IC8vFW0gBvd1pSX25oUjdNApX +lzf6zkqBTzek9R7FN6TiymbJfCqaMz55rNAGZDDX0DO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