Merge branch 'master' of github.com:diaspora/diaspora_rails
This commit is contained in:
commit
d21a3baf32
8 changed files with 9 additions and 7 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -1,8 +1,10 @@
|
||||||
.idea
|
.idea
|
||||||
*.swp
|
*.swp
|
||||||
*.swo
|
*.swo
|
||||||
|
*~
|
||||||
.bundle
|
.bundle
|
||||||
db/*.sqlite3
|
db/*.sqlite3
|
||||||
log/*.log
|
log/*.log
|
||||||
tmp/**/*
|
tmp/**/*
|
||||||
gpg/diaspora*/*
|
gpg/diaspora-development/*.gpg
|
||||||
|
gpg/diaspora-production/*.gpg
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ class User < Person
|
||||||
:recoverable, :rememberable, :trackable, :validatable
|
:recoverable, :rememberable, :trackable, :validatable
|
||||||
|
|
||||||
|
|
||||||
#before_create :assign_key
|
before_create :assign_key
|
||||||
validates_presence_of :profile
|
validates_presence_of :profile
|
||||||
|
|
||||||
before_validation :do_bad_things
|
before_validation :do_bad_things
|
||||||
|
|
@ -68,7 +68,7 @@ class User < Person
|
||||||
def assign_key
|
def assign_key
|
||||||
keys = GPGME.list_keys(nil, true)
|
keys = GPGME.list_keys(nil, true)
|
||||||
if keys.empty?
|
if keys.empty?
|
||||||
generate_key
|
#generate_key
|
||||||
end
|
end
|
||||||
self.key_fingerprint = GPGME.list_keys(nil, true).first.subkeys.first.fingerprint
|
self.key_fingerprint = GPGME.list_keys(nil, true).first.subkeys.first.fingerprint
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -10,5 +10,5 @@ end
|
||||||
|
|
||||||
package :tools do
|
package :tools do
|
||||||
description 'Useful tools'
|
description 'Useful tools'
|
||||||
apt 'psmisc htop elinks'
|
apt 'psmisc htop elinks screen'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
BIN
gpg/diaspora-test/pubring.gpg
Normal file
BIN
gpg/diaspora-test/pubring.gpg
Normal file
Binary file not shown.
BIN
gpg/diaspora-test/random_seed
Normal file
BIN
gpg/diaspora-test/random_seed
Normal file
Binary file not shown.
BIN
gpg/diaspora-test/secring.gpg
Normal file
BIN
gpg/diaspora-test/secring.gpg
Normal file
Binary file not shown.
BIN
gpg/diaspora-test/trustdb.gpg
Normal file
BIN
gpg/diaspora-test/trustdb.gpg
Normal file
Binary file not shown.
|
|
@ -2,9 +2,9 @@ require File.dirname(__FILE__) + '/spec_helper'
|
||||||
|
|
||||||
describe 'user encryption' do
|
describe 'user encryption' do
|
||||||
before :all do
|
before :all do
|
||||||
ctx = GPGME::Ctx.new
|
#ctx = GPGME::Ctx.new
|
||||||
keys = ctx.keys
|
#keys = ctx.keys
|
||||||
keys.each{|k| ctx.delete_key(k, true)}
|
#keys.each{|k| ctx.delete_key(k, true)}
|
||||||
@u = User.new
|
@u = User.new
|
||||||
@u.email = "george@aol.com"
|
@u.email = "george@aol.com"
|
||||||
@u.password = "bluepin7"
|
@u.password = "bluepin7"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue