diff --git a/app/models/user.rb b/app/models/user.rb index 6bb136a2f..87ec00596 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -43,6 +43,7 @@ class User < Person end def generate_key + puts "Generating key" ctx = GPGME::Ctx.new paramstring = " Key-Type: DSA diff --git a/config/environment.rb b/config/environment.rb index d8d7f075a..cfcd106aa 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -4,5 +4,5 @@ Haml::Template.options[:format] = :html5 # Initialize the rails application Diaspora::Application.initialize! -ENV['GNUPGHOME'] = File.expand_path("../../gpg-#{Rails.env}/", __FILE__) +ENV['GNUPGHOME'] = File.expand_path("../../gpg/diaspora-#{Rails.env}/", __FILE__) GPGME::check_version({}) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 759b3a478..cf8bb59d7 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -30,11 +30,6 @@ RSpec.configure do |config| config.after(:each) do DatabaseCleaner.clean end - config.after(:suite) do - ctx = GPGME::Ctx.new - keys = ctx.keys - keys.each{|k| ctx.delete_key(k, true)} - end end def stub_sockets_controller mock_sockets_controller = mock('sockets mock') diff --git a/spec/user_encryption_spec.rb b/spec/user_encryption_spec.rb index 518dc8ec3..a106b2725 100644 --- a/spec/user_encryption_spec.rb +++ b/spec/user_encryption_spec.rb @@ -2,6 +2,9 @@ require File.dirname(__FILE__) + '/spec_helper' describe 'user encryption' do before :all do + ctx = GPGME::Ctx.new + keys = ctx.keys + keys.each{|k| ctx.delete_key(k, true)} @u = User.new @u.email = "george@aol.com" @u.password = "bluepin7"