Permalink
Browse files

Merge branch 'master' of git://github.com/visionmedia/kiwi

  • Loading branch information...
2 parents bd3cc8f + ec4723a commit 8448cdbc0610998e10c60d3778655a59c8bc7dee @ciaranj committed Mar 12, 2010
Showing with 314 additions and 66 deletions.
  1. +12 −0 History.md
  2. +6 −1 Makefile
  3. +21 −2 Readme.md
  4. +16 −53 bin/kiwi
  5. +23 −0 docs/build
  6. +18 −0 docs/envs
  7. +36 −0 docs/install
  8. +29 −0 docs/kiwi
  9. +21 −0 docs/publish
  10. +14 −0 docs/register
  11. +24 −0 docs/release
  12. +21 −0 docs/search
  13. +25 −0 docs/switch
  14. +28 −0 docs/uninstall
  15. +2 −2 lib/kiwi.js
  16. +1 −1 seed.yml
  17. +1 −1 server/server/models.rb
  18. +3 −2 server/server/routes.rb
  19. +5 −4 server/spec/search_route_spec.rb
  20. +8 −0 server/spec/seed_spec.rb
View
@@ -1,4 +1,16 @@
+0.1.0 / 2010-03-11
+==================
+
+ * Kiwi server hosting is now provided by Slicehost! woot!
+ * Fixed default version, ">= 0.0.1" not "> 0.0.1"
+ * Fixed bug preventing build commands from working when NOT the last line
+ * Fixed; now building after resolving dependencies. Closes #118
+ * Changed; installing to /usr/local/bin
+ * Removed `kiwi update self` ... use `kiwi update` or `kiwi install kiwi`
+ * Server: Added download count to GET /search
+ * Server: Added seed descriptions to GET /search
+
0.0.1 / 2010-03-05
==================
View
@@ -1,6 +1,7 @@
SPEC = spec
-DEST = /usr/bin
+DEST = /usr/local/bin
+DOC_DEST = /usr/local/etc/kiwi
LIB_DEST = /usr/local/lib/node/libraries
all: test
@@ -20,8 +21,12 @@ server-stop:
install: bin/kiwi
install bin/kiwi $(DEST)/kiwi
install lib/kiwi.js $(LIB_DEST)/kiwi.js
+ mkdir -p $(DOC_DEST)
+ cp -fr docs $(DOC_DEST)
uninstall: $(DEST)/kiwi
rm $(DEST)/kiwi
+ rm $(LIB_DEST)/kiwi.js
+ rm -fr $(DOC_DEST)
.PHONY: install uninstall server-start server-stop test test-server
View
@@ -1,7 +1,12 @@
-# Kiwi
+# Kiwi - Node.js Package Management
- JavaScript package management system for node.js
+ JavaScript package management system for **node.js**
+
+## About
+
+Kiwi development is sponsored by [Vision Media](http://vision-media.ca) and hosting
+is sponsored by [Slicehost](http://slicehost.com).
## Features
@@ -32,6 +37,20 @@
- Use one or more environments to manage your seeds
* Not dependant on GIT (like most other proposed node package managers)
+## Kiwi Vs Others
+
+Other node package management systems utilize absolute urls
+in order to fetch their tarballs, below is an example of
+both **kiwi** and **npm** installing the same library.
+
+kiwi:
+
+ $ kiwi install haml
+
+npm:
+
+ $ npm install http://github.com/creationix/haml-js/tarball/0.1.2
+
## Installation
$ [sudo] make install
View
@@ -4,68 +4,29 @@
# Defaults
#
-VERSION=0.0.1
+VERSION=0.1.0
ORIGIN=git://github.com/visionmedia/kiwi.git
SERVER_PORT=${SERVER_PORT:-80}
SERVER_ADDR=${SERVER_ADDR:-173.203.199.182}
SERVER=http://$SERVER_ADDR:$SERVER_PORT
KIWI_DEST=~/.kiwi
AUTH_DEST=$KIWI_DEST/.auth
SEED_DEST=$KIWI_DEST/current/seeds
+DOCS=/usr/local/etc/kiwi/docs
#
-# Output usage.
+# Output global or [command] usage, piped into less.
#
usage() {
-cat << EOF
-
- Usage:
-
- ${0##*/} [options] [command] [arguments]
-
- Options:
-
- -v, --verbose Verbose output
- -V, --version Current version triplet
- -S, --seeds Output seed directory
- -h, --help Help information
-
- Commands:
-
- <void> Starts a kiwi interactive console (REPL)
- install <name> [version] Installs a seed <name> with optional [version]
- uninstall <name> [version] Uninstalls all versions of seed <name> or the given [version]
- switch <env> Switch to kiwi to use the given seed <env>
- search [pattern] Search remotely available seeds with optional [pattern]
- build <version> Build <version>.seed with the contents of the current directory
- publish <name> <version> Push seed <name> and <version> to the kiwi server
- release <name> <version> Build and publish seed <name> and <version>
- register <name> <password> Attempt to register the given <user> name and <password>
- update Install the latest release of every seed installed
- whoami Output currently registered user name
- list Lists installed seeds and their associated versions
- envs List environments available to kiwi
-
- Install:
-
- Installing the latest version of a seed:
-
- $ kiwi install sass
-
- Installing a specific version:
-
- $ kiwi install sass ">~ major.minor.patch"
-
- The following operators are supported for matching versions:
-
- n/a Equal to
- = Equal to
- > Greater than
- >= Greater than or equal to
- >~ Greater than or equal to with compatibility (major must match)
-
-EOF
+ local command=${1:-kiwi}
+ case $command in
+ env) command=envs ;;
+ add|get) command=install ;;
+ remove|delete|rm) command=uninstall ;;
+ esac
+ cat $DOCS/$command | less
+ exit
}
#
@@ -201,7 +162,7 @@ build() {
local dir=$1
local info=$dir/seed.yml
require_seed_info_file $info
- local command=$(cat $info | grep build | sed 's/build: *//' )
+ local command=$(cat $info | grep build: | cut -d ':' -f 2)
if [[ $command ]]; then
log cd $dir
cd $dir
@@ -300,8 +261,8 @@ install() {
else
download $name $version
unpack $seed
- build ${seed%/*}
install_dependencies ${seed%/*}/seed.yml
+ build ${seed%/*}
fi
fi
}
@@ -523,7 +484,9 @@ parse() {
case $arg in
-V|--version) echo $VERSION ;;
-S|--seeds) echo $SEED_DEST ;;
- -h|--help|help) usage | less ;;
+ -h|--help|help)
+ usage $*
+ ;;
-v|--verbose)
VERBOSE=1
FLAGS="$FLAGS --verbose"
View
@@ -0,0 +1,23 @@
+
+ Usage:
+
+ kiwi build <version>
+
+ Description:
+
+ Builds tarball named "<version>.seed" within
+ the current directory. This tarball contains
+ the contents of this directory, so be careful
+ to ensure that you are in fact in the correct
+ directory.
+
+ Examples:
+
+ From within the root directory of your project:
+
+ $ kiwi build 1.2.0
+
+ See Also:
+
+ register, build, publish
+
View
@@ -0,0 +1,18 @@
+
+ Usage:
+
+ kiwi envs
+
+ Description:
+
+ Outputs a list of environments available to
+ kiwi, prefixing the current environment with "*".
+
+ Aliases:
+
+ env
+
+ See Also:
+
+ switch
+
View
@@ -0,0 +1,36 @@
+
+ Usage:
+
+ kiwi install <name> [version]
+
+ Description:
+
+ Installs the latest version of <seed>, or attempts
+ to install the given [version].
+
+ Examples:
+
+ Install the lastest version of a seed:
+
+ $ kiwi install sass
+
+ Installing a specific version:
+
+ $ kiwi install sass ">~ major.minor.patch"
+
+ The following operators are supported for matching versions:
+
+ n/a Equal to
+ = Equal to
+ > Greater than
+ >= Greater than or equal to
+ >~ Greater than or equal to with compatibility (major must match)
+
+ Aliases:
+
+ add, get
+
+ See Also:
+
+ uninstall
+
View
@@ -0,0 +1,29 @@
+
+ Usage:
+
+ kiwi [options] [command] [arguments]
+
+ Options:
+
+ -v, --verbose Verbose output
+ -V, --version Current version triplet
+ -S, --seeds Output seed directory
+ -h, --help Help information
+
+ Commands:
+
+ <void> Starts a kiwi interactive console (REPL)
+ install <name> [version] Installs a seed <name> with optional [version]
+ uninstall <name> [version] Uninstalls all versions of seed <name> or the given [version]
+ switch <env> Switch to kiwi to use the given seed <env>
+ search [pattern] Search remotely available seeds with optional [pattern]
+ build <version> Build <version>.seed with the contents of the current directory
+ publish <name> <version> Push seed <name> and <version> to the kiwi server
+ release <name> <version> Build and publish seed <name> and <version>
+ register <name> <password> Attempt to register the given <user> name and <password>
+ update Install the latest release of every seed installed
+ whoami Output currently registered user name
+ list Lists installed seeds and their associated versions
+ envs List environments available to kiwi
+ help [command] Output this help or specific [command] help
+
View
@@ -0,0 +1,21 @@
+
+ Usage:
+
+ kiwi publish <name> <version>
+
+ Description:
+
+ Pushes the tarball named "<version>.seed" to
+ the kiwi server. In order to do so you must
+ be the owner of the seed.
+
+ Examples:
+
+ From within the root directory of your project:
+
+ $ kiwi publish haml 1.2.0
+
+ See Also:
+
+ register, build, publish
+
View
@@ -0,0 +1,14 @@
+
+ Usage:
+
+ kiwi register <name> <password>
+
+ Description:
+
+ Attempt to regster the user <name> with
+ the given <password>.
+
+ Examples:
+
+ $ kiwi register keyboard cat
+
View
@@ -0,0 +1,24 @@
+
+ Usage:
+
+ kiwi release <name> <version>
+
+ Description:
+
+ Releases seed <name> and <version> to the kiwi
+ server. In order to do so you must be the owner
+ of this seed.
+
+ Essentially this is a shortcut for both building
+ then publishing your seed.
+
+ Examples:
+
+ From within the root directory of your project:
+
+ $ kiwi release haml 1.2.0
+
+ See Also:
+
+ register, build, publish
+
View
@@ -0,0 +1,21 @@
+
+ Usage:
+
+ kiwi search [pattern]
+
+ Description:
+
+ Searches the remote kiwi server for seeds
+ matching the given [pattern] or simply
+ lists all seeds.
+
+ Examples:
+
+ List all available seeds:
+
+ $ kiwi search
+
+ List all seeds including the text "ml":
+
+ $ kiwi search ml
+
Oops, something went wrong.

0 comments on commit 8448cdb

Please sign in to comment.