Added keyrings to gitignore, symlinked to shared dir in cap scripts
This commit is contained in:
parent
9e8426ceb4
commit
a5db2cd231
17 changed files with 25 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1 +1,12 @@
|
|||
%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({})
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8
lib/tasks/gpg.rake
Normal file
8
lib/tasks/gpg.rake
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
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)}
|
||||
|
|
|
|||
Loading…
Reference in a new issue