Sha256: 25a95a3a4f318a7d0ef82342e441f72d9d45c6a169dfab0e410f271a8fa87950

Contents?: true

Size: 636 Bytes

Versions: 3

Compression:

Stored size: 636 Bytes

Contents

module Specinfra
  module Command
    class Ubuntu < Debian
      def check_running(service)
        "service #{escape(service)} status && service #{escape(service)} status | grep 'running'"
      end

      def check_ppa(package)
        %Q{find /etc/apt/ -name \*.list | xargs grep -o "deb http://ppa.launchpad.net/#{to_apt_line_uri(package)}"}
      end

      def check_ppa_enabled(package)
        %Q{find /etc/apt/ -name \*.list | xargs grep -o "^deb http://ppa.launchpad.net/#{to_apt_line_uri(package)}"}
      end

      private

      def to_apt_line_uri(repo)
        escape(repo.gsub(/^ppa:/,''))
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
specinfra-2.0.0.beta6 lib/specinfra/command/ubuntu.rb
specinfra-2.0.0.beta5 lib/specinfra/command/ubuntu.rb
specinfra-2.0.0.beta4 lib/specinfra/command/ubuntu.rb