lib/linux_admin/common.rb in linux_admin-0.14.0 vs lib/linux_admin/common.rb in linux_admin-0.15.0

- old
+ new

@@ -4,23 +4,23 @@ module Common include Logging BIN_DIRS = %w(/bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin) - def cmd(name) + def self.cmd(name) BIN_DIRS.collect { |dir| "#{dir}/#{name}" }.detect { |cmd| File.exist?(cmd) } end - def cmd?(name) + def self.cmd?(name) !cmd(name).nil? end - def run(cmd, options = {}) + def self.run(cmd, options = {}) AwesomeSpawn.logger ||= logger AwesomeSpawn.run(cmd, options) end - def run!(cmd, options = {}) + def self.run!(cmd, options = {}) AwesomeSpawn.logger ||= logger AwesomeSpawn.run!(cmd, options) end end end