Sha256: f519149624ef64c22b1f7671206c57e8746e7401c7a4f9b72a4c9cf94f37431d

Contents?: true

Size: 532 Bytes

Versions: 3

Compression:

Stored size: 532 Bytes

Contents

class Specinfra::Command::Freebsd::Base::Package < Specinfra::Command::Base::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

    def install(package, version=nil)
      "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'"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
specinfra-2.0.0.beta40 lib/specinfra/command/freebsd/base/package.rb
specinfra-2.0.0.beta39 lib/specinfra/command/freebsd/base/package.rb
specinfra-2.0.0.beta38 lib/specinfra/command/freebsd/base/package.rb