summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2015-05-04 16:17:01 -0700
committerelijah <elijah@riseup.net>2015-05-04 16:17:01 -0700
commit6b35bbbe1a9909c737c1cd53edcfc47af0ad063c (patch)
treea28f7c2d497f3d4b0ed7cd62551a90d1b6dc4bdc
parentb4d0e0e3b4bfa2436e3f76a591d5639819a4853b (diff)
make gpgme optional
-rw-r--r--Gemfile30
-rw-r--r--leap_cli.gemspec3
-rw-r--r--lib/leap_cli/commands/user.rb2
3 files changed, 3 insertions, 32 deletions
diff --git a/Gemfile b/Gemfile
index fe076b0..06618ce 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,33 +1,3 @@
source 'https://rubygems.org'
gemspec
-# #
-# # Specify support gems used that we might also develop locally.
-# #
-# # Available options:
-# #
-# # :dev_path - the development path of the gem. this path is used if running in 'development mode'.
-# #
-# # :vendor_path - where this gem is vendored. this path is used if it exists and we are running in 'production mode'
-# #
-# development_gems = {
-# 'supply_drop' => {:dev_path => '../gems/supply_drop', :vendor_path => 'vendor/supply_drop'},
-# 'certificate_authority' => {:dev_path => '../gems/certificate_authority', :vendor_path => 'vendor/certificate_authority'}
-# }
-
-# #
-# # A little bit of code to magically pick the correct gem
-# #
-
-# mode = :production
-
-# gem_root = File.dirname(__FILE__)
-# path_key = mode == :development ? :dev_path : :vendor_path
-# development_gems.each do |gem_name, options|
-# path = File.expand_path(options[path_key], gem_root)
-# if File.directory?(path)
-# gem gem_name, :path => path
-# else
-# gem gem_name
-# end
-# end
diff --git a/leap_cli.gemspec b/leap_cli.gemspec
index e9215fb..b9bad48 100644
--- a/leap_cli.gemspec
+++ b/leap_cli.gemspec
@@ -64,7 +64,8 @@ spec = Gem::Specification.new do |s|
# crypto gems
#s.add_runtime_dependency('certificate_authority', '>= 0.2.0')
# ^^ currently vendored
- s.add_runtime_dependency('gpgme') # not essential, but used for some minor stuff in adding sysadmins
+ # s.add_runtime_dependency('gpgme') # << does not build on debian jessie, so now optional.
+ # also, there is a ruby-gpgme package anyway.
# misc gems
s.add_runtime_dependency('ya2yaml') # pure ruby yaml, so we can better control output. see https://github.com/afunai/ya2yaml
diff --git a/lib/leap_cli/commands/user.rb b/lib/leap_cli/commands/user.rb
index 6c33878..480e9a9 100644
--- a/lib/leap_cli/commands/user.rb
+++ b/lib/leap_cli/commands/user.rb
@@ -100,9 +100,9 @@ module LeapCli
#
def pick_pgp_key
begin
- return unless `which gpg`.strip.any?
require 'gpgme'
rescue LoadError
+ log "Skipping OpenPGP setup because gpgme is not installed."
return
end