Sha256: 39d7315ad0398b65dc232c0aed9650ed6957ecc4e78017df3395a65c147fa287

Contents?: true

Size: 636 Bytes

Versions: 25

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

25 entries across 25 versions & 1 rubygems

Version Path
specinfra-1.25.6 lib/specinfra/command/ubuntu.rb
specinfra-1.25.5 lib/specinfra/command/ubuntu.rb
specinfra-1.25.4 lib/specinfra/command/ubuntu.rb
specinfra-1.25.3 lib/specinfra/command/ubuntu.rb
specinfra-1.25.2 lib/specinfra/command/ubuntu.rb
specinfra-1.25.1 lib/specinfra/command/ubuntu.rb
specinfra-1.25.0 lib/specinfra/command/ubuntu.rb
specinfra-1.24.0 lib/specinfra/command/ubuntu.rb
specinfra-1.23.1 lib/specinfra/command/ubuntu.rb
specinfra-1.23.0 lib/specinfra/command/ubuntu.rb
specinfra-1.22.1 lib/specinfra/command/ubuntu.rb
specinfra-1.22.0 lib/specinfra/command/ubuntu.rb
specinfra-1.21.0 lib/specinfra/command/ubuntu.rb
specinfra-1.20.0 lib/specinfra/command/ubuntu.rb
specinfra-1.19.0 lib/specinfra/command/ubuntu.rb
specinfra-1.18.4 lib/specinfra/command/ubuntu.rb
specinfra-1.18.3 lib/specinfra/command/ubuntu.rb
specinfra-1.18.2 lib/specinfra/command/ubuntu.rb
specinfra-1.18.1 lib/specinfra/command/ubuntu.rb
specinfra-1.18.0 lib/specinfra/command/ubuntu.rb