Sha256: 71c1815cddd793261c01684553c35d8b8ae9d7f4feb021b6a1deff4561aef21c

Contents?: true

Size: 540 Bytes

Versions: 6

Compression:

Stored size: 540 Bytes

Contents

class Specinfra::Command::Darwin::Base::Package < Specinfra::Command::Base::Package
  class << self
    def check_is_installed(package, version=nil)
      escaped_package = escape(package)
      if version
        cmd = "/usr/local/bin/brew info #{escaped_package} | grep -E '^\/usr\/local\/Cellar\/#{escaped_package}\/#{escape(version)}'"
      else
        cmd = "/usr/local/bin/brew list -1 | grep -E '^#{escaped_package}$'"
      end
      cmd
    end

    def install(package)
      cmd = "brew install '#{package}'"
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
specinfra-2.0.0.beta21 lib/specinfra/command/darwin/base/package.rb
specinfra-2.0.0.beta20 lib/specinfra/command/darwin/base/package.rb
specinfra-2.0.0.beta19 lib/specinfra/command/darwin/base/package.rb
specinfra-2.0.0.beta18 lib/specinfra/command/darwin/base/package.rb
specinfra-2.0.0.beta17 lib/specinfra/command/darwin/base/package.rb
specinfra-2.0.0.beta16 lib/specinfra/command/darwin/base/package.rb