rake task to move the private key
This commit is contained in:
parent
263615ad14
commit
904143d100
2 changed files with 13 additions and 1 deletions
|
|
@ -65,4 +65,17 @@ namespace :db do
|
|||
}
|
||||
puts "everything should be peachy"
|
||||
end
|
||||
|
||||
task :move_private_key do
|
||||
User.all.each do |user|
|
||||
if user.private_key.nil?
|
||||
user.private_key = user.person.serialized_key
|
||||
user.save
|
||||
person = user.person
|
||||
person.serialized_key = nil
|
||||
person.serialized_public_key = user.encryption_key.public_key
|
||||
person.save
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ namespace :generate do
|
|||
Rails.application.config.secret_token = '#{secret}'
|
||||
EOF
|
||||
|
||||
puts "YAY!!"
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue