Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Only sign gem if private key is available

  • Loading branch information...
commit 469f9f9d0a4a83321c4a1e8086fd046751528fc0 1 parent 63c3c85
@presidentbeef authored
Showing with 4 additions and 2 deletions.
  1. +2 −1  brakeman-min.gemspec
  2. +2 −1  brakeman.gemspec
View
3  brakeman-min.gemspec
@@ -1,4 +1,5 @@
require './lib/brakeman/version'
+gem_priv_key = File.expand_path("~/.ssh/gem-private_key.pem")
Gem::Specification.new do |s|
s.name = %q{brakeman-min}
@@ -12,7 +13,7 @@ Gem::Specification.new do |s|
s.executables = ["brakeman"]
s.license = "MIT"
s.cert_chain = ['brakeman-public_cert.pem']
- s.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/
+ s.signing_key = gem_priv_key if File.exist? gem_priv_key and $0 =~ /gem\z/
s.add_dependency "ruby_parser", "~>3.2.2"
s.add_dependency "ruby2ruby", "~>2.0.5"
s.add_dependency "multi_json", "~>1.2"
View
3  brakeman.gemspec
@@ -1,4 +1,5 @@
require './lib/brakeman/version'
+gem_priv_key = File.expand_path("~/.ssh/gem-private_key.pem")
Gem::Specification.new do |s|
s.name = %q{brakeman}
@@ -12,7 +13,7 @@ Gem::Specification.new do |s|
s.executables = ["brakeman"]
s.license = "MIT"
s.cert_chain = ['brakeman-public_cert.pem']
- s.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/
+ s.signing_key = gem_priv_key if File.exist? gem_priv_key and $0 =~ /gem\z/
s.add_dependency "ruby_parser", "~>3.2.2"
s.add_dependency "ruby2ruby", "~>2.0.5"
s.add_dependency "terminal-table", "~>1.4"
Please sign in to comment.
Something went wrong with that request. Please try again.