Sha256: b47186dff96edc6162e5bf1d33f57a8c71095865425d8544223b27a13c24daa8

Contents?: true

Size: 612 Bytes

Versions: 6

Compression:

Stored size: 612 Bytes

Contents

module Serverspec
  module Type
    class Service < Base
      def enabled?
        backend.check_enabled(@name)
      end

      def running?(under)
        if under
          check_method = "check_running_under_#{under}".to_sym

          unless backend.respond_to?(check_method)
            raise ArgumentError.new("`be_running` matcher doesn't support #{@under}")
          end

          backend.send(check_method, @name)
        else
          backend.check_running(@name)
        end
      end

      def has_property?(property)
        backend.check_svcprops(@name, property)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
serverspec-0.6.12 lib/serverspec/type/service.rb
serverspec-0.6.11 lib/serverspec/type/service.rb
serverspec-0.6.10 lib/serverspec/type/service.rb
serverspec-0.6.9 lib/serverspec/type/service.rb
serverspec-0.6.8 lib/serverspec/type/service.rb
serverspec-0.6.7 lib/serverspec/type/service.rb