Skip to content
Extraits de code Groupes Projets
Valider a5db2cd2 rédigé par ilya's avatar ilya
Parcourir les fichiers

Added keyrings to gitignore, symlinked to shared dir in cap scripts

parent 9e8426ce
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Affichage de avec 25 ajouts et 5 suppressions
......@@ -5,3 +5,4 @@
db/*.sqlite3
log/*.log
tmp/**/*
gpg/diaspora*/*
......@@ -4,5 +4,8 @@ class UsersController < ApplicationController
def index
@users = User.sort(:created_at.desc).all
end
def show
@user= Person.where(:id => params[:id]).first
@user_profile = @user.profile
end
end
......@@ -40,11 +40,9 @@ class User < Person
generate_key
end
self.key_fingerprint = GPGME.list_keys(nil, true).first.subkeys.first.fingerprint
puts self.key_fingerprint
end
def generate_key
puts "Yo, generating a key."
ctx = GPGME::Ctx.new
paramstring = "<GnupgKeyParms format=\"internal\">
Key-Type: DSA
......
%h1 user page!
.span-18.last
%h1= "#{@user.real_name}"
- if @user_profile
%p
%b url
%p
= @user.url
%p
%b Key Fingerprint
%p
= @user.key_fingerprint
......@@ -4,5 +4,5 @@ Haml::Template.options[:format] = :html5
# Initialize the rails application
Diaspora::Application.initialize!
ENV['GNUPGHOME'] = File.expand_path("../../db/gpg-#{Rails.env}/", __FILE__)
ENV['GNUPGHOME'] = File.expand_path("../../gpg-#{Rails.env}/", __FILE__)
GPGME::check_version({})
Fichier supprimé
Fichier supprimé
Fichier supprimé
Fichier supprimé
Fichier supprimé
Fichier supprimé
Fichier supprimé
Fichier supprimé
Fichier supprimé
Fichier supprimé
namespace :gpg do
desc 'Clear the gpg keyrings'
task :clear do
ctx = GPGME::Ctx.new
keys = ctx.keys
keys.each{|k| ctx.delete_key(k, true)}
end
end
......@@ -31,7 +31,6 @@ RSpec.configure do |config|
DatabaseCleaner.clean
end
config.after(:suite) do
gpgdir = File.expand_path("../../db/gpg-#{Rails.env}", __FILE__)
ctx = GPGME::Ctx.new
keys = ctx.keys
keys.each{|k| ctx.delete_key(k, true)}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter