summaryrefslogtreecommitdiff
path: root/lib/leap_cli/util.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2012-11-23 01:49:23 -0800
committerelijah <elijah@riseup.net>2012-11-23 01:49:23 -0800
commit30f42d5869f65d3171878b4d6d94e9c3813f02cf (patch)
treeda387d9e24a1722887d06e0f698e96f823f60ec1 /lib/leap_cli/util.rb
parent9d573fb01392ab0fe645b32191d61e4a8bf38afc (diff)
initial work toward 'leap test'. for now, it generates an openvpn config for client testing. try 'leap init-test'
Diffstat (limited to 'lib/leap_cli/util.rb')
-rw-r--r--lib/leap_cli/util.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/leap_cli/util.rb b/lib/leap_cli/util.rb
index 0b0fb9e..c3adbdc 100644
--- a/lib/leap_cli/util.rb
+++ b/lib/leap_cli/util.rb
@@ -1,6 +1,7 @@
require 'digest/md5'
require 'paint'
require 'fileutils'
+require 'erb'
module LeapCli
@@ -276,6 +277,14 @@ module LeapCli
STDOUT.puts
end
+ ##
+ ## ERB
+ ##
+
+ def erb_eval(string, binding=nil)
+ ERB.new(string, nil, '%<>-').result(binding)
+ end
+
end
end