lib/specinfra/command/freebsd/base/package.rb in specinfra-2.0.0.beta15 vs lib/specinfra/command/freebsd/base/package.rb in specinfra-2.0.0.beta16
- old
+ new
@@ -1,17 +1,19 @@
class Specinfra::Command::Freebsd::Base::Package < Specinfra::Command::Base::Package
- def check_is_installed(package, version=nil)
- if version
- "pkg_info -I #{escape(package)}-#{escape(version)}"
- else
- "pkg_info -Ix #{escape(package)}"
+ class << self
+ def check_is_installed(package, version=nil)
+ if version
+ "pkg_info -I #{escape(package)}-#{escape(version)}"
+ else
+ "pkg_info -Ix #{escape(package)}"
+ end
end
- end
- def install(package)
- "pkg_add -r install #{package}"
- end
+ def install(package)
+ "pkg_add -r install #{package}"
+ end
- def get_version(package, opts=nil)
- "pkg_info -Ix #{escape(package)} | cut -f 1 -w | sed -n 's/^#{escape(package)}-//p'"
+ def get_version(package, opts=nil)
+ "pkg_info -Ix #{escape(package)} | cut -f 1 -w | sed -n 's/^#{escape(package)}-//p'"
+ end
end
end