Quark:
Filter:
Classes | Quarks

Quark : Object

Object for managing a Quark - a package of source code
Source: Quark.sc

Description

A Quark is a folder of source code, a package. It may be cloned from a git repository, or maybe not. This class is used by the Quarks class and you will not usually want to use it directly.

Class Methods

Quark.new(name, refspec, url, localPath)

Arguments:

name

Quark name, git url or local path (absolute or relative)

refspec
url
localPath

Returns:

this

Quark.fromLocalPath(path)

alternate constructor

Arguments:

path

Returns:

this

Quark.fromDirectoryEntry(name, directoryEntry)

alternate constructor

Arguments:

name
directoryEntry

Returns:

this

Quark.parseQuarkName(name, refspec, url, localPath)

Arguments:

name
refspec
url
localPath

Returns:

this

Quark.parseDependency(dep, forQuark)

private

Arguments:

dep
forQuark

Returns:

this

Inherited class methods

Instance Methods

.name

Returns:

String

.dependencies

Based on the dependencies list in the quark file, returns an array of Quarks.

Returns:

Array of Quark

.deepDependencies

Declared dependencies of this Quark and those of each dependency. This will check out all dependencies.

Returns:

Array of Quarks

.data

Lazily parses the quark file (if found) and caches it

Returns:

Dictionary - the contents of the quark file

.refspec

.refspec = value

Git refspec (tag or sha hash)

Returns:

this

.localPath

Absolute path where the Quark is located

Returns:

this

.summary

Summary text from the quark file

Returns:

this

.url

Git repository url. If not declared when creating, it will examine the checked out git source and get the origin.

Returns:

this

.isDownloaded

Returns:

Boolean

.isInstalled

Returns:

Boolean

.git

Quarks that have git repos have a Git object that can be used for checking out, listing tags etc.

Returns:

a Git object

.init(argName, argUrl, argRefspec, argLocalPath)

private

Arguments:

argName
argUrl
argRefspec
argLocalPath

Returns:

this

.install

Returns:

this

.uninstall

Returns:

this

.checkout

Clone and checkout the url and refspec. Used by install and for switching versions.

Returns:

this

.version

Returns:

String

.branch

returns the current branch name.

Returns:

String or nil, if failed

.tags

Returns:

Array of Strings

.isCompatible

Evaluates the 'isCompatible' function in the quarkfile, if there is one. This allows a quarkfile to check its environment and raise an alarm before it gets installed and breaks something.

Returns:

Boolean

.definesClasses

From extension in /usr/local/share/SuperCollider/SCClassLibrary/Common/Quarks/packages.sc

Classes that are defined by this Quark

Returns:

Array of Classes

.definesExtensionMethods

From extension in /usr/local/share/SuperCollider/SCClassLibrary/Common/Quarks/packages.sc

Methods that this Quark defines that overwrite implementations in other packages including in Common.

Returns:

Array of Methods

.help

Open the help file. Either as specified in the quark file as 'schelp' or searches by the name of the quark.

Returns:

this

.changed

After un/installing or checking out, state is set to changed. code smell: this is for the gui

Returns:

Boolean

.runHook(hook)

Runs the function hook which is defined in the .quark file. This can be used for running a function before or after installation, see Using Quarks: Hooks for more information. In case the function can not be executed properly a warning will be printed and the update or installation process will be stopped.

Arguments:

hook

Name of function to run.

Returns:

this

.printOn(stream)

Arguments:

stream

Returns:

this

.parseQuarkFile

private

Returns:

this

Inherited instance methods

Undocumented instance methods

.checkForUpdates

.isGit

.update

.validateRefspec(refspec)