hudson.plugins.rake
Class Util

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

public class Util
extends Object

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

Author:
David Calavera

Constructor Summary
Util()
           
 
Method Summary
static String execName()
           
static RubyInstallation[] getCanonicalRubies(RubyInstallation[] currentInstallations)
           
protected static RubyInstallation[] getCanonicalRubies(RubyInstallation[] currentInstallations, Collection<File> candidates)
           
static File[] getDefaultGemPaths(String path)
           
static File getExecutable(String path)
           
static File getExecutable(String path, String gemHome, String gemPath)
           
static File[] getGemsDir(String path)
           
static Collection<File> getRubyInstallations()
           
protected static Collection<File> getRubyInstallations(String systemPath)
           
static boolean hasGemsInstalled(String path)
           
static boolean isAlreadyInstalled(RubyInstallation[] current, String path)
           
static boolean isCustom(String path, String execName)
           
static boolean isJruby(String path)
           
static boolean isLinux()
           
static boolean isMac()
           
static boolean isRakeInstalled(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 File getExecutable(String path)

getExecutable

public static File getExecutable(String path,
                                 String gemHome,
                                 String gemPath)

execName

public static String execName()

isWindows

public static boolean isWindows()

isLinux

public static boolean isLinux()

isMac

public static boolean isMac()

isJruby

public static boolean isJruby(String path)

isCustom

public static boolean isCustom(String path,
                               String execName)

hasGemsInstalled

public static boolean hasGemsInstalled(String path)

getGemsDir

public static File[] getGemsDir(String path)

getDefaultGemPaths

public static File[] getDefaultGemPaths(String path)

isRakeInstalled

public static boolean isRakeInstalled(File... gemsDirArray)

getRubyInstallations

public static Collection<File> getRubyInstallations()
                                             throws IOException
Throws:
IOException

getRubyInstallations

protected static Collection<File> getRubyInstallations(String systemPath)
                                                throws IOException
Throws:
IOException

getCanonicalRubies

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

getCanonicalRubies

protected static RubyInstallation[] getCanonicalRubies(RubyInstallation[] currentInstallations,
                                                       Collection<File> candidates)

isAlreadyInstalled

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


Copyright © 2004-2011. All Rights Reserved.