From 6ab171af332cf06ec6de6cc560dae525f2460710 Mon Sep 17 00:00:00 2001 From: elijah Date: Fri, 20 Jun 2014 15:36:16 -0700 Subject: moved all json macros to the platform (breaks compatibility with earlier platforms) --- lib/leap_cli/config/manager.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/leap_cli/config/manager.rb') diff --git a/lib/leap_cli/config/manager.rb b/lib/leap_cli/config/manager.rb index 7b3fb27..1831de7 100644 --- a/lib/leap_cli/config/manager.rb +++ b/lib/leap_cli/config/manager.rb @@ -20,6 +20,16 @@ module LeapCli def initialize @environments = {} # hash of `Environment` objects, keyed by name. + + # load macros and other custom ruby in provider base + platform_ruby_files = Dir[Path.provider_base + '/lib/*.rb'] + if platform_ruby_files.any? + $: << Path.provider_base + '/lib' + platform_ruby_files.each do |rb_file| + require rb_file + end + end + Config::Object.send(:include, LeapCli::Macro) end ## -- cgit v1.2.3