Sha256: 7e96f58df4c21fbe8c44c9071132129080ab2f959e5d99d3423741e9369d9a46

Contents?: true

Size: 518 Bytes

Versions: 2

Compression:

Stored size: 518 Bytes

Contents

require 'sys/proctable'
require 'P4'

module Commands
  def Commands.p4d_running?
    !ProcTable.ps().find_all { |p| p.comm =~ /p4d/ }.empty?
  end

  def Commands.p4d_available?(port=':1666')
    begin
      p4 = P4.new
      p4.port = port
      p4.connect
      p4.disconnect
      true
    rescue
      false
    end
  end

  def Commands.unicode_upgrade
    system("#{OsUtil.p4d_path} -r #{Conventions.p4droot_dir} "+
               "-v server=1 -L #{Conventions.p4d_log_path} " +
               "-xi")

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
p4util-0.1.1 ./lib/commands/util.rb
p4util-0.1.0 ./lib/commands/util.rb