Sha256: de51ca124513058cfc175c32359b0a3a2926b13a7521c484f217963c12546cc3
Contents?: true
Size: 736 Bytes
Versions: 13
Compression:
Stored size: 736 Bytes
Contents
root = File.expand_path(File.join(File.dirname(__FILE__), "../..")) require File.join(root, "lib/configuration") namespace :keypair do task :generate do |t| if File.exists?(Houston.config.keypair) puts "#{Houston.config.keypair} exists" exit end tmp = Rails.root.to_s `openssl genrsa -des3 -passout pass:#{Houston.config.passphrase.shellescape} -out #{tmp}/config/private.pem 2048` `openssl rsa -in #{tmp}/config/private.pem -passin pass:#{Houston.config.passphrase.shellescape} -out #{tmp}/config/public.pem -outform PEM -pubout` `cat #{tmp}/config/private.pem #{tmp}/config/public.pem >> #{Houston.config.keypair}` `rm #{tmp}/config/private.pem #{tmp}/config/public.pem` end end
Version data entries
13 entries across 13 versions & 1 rubygems