spec/factories/metasploit/credential/ssh_keys.rb in metasploit-credential-0.14.0 vs spec/factories/metasploit/credential/ssh_keys.rb in metasploit-credential-0.14.1

- old
+ new

@@ -1,9 +1,9 @@ FactoryGirl.define do factory :metasploit_credential_ssh_key, class: Metasploit::Credential::SSHKey do - ignore do + transient do key_type { generate :metasploit_credential_ssh_key_key_type } # key size tuned for speed. DO NOT use for production, it is below current recommended key size of 2048 key_size { 512 } end @@ -11,16 +11,16 @@ key_class = OpenSSL::PKey.const_get(key_type) key_class.generate(key_size).to_s } factory :metasploit_credential_dsa_key do - ignore do + transient do key_type :DSA end end factory :metasploit_credential_rsa_key do - ignore do + transient do key_type :RSA end end end