lib/specinfra/command/plamo/base/package.rb in specinfra-2.0.0.beta15 vs lib/specinfra/command/plamo/base/package.rb in specinfra-2.0.0.beta16
- old
+ new
@@ -1,9 +1,11 @@
class Specinfra::Command::Plamo::Base::Package < Specinfra::Command::Linux::Base::Package
- def check_is_installed(package, version=nil)
- cmd = "ls /var/log/packages/#{escape(package)}"
- if version
- cmd = "#{cmd} && grep -E \"PACKAGE NAME:.+#{escape(package)}-#{escape(version)}\" /var/log/packages/#{escape(package)}"
+ class << self
+ def check_is_installed(package, version=nil)
+ cmd = "ls /var/log/packages/#{escape(package)}"
+ if version
+ cmd = "#{cmd} && grep -E \"PACKAGE NAME:.+#{escape(package)}-#{escape(version)}\" /var/log/packages/#{escape(package)}"
+ end
+ cmd
end
- cmd
end
end