Sha256: 393fee59df55af444dd325929cf58f767bf2c2fd4533915e94ba7c30eca75a36

Contents?: true

Size: 826 Bytes

Versions: 20

Compression:

Stored size: 826 Bytes

Contents

# frozen_string_literal: true

# takelage mutagen socket terminate
module MutagenSocketTerminate
  # Backend method for mutagen socket terminate.
  def mutagen_socket_terminate(socket)
    log.debug "Terminate the mutagen socket \"#{socket}\""

    return false unless mutagen_check_daemon

    socket_terminated = _mutagen_socket_terminate_socket socket

    unless socket_terminated.exitstatus.zero?
      log.debug "Unable to terminated mutagen socket \"#{socket}\""
      return false
    end

    log.debug "Terminated the mutagen socket \"#{socket}\""
    true
  end

  private

  # Get git branch.
  def _mutagen_socket_terminate_socket(socketname)
    cmd_terminate_socket = format(
      config.active['cmd_mutagen_forward_socket_terminate'],
      socketname: socketname
    )
    try cmd_terminate_socket
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
takelage-0.33.1 lib/takelage/mutagen/socket/terminate.rb
takelage-0.32.4 lib/takelage/mutagen/socket/terminate.rb
takelage-0.32.3 lib/takelage/mutagen/socket/terminate.rb
takelage-0.32.1 lib/takelage/mutagen/socket/terminate.rb
takelage-0.32.0 lib/takelage/mutagen/socket/terminate.rb
takelage-0.31.0 lib/takelage/mutagen/socket/terminate.rb
takelage-0.30.6 lib/takelage/mutagen/socket/terminate.rb
takelage-0.30.5 lib/takelage/mutagen/socket/terminate.rb
takelage-0.30.1 lib/takelage/mutagen/socket/terminate.rb
takelage-0.30.0 lib/takelage/mutagen/socket/terminate.rb
takelage-0.29.14 lib/takelage/mutagen/socket/terminate.rb
takelage-0.29.13 lib/takelage/mutagen/socket/terminate.rb
takelage-0.29.11 lib/takelage/mutagen/socket/terminate.rb
takelage-0.29.10 lib/takelage/mutagen/socket/terminate.rb
takelage-0.29.8 lib/takelage/mutagen/socket/terminate.rb
takelage-0.29.6 lib/takelage/mutagen/socket/terminate.rb
takelage-0.29.0 lib/takelage/mutagen/socket/terminate.rb
takelage-0.28.26 lib/takelage/mutagen/socket/terminate.rb
takelage-0.28.24 lib/takelage/mutagen/socket/terminate.rb
takelage-0.28.14 lib/takelage/mutagen/socket/terminate.rb