summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRyan Davis <ryand@zenspider.com>2020-01-11 15:42:07 -0800
committerRyan Davis <ryand@zenspider.com>2020-01-11 15:42:07 -0800
commit19b8b2e9957ac53f481e14b5192c37d1344a1e1b (patch)
treee28365f7e4a4935abdab2640182e1dded1495e43 /lib
parent02bea63b7a3acd47f77a13a2a0b2826394319ddd (diff)
downloadhoe-19b8b2e9957ac53f481e14b5192c37d1344a1e1b.tar.gz
- Fix debug_gem task when you have a signing_key and broken rubygems (< 3.1.0).
[git-p4: depot-paths = "//src/hoe/dev/": change = 12493]
Diffstat (limited to 'lib')
-rw-r--r--lib/hoe/debug.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/hoe/debug.rb b/lib/hoe/debug.rb
index 67be47b..7f36233 100644
--- a/lib/hoe/debug.rb
+++ b/lib/hoe/debug.rb
@@ -96,3 +96,18 @@ module Hoe::Debug
end
end
end
+
+class Gem::Specification < Gem::BasicSpecification
+ alias old_ruby_code ruby_code
+
+ def ruby_code(obj)
+ old_ruby_code obj
+ rescue Gem::Exception => e
+ case e.message
+ when /OpenSSL/
+ "nil"
+ else
+ raise
+ end
+ end
+end unless Gem::VERSION >= "3.1.0"