hudson.plugins.rake
Class Util

java.lang.Object
  extended by hudson.plugins.rake.Util

public class Util
extends java.lang.Object

Ruby utility class. It's used to detect ruby local installations among other features.

Author:
David Calavera

Constructor Summary
Util()
           
 
Method Summary
static java.lang.String execName()
           
static RubyInstallation[] getCanonicalRubies(RubyInstallation[] currentInstallations)
           
protected static RubyInstallation[] getCanonicalRubies(RubyInstallation[] currentInstallations, java.util.Collection<java.io.File> candidates)
           
static java.io.File[] getDefaultGemPaths(java.lang.String path)
           
static java.io.File getExecutable(java.lang.String path)
           
static java.io.File getExecutable(java.lang.String path, java.lang.String gemHome, java.lang.String gemPath)
           
static java.io.File[] getGemsDir(java.lang.String path)
           
static java.util.Collection<java.io.File> getRubyInstallations()
           
protected static java.util.Collection<java.io.File> getRubyInstallations(java.lang.String systemPath)
           
static boolean hasGemsInstalled(java.lang.String path)
           
static boolean isAlreadyInstalled(RubyInstallation[] current, java.lang.String path)
           
static boolean isCustom(java.lang.String path, java.lang.String execName)
           
static boolean isJruby(java.lang.String path)
           
static boolean isLinux()
           
static boolean isMac()
           
static boolean isRakeInstalled(java.io.File... gemsDirArray)
           
static boolean isWindows()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

getExecutable

public static java.io.File getExecutable(java.lang.String path)

getExecutable

public static java.io.File getExecutable(java.lang.String path,
                                         java.lang.String gemHome,
                                         java.lang.String gemPath)

execName

public static java.lang.String execName()

isWindows

public static boolean isWindows()

isLinux

public static boolean isLinux()

isMac

public static boolean isMac()

isJruby

public static boolean isJruby(java.lang.String path)

isCustom

public static boolean isCustom(java.lang.String path,
                               java.lang.String execName)

hasGemsInstalled

public static boolean hasGemsInstalled(java.lang.String path)

getGemsDir

public static java.io.File[] getGemsDir(java.lang.String path)

getDefaultGemPaths

public static java.io.File[] getDefaultGemPaths(java.lang.String path)

isRakeInstalled

public static boolean isRakeInstalled(java.io.File... gemsDirArray)

getRubyInstallations

public static java.util.Collection<java.io.File> getRubyInstallations()
                                                               throws java.io.IOException
Throws:
java.io.IOException

getRubyInstallations

protected static java.util.Collection<java.io.File> getRubyInstallations(java.lang.String systemPath)
                                                                  throws java.io.IOException
Throws:
java.io.IOException

getCanonicalRubies

public static RubyInstallation[] getCanonicalRubies(RubyInstallation[] currentInstallations)

getCanonicalRubies

protected static RubyInstallation[] getCanonicalRubies(RubyInstallation[] currentInstallations,
                                                       java.util.Collection<java.io.File> candidates)

isAlreadyInstalled

public static boolean isAlreadyInstalled(RubyInstallation[] current,
                                         java.lang.String path)


Copyright © 2010. All Rights Reserved.