aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/leap_cli/config/macros.rb11
-rw-r--r--lib/leap_cli/version.rb2
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/leap_cli/config/macros.rb b/lib/leap_cli/config/macros.rb
index 2eabdd0..30381ee 100644
--- a/lib/leap_cli/config/macros.rb
+++ b/lib/leap_cli/config/macros.rb
@@ -415,5 +415,16 @@ module LeapCli; module Config
end
end
+ #
+ # wrap something that might fail in `try`. e.g.
+ #
+ # "= try{ nodes[:services => 'tor'].first.ip_address } "
+ #
+ def try(&block)
+ yield
+ rescue NoMethodError
+ nil
+ end
+
end
end; end
diff --git a/lib/leap_cli/version.rb b/lib/leap_cli/version.rb
index 7c39e05..5ec2523 100644
--- a/lib/leap_cli/version.rb
+++ b/lib/leap_cli/version.rb
@@ -1,6 +1,6 @@
module LeapCli
unless defined?(LeapCli::VERSION)
- VERSION = '1.5.4'
+ VERSION = '1.5.5'
COMPATIBLE_PLATFORM_VERSION = '0.5.2'..'1.99'
SUMMARY = 'Command line interface to the LEAP platform'
DESCRIPTION = 'The command "leap" can be used to manage a bevy of servers running the LEAP platform from the comfort of your own home.'