commit 42aa04e61b83fb8ed69cf02e5e8bd3792d9cc5cc
parent e3b04a37bf28db7800b0e5bc7d0d7cd6d1ecbb21
Author: Gaute Hope <eg@gaute.vetsj.com>
Date: Mon, 12 Aug 2013 13:07:51 +0200
Add gpgme dependency to development and install gnupg in travis test
Diffstat:
4 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
@@ -6,7 +6,7 @@ rvm:
before_install:
- sudo apt-get update -qq
- - sudo apt-get install -qq uuid-dev uuid libncursesw5-dev libncursesw5
+ - sudo apt-get install -qq uuid-dev uuid libncursesw5-dev libncursesw5 gnupg2
script: bundle exec rake travis
diff --git a/lib/sup/crypto.rb b/lib/sup/crypto.rb
@@ -119,6 +119,7 @@ EOS
end
def have_crypto?; @not_working_reason.nil? end
+ def not_working_reason; @not_working_reason end
def sign from, to, payload
return unknown_status(@not_working_reason) unless @not_working_reason.nil?
diff --git a/sup.gemspec b/sup.gemspec
@@ -61,5 +61,6 @@ SUP: Check https://github.com/sup-heliotrope/sup/wiki/Migration-0.13-to-0.14
s.add_development_dependency "rake"
s.add_development_dependency "minitest", "~> 4.7"
s.add_development_dependency "rr", "~> 1.0.5"
+ s.add_development_dependency "gpgme", ">= 2.0.2"
end
end
diff --git a/test/test_crypto.rb b/test/test_crypto.rb
@@ -41,6 +41,10 @@ class TestCryptoManager < ::Minitest::Unit::TestCase
Redwood::AccountManager.init am
Redwood::CryptoManager.init
+
+ if not CryptoManager.have_crypto?
+ warn "No crypto set up, crypto will not be tested. Reason: #{CryptoManager.not_working_reason}"
+ end
end
def teardown