lib/knife-spork/plugins/plugin.rb in knife-spork-1.0.13 vs lib/knife-spork/plugins/plugin.rb in knife-spork-1.0.14

- old
+ new

@@ -35,13 +35,24 @@ !(config.nil? || config.enabled == false) end private def config - @options[:config].plugins.send(self.class.name.to_sym) unless @options[:config].nil? || @options[:config].plugins.nil? + @options[:config].plugins.send(self.class.name.to_sym) unless @options[:config].nil? || @options[:config].plugins.nil? end + def organization + unless ::Chef::Config.chef_server_url.nil? + split_server_url = Chef::Config.chef_server_url.gsub(/http(s)?:\/\//,"").split('/') + if split_server_url.length > 1 + return "#{split_server_url.last}: " + end + end + + nil + end + def cookbooks @options[:cookbooks] end def environments @@ -53,14 +64,14 @@ end def environment_path @options[:environment_path] end - + def cookbook_path @options[:cookbook_path] end - + def ui @options[:ui] end def current_user