summaryrefslogtreecommitdiff
path: root/lib/leap_cli/macros
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-06-21 17:38:00 -0700
committerelijah <elijah@riseup.net>2016-06-21 17:38:00 -0700
commit7818abd6a89a882cabb3d2a14a572308d9e959ff (patch)
tree89927201e4406af2334c4ef97cbe58750426ef3f /lib/leap_cli/macros
parent3df7a57d866cf1e6eda9bb9e3fe19c7387ec6c1d (diff)
minor ruby linting
Diffstat (limited to 'lib/leap_cli/macros')
-rw-r--r--lib/leap_cli/macros/haproxy.rb2
-rw-r--r--lib/leap_cli/macros/keys.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/leap_cli/macros/haproxy.rb b/lib/leap_cli/macros/haproxy.rb
index 602ae726..3fef24c4 100644
--- a/lib/leap_cli/macros/haproxy.rb
+++ b/lib/leap_cli/macros/haproxy.rb
@@ -26,7 +26,7 @@ module LeapCli
# create a simple map for node name -> local stunnel accept port
accept_ports = stunnel_clients.inject({}) do |hsh, stunnel_entry|
- name = stunnel_entry.first.sub /_[0-9]+$/, ''
+ name = stunnel_entry.first.sub(/_[0-9]+$/, '')
hsh[name] = stunnel_entry.last['accept_port']
hsh
end
diff --git a/lib/leap_cli/macros/keys.rb b/lib/leap_cli/macros/keys.rb
index e7a75cfb..9dd9b34f 100644
--- a/lib/leap_cli/macros/keys.rb
+++ b/lib/leap_cli/macros/keys.rb
@@ -56,7 +56,7 @@ module LeapCli
require 'base64'
require 'openssl'
path = Path.find_file([path_name, self.name])
- if path && File.exists?(path)
+ if path && File.exist?(path)
public_key_str = File.readlines(path).grep(/^[^-]/).join
public_key = Base64.decode64(public_key_str)
public_key = public_key.slice(22..-1) # Tor ignores the 22 byte SPKI header