Sha256: 2853014c60f84ac29ed12202a53568639f58a283d7c63a1d9ef814ae4df5a449

Contents?: true

Size: 438 Bytes

Versions: 62

Compression:

Stored size: 438 Bytes

Contents

module God
  module Behaviors
    
    class CleanUnixSocket < Behavior
      def valid?
        valid = true
        valid &= complain("Attribute 'unix_socket' must be specified", self) if self.watch.unix_socket.nil?
        valid
      end 
      
      def before_start 
        File.delete(self.watch.unix_socket)
        
        "deleted unix socket" 
      rescue 
        "no unix socket to delete" 
      end
    end
  
  end
end

Version data entries

62 entries across 62 versions & 21 rubygems

Version Path
dguettler-god-0.7.13.2 lib/god/behaviors/clean_unix_socket.rb
dguettler-god-0.7.13.3 lib/god/behaviors/clean_unix_socket.rb
dosire-god-0.7.10 lib/god/behaviors/clean_unix_socket.rb
dosire-god-0.7.12 lib/god/behaviors/clean_unix_socket.rb
dosire-god-0.7.9 lib/god/behaviors/clean_unix_socket.rb
dunedain289-god-0.7.12.1 lib/god/behaviors/clean_unix_socket.rb
dustin-god-0.7.7.1 lib/god/behaviors/clean_unix_socket.rb
eric-god-0.7.10 lib/god/behaviors/clean_unix_socket.rb
eric-god-0.7.11 lib/god/behaviors/clean_unix_socket.rb
eric-god-0.7.12 lib/god/behaviors/clean_unix_socket.rb
eric-god-0.7.14 lib/god/behaviors/clean_unix_socket.rb
eric-god-0.7.7 lib/god/behaviors/clean_unix_socket.rb
fotonauts-god-0.7.10 lib/god/behaviors/clean_unix_socket.rb
fotonauts-god-0.7.12 lib/god/behaviors/clean_unix_socket.rb
gohanlonllc-god-0.7.9 lib/god/behaviors/clean_unix_socket.rb
gordoncww-god-0.7.11.1 lib/god/behaviors/clean_unix_socket.rb
jreynolds-god-0.7.13 lib/god/behaviors/clean_unix_socket.rb
jwilkins-god-0.7.9 lib/god/behaviors/clean_unix_socket.rb
mathieuravaux-god-0.7.11 lib/god/behaviors/clean_unix_socket.rb
mojombo-god-0.7.10 lib/god/behaviors/clean_unix_socket.rb