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
@@ -1,5 +1,5 @@
tmp tmp
.carton .cask
*.elc *.elc


*-pkg.el *-pkg.el
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -27,7 +27,7 @@ matrix:
- env: EMACS=emacs23 - env: EMACS=emacs23
script: script:
- make ecukes - 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: after_failure:
- cat tmp/server.log - cat tmp/server.log
after_script: after_script:
Expand Down
2 changes: 1 addition & 1 deletion Carton → Cask
@@ -1,6 +1,6 @@
(source melpa) (source melpa)


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


(development (development
(depends-on "f") (depends-on "f")
Expand Down
16 changes: 8 additions & 8 deletions Makefile
@@ -1,20 +1,20 @@
# Use ?= to respect environment variable (if set): # Use ?= to respect environment variable (if set):
EMACS ?= emacs EMACS ?= emacs
TAGS ?= TAGS ?=
CARTON ?= ${PWD}/bin/carton CASK ?= ${PWD}/bin/cask
ECUKES = $(shell find ${PKG_DIR}/ecukes-*/ecukes | tail -1) ECUKES = $(shell find ${PKG_DIR}/ecukes-*/ecukes | tail -1)
ECUKES_ARGS = --script features ${TAGS} 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 EMACS
export CARTON export CASK


all: ecukes all: ecukes


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


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


elpa: ${PKG_DIR} elpa: ${PKG_DIR}
${PKG_DIR}: Carton ${PKG_DIR}: Cask
${CARTON} install ${CASK} install
touch $@ 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. # timestamp of ${PKG_DIR} directory.


tmp: tmp:
Expand Down
48 changes: 24 additions & 24 deletions README.md
@@ -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 dependency management in Emacs painless (as painless as it can
be). This includes both your local Emacs installation and Emacs be). This includes both your local Emacs installation and Emacs
package development. package development.
Expand All @@ -11,71 +11,71 @@ package development.


## Installation ## 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. 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 ## Usage


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


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


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


To install all dependencies, run: 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: To update package version, run:


$ carton update $ cask update


To list all dependencies, run: To list all dependencies, run:


$ carton list $ cask list


### Emacs configuration ### Emacs configuration


Add this to your `.emacs` file. Add this to your `.emacs` file.


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


#### Tips #### 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>. install from ELPA, check out <https://github.com/rdallasgray/pallet>.


### Package development ### Package development


To create a `-pkg.el` file, run: 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: To run some Emacs Lisp code with ELPA load paths all set up for you, use:


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


Example: Example:


$ carton exec make test $ cask exec make test


To print info about the current project: To print info about the current project:


$ carton info $ cask info


## DSL ## DSL


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


Define this package and its runtime dependencies from the package headers of a 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 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) (package-file FILENAME)


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


To install ZSH completion add the following to your `~/.zshrc`: 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 ## 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) * [rejeep/emacs](https://github.com/rejeep/emacs)
* [drag-stuff](https://github.com/rejeep/drag-stuff) * [drag-stuff](https://github.com/rejeep/drag-stuff)
Expand Down
8 changes: 3 additions & 5 deletions bin/carton
@@ -1,7 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash


if [[ "$1" == "exec" ]]; then echo "[DEPRECATION WARNING] The binary carton is deprecated in favour of cask"
EMACSLOADPATH="$($0 load-path)" PATH="$($0 path)" exec "${@:2}"
else "$(dirname $0)/cask" "$@"
exec "${EMACS:-emacs}" --script "$(dirname $(dirname $0))/carton-cli.el" -- "$@"
fi
7 changes: 7 additions & 0 deletions bin/cask
@@ -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.

0 comments on commit 4818901

Please sign in to comment.