Skip to content

Commit

Permalink
Rename project from Carton to Cask.
Browse files Browse the repository at this point in the history
  • Loading branch information
rejeep committed Jul 28, 2013
1 parent 9c35313 commit 4818901
Show file tree
Hide file tree
Showing 30 changed files with 475 additions and 470 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tmp
.carton
.cask
*.elc

*-pkg.el
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ matrix:
- env: EMACS=emacs23
script:
- make ecukes
- curl -fsSkL https://raw.github.com/rejeep/carton/master/go | sh
- curl -fsSkL https://raw.github.com/rejeep/cask/master/go | sh
after_failure:
- cat tmp/server.log
after_script:
Expand Down
2 changes: 1 addition & 1 deletion Carton → Cask
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(source melpa)

(package-file "carton.el")
(package-file "cask.el")

(development
(depends-on "f")
Expand Down
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Use ?= to respect environment variable (if set):
EMACS ?= emacs
TAGS ?=
CARTON ?= ${PWD}/bin/carton
CASK ?= ${PWD}/bin/cask
ECUKES = $(shell find ${PKG_DIR}/ecukes-*/ecukes | tail -1)
ECUKES_ARGS = --script features ${TAGS}
SERVER = ${CARTON} exec ${EMACS} --load server/app.el -Q
SERVER = ${CASK} exec ${EMACS} --load server/app.el -Q

PKG_DIR := $(shell ${CARTON} package-directory)
PKG_DIR := $(shell ${CASK} package-directory)

export EMACS
export CARTON
export CASK

all: ecukes

ecukes: elpa
${CARTON} exec ${ECUKES} ${ECUKES_ARGS}
${CASK} exec ${ECUKES} ${ECUKES_ARGS}

start-server: elpa tmp
${SERVER} --batch > tmp/server.log 2>&1 &
Expand All @@ -26,10 +26,10 @@ server: elpa
${SERVER} -nw

elpa: ${PKG_DIR}
${PKG_DIR}: Carton
${CARTON} install
${PKG_DIR}: Cask
${CASK} install
touch $@
# NOTE: `touch` is called here since `carton install` does not update
# NOTE: `touch` is called here since `cask install` does not update
# timestamp of ${PKG_DIR} directory.

tmp:
Expand Down
48 changes: 24 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Carton [![Build Status](https://api.travis-ci.org/rejeep/carton.png?branch=master)](http://travis-ci.org/rejeep/carton)
# Cask [![Build Status](https://api.travis-ci.org/rejeep/cask.png?branch=master)](http://travis-ci.org/rejeep/cask)

![Carton](https://raw.github.com/rejeep/carton/master/carton.png)
![Cask](https://raw.github.com/rejeep/cask/master/cask.png)

Carton for Emacs is what Bundler is to Ruby. It aims to make ELPA
Cask for Emacs is what Bundler is to Ruby. It aims to make ELPA
dependency management in Emacs painless (as painless as it can
be). This includes both your local Emacs installation and Emacs
package development.
Expand All @@ -11,71 +11,71 @@ package development.

## Installation

To automatically install Carton, run this command:
To automatically install Cask, run this command:

curl -fsSkL https://raw.github.com/rejeep/carton/master/go | sh
curl -fsSkL https://raw.github.com/rejeep/cask/master/go | sh

You can also clone the repository.

$ git clone https://github.com/rejeep/carton.git
$ git clone https://github.com/rejeep/cask.git

Don't forget to add Carton's bin to your `PATH`.
Don't forget to add Cask's bin to your `PATH`.

$ export PATH="/path/to/code/carton/bin:$PATH"
$ export PATH="/path/to/code/cask/bin:$PATH"


## Usage

Create a file called `Carton` in your project root and specify
Create a file called `Cask` in your project root and specify
dependencies:

$ carton init [--dev]
$ cask init [--dev]

_(Use `--dev` if the project is for package development)_

To install all dependencies, run:

$ carton [install]
$ cask [install]

This will create a directory called `.carton`, containing all dependencies.
This will create a directory called `.cask`, containing all dependencies.

To update package version, run:

$ carton update
$ cask update

To list all dependencies, run:

$ carton list
$ cask list

### Emacs configuration

Add this to your `.emacs` file.

(require 'carton "~/.carton/carton.el")
(carton-initialize)
(require 'cask "~/.cask/cask.el")
(cask-initialize)

#### Tips

To automatically keep the `Carton` file up to date with what you
To automatically keep the `Cask` file up to date with what you
install from ELPA, check out <https://github.com/rdallasgray/pallet>.

### Package development

To create a `-pkg.el` file, run:

$ carton package
$ cask package

To run some Emacs Lisp code with ELPA load paths all set up for you, use:

$ carton exec [COMMAND]
$ cask exec [COMMAND]

Example:

$ carton exec make test
$ cask exec make test

To print info about the current project:

$ carton info
$ cask info

## DSL

Expand Down Expand Up @@ -123,7 +123,7 @@ Example:

Define this package and its runtime dependencies from the package headers of a
file (used only for package development). The name of the file is relative to
the directory containing the `Carton` file.
the directory containing the `Cask` file.

(package-file FILENAME)

Expand Down Expand Up @@ -169,11 +169,11 @@ Example:

To install ZSH completion add the following to your `~/.zshrc`:

source /path/to/code/carton/etc/carton_completion.zsh
source /path/to/code/cask/etc/cask_completion.zsh

## I still don't get it, give me some real examples

These are some projects using Carton:
These are some projects using Cask:

* [rejeep/emacs](https://github.com/rejeep/emacs)
* [drag-stuff](https://github.com/rejeep/drag-stuff)
Expand Down
8 changes: 3 additions & 5 deletions bin/carton
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env bash

if [[ "$1" == "exec" ]]; then
EMACSLOADPATH="$($0 load-path)" PATH="$($0 path)" exec "${@:2}"
else
exec "${EMACS:-emacs}" --script "$(dirname $(dirname $0))/carton-cli.el" -- "$@"
fi
echo "[DEPRECATION WARNING] The binary carton is deprecated in favour of cask"

"$(dirname $0)/cask" "$@"
7 changes: 7 additions & 0 deletions bin/cask
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

if [[ "$1" == "exec" ]]; then
EMACSLOADPATH="$($0 load-path)" PATH="$($0 path)" exec "${@:2}"
else
exec "${EMACS:-emacs}" --script "$(dirname $(dirname $0))/cask-cli.el" -- "$@"
fi
142 changes: 0 additions & 142 deletions carton-cli.el

This file was deleted.

Loading

0 comments on commit 4818901

Please sign in to comment.