vulcan 0.2.5 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -80
- data/lib/vulcan/cli.rb +12 -33
- data/lib/vulcan/version.rb +1 -1
- data/server/bin/make +3 -1
- data/server/lib/spawner.js +4 -9
- data/server/node_modules/connect-form/node_modules/formidable/Readme.md +2 -13
- data/server/node_modules/connect-form/node_modules/formidable/lib/incoming_form.js +7 -19
- data/server/node_modules/connect-form/node_modules/formidable/lib/multipart_parser.js +1 -12
- data/server/node_modules/connect-form/node_modules/formidable/package.json +1 -1
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-chrome-13.http +10 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-chrome-12.http +9 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/legacy/simple/test-multipart-parser.js +1 -1
- data/server/node_modules/cradle/lib/cradle.js +1 -0
- data/server/node_modules/cradle/node_modules/vows/LICENSE +20 -0
- data/server/node_modules/cradle/node_modules/vows/Makefile +7 -0
- data/server/node_modules/cradle/node_modules/vows/README.md +39 -0
- data/server/node_modules/cradle/node_modules/vows/bin/vows +515 -0
- data/server/node_modules/cradle/node_modules/vows/lib/assert/error.js +27 -0
- data/server/node_modules/cradle/node_modules/vows/lib/assert/macros.js +215 -0
- data/server/node_modules/cradle/node_modules/vows/lib/assert/utils.js +77 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows.js +193 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/console.js +131 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/context.js +55 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/coverage/file.js +29 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/coverage/fragments/coverage-foot.html +2 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/coverage/fragments/coverage-head.html +61 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/coverage/report-html.js +54 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/coverage/report-json.js +54 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/coverage/report-plain.js +38 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/extras.js +28 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/reporters/dot-matrix.js +67 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/reporters/json.js +16 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/reporters/silent.js +8 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/reporters/spec.js +44 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/reporters/watch.js +39 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/reporters/xunit.js +90 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/suite.js +319 -0
- data/server/node_modules/cradle/node_modules/vows/node_modules/eyes/LICENSE +20 -0
- data/server/node_modules/cradle/node_modules/vows/node_modules/eyes/Makefile +4 -0
- data/server/node_modules/cradle/node_modules/vows/node_modules/eyes/README.md +72 -0
- data/server/node_modules/cradle/node_modules/vows/node_modules/eyes/lib/eyes.js +233 -0
- data/server/node_modules/cradle/node_modules/vows/node_modules/eyes/package.json +14 -0
- data/server/node_modules/cradle/node_modules/vows/node_modules/eyes/test/eyes-test.js +55 -0
- data/server/node_modules/cradle/node_modules/vows/package.json +14 -0
- data/server/node_modules/cradle/node_modules/vows/test/assert-test.js +135 -0
- data/server/node_modules/cradle/node_modules/vows/test/fixtures/isolate/failing.js +18 -0
- data/server/node_modules/cradle/node_modules/vows/test/fixtures/isolate/log.js +18 -0
- data/server/node_modules/cradle/node_modules/vows/test/fixtures/isolate/passing.js +17 -0
- data/server/node_modules/cradle/node_modules/vows/test/fixtures/isolate/stderr.js +18 -0
- data/server/node_modules/cradle/node_modules/vows/test/isolate-test.js +140 -0
- data/server/node_modules/cradle/node_modules/vows/test/testInherit.js +133 -0
- data/server/node_modules/cradle/node_modules/vows/test/vows-error-test.js +51 -0
- data/server/node_modules/cradle/node_modules/vows/test/vows-test.js +374 -0
- data/server/node_modules/cradle/package.json +3 -3
- data/server/node_modules/cradle/test/cache-test.js +7 -6
- data/server/node_modules/cradle/test/cradle-test.js +5 -4
- data/server/node_modules/cradle/test/response-test.js +6 -5
- data/server/node_modules/express/History.md +1 -53
- data/server/node_modules/express/Makefile +9 -3
- data/server/node_modules/express/Readme.md +1 -3
- data/server/node_modules/express/bin/express +66 -65
- data/server/node_modules/express/lib/express.js +1 -1
- data/server/node_modules/express/lib/request.js +9 -23
- data/server/node_modules/express/lib/response.js +2 -3
- data/server/node_modules/express/lib/utils.js +0 -13
- data/server/node_modules/express/lib/view.js +16 -19
- data/server/node_modules/express/lib/view/view.js +1 -2
- data/server/node_modules/express/node_modules/connect/lib/connect.js +1 -1
- data/server/node_modules/express/node_modules/connect/lib/http.js +0 -2
- data/server/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js +31 -135
- data/server/node_modules/express/node_modules/connect/lib/middleware/limit.js +1 -5
- data/server/node_modules/express/node_modules/connect/lib/middleware/session.js +2 -2
- data/server/node_modules/express/node_modules/connect/lib/middleware/static.js +21 -26
- data/server/node_modules/express/node_modules/connect/lib/middleware/staticCache.js +38 -91
- data/server/node_modules/express/node_modules/connect/lib/middleware/vhost.js +1 -1
- data/server/node_modules/express/node_modules/connect/lib/utils.js +4 -11
- data/server/node_modules/express/node_modules/connect/package.json +6 -7
- data/server/node_modules/express/node_modules/connect/test.js +31 -44
- data/server/node_modules/express/node_modules/mime/index.js +1 -0
- data/server/node_modules/express/node_modules/mime/mime.js +3 -3
- data/server/node_modules/express/node_modules/mime/{types/mime.types → mime.types} +0 -0
- data/server/node_modules/express/node_modules/mime/{types/node.types → node.types} +0 -17
- data/server/node_modules/express/node_modules/mime/package.json +10 -21
- data/server/node_modules/express/node_modules/mime/test.js +3 -2
- data/server/node_modules/express/node_modules/qs/History.md +0 -11
- data/server/node_modules/express/node_modules/qs/Makefile +3 -1
- data/server/node_modules/express/node_modules/qs/Readme.md +4 -2
- data/server/node_modules/express/node_modules/qs/lib/querystring.js +74 -100
- data/server/node_modules/express/node_modules/qs/package.json +2 -9
- data/server/node_modules/express/node_modules/qs/support/expresso/History.md +128 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/Makefile +53 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/Readme.md +61 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/bin/expresso +856 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/docs/api.html +1080 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/docs/index.html +377 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/docs/index.md +290 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/docs/layout/foot.html +3 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/docs/layout/head.html +42 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/lib/bar.js +4 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/lib/foo.js +16 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/package.json +12 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/test/assert.test.js +91 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/test/async.test.js +12 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/test/bar.test.js +13 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/test/foo.test.js +14 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/test/http.test.js +146 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/test/serial/async.test.js +39 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/test/serial/http.test.js +48 -0
- data/server/node_modules/express/node_modules/qs/support/should/History.md +22 -0
- data/server/node_modules/express/node_modules/qs/support/should/Makefile +6 -0
- data/server/node_modules/express/node_modules/qs/support/should/Readme.md +248 -0
- data/server/node_modules/express/node_modules/qs/support/should/examples/runner.js +53 -0
- data/server/node_modules/express/node_modules/qs/support/should/index.js +2 -0
- data/server/node_modules/express/node_modules/qs/support/should/lib/eql.js +91 -0
- data/server/node_modules/express/node_modules/qs/support/should/lib/should.js +548 -0
- data/server/node_modules/express/node_modules/qs/support/should/package.json +8 -0
- data/server/node_modules/express/node_modules/qs/support/should/test/should.test.js +358 -0
- data/server/node_modules/express/node_modules/qs/test/{parse.js → parse.test.js} +2 -1
- data/server/node_modules/express/node_modules/qs/test/{stringify.js → stringify.test.js} +0 -0
- data/server/node_modules/express/package.json +8 -9
- data/server/node_modules/node-uuid/README.md +67 -166
- data/server/node_modules/node-uuid/package.json +3 -5
- data/server/node_modules/node-uuid/{benchmark → test}/benchmark-native.c +0 -0
- data/server/node_modules/node-uuid/test/benchmark.js +27 -0
- data/server/node_modules/node-uuid/test/test.html +0 -3
- data/server/node_modules/node-uuid/test/test.js +57 -214
- data/server/node_modules/node-uuid/uuid.js +56 -225
- data/server/node_modules/restler/README.md +7 -20
- data/server/node_modules/restler/bin/restler +1 -1
- data/server/node_modules/restler/lib/multipartform.js +8 -9
- data/server/node_modules/restler/lib/restler.js +22 -64
- data/server/node_modules/restler/package.json +2 -2
- data/server/node_modules/restler/test/restler.js +2 -22
- data/server/node_modules/restler/test/test_helper.js +1 -20
- data/server/package.json +10 -10
- data/server/web.js +7 -30
- metadata +96 -89
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/file/plain.txt +0 -1
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/no-filename/generic.http +0 -13
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/js/no-filename.js +0 -3
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/Makefile +0 -14
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/Readme.md +0 -286
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/TODO +0 -3
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/benchmark/bench-multipart-parser.js +0 -70
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/example/post.js +0 -43
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/example/upload.js +0 -48
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/index.js +0 -1
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/lib/file.js +0 -61
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js +0 -377
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/lib/index.js +0 -3
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/lib/multipart_parser.js +0 -312
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/lib/querystring_parser.js +0 -25
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/lib/util.js +0 -6
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/package.json +0 -22
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/common.js +0 -19
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/funkyfilename.txt +0 -1
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/plain.txt +0 -1
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/no-filename/generic.http +0 -13
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md +0 -3
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-chrome-13.http +0 -26
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-firefox-3.6.http +0 -24
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-safari-5.http +0 -23
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-chrome-12.http +0 -24
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-ie-7.http +0 -22
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-ie-8.http +0 -22
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-safari-5.http +0 -22
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/no-filename.js +0 -3
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/special-chars-in-filename.js +0 -21
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/multi_video.upload +0 -0
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/multipart.js +0 -72
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/integration/test-fixtures.js +0 -89
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/common.js +0 -24
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/integration/test-multipart-parser.js +0 -80
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-file.js +0 -104
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js +0 -715
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-multipart-parser.js +0 -50
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-querystring-parser.js +0 -45
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js +0 -72
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/run.js +0 -2
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js +0 -63
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/tool/record.js +0 -47
- data/server/node_modules/express/node_modules/mkdirp/LICENSE +0 -21
- data/server/node_modules/express/node_modules/mkdirp/README.markdown +0 -21
- data/server/node_modules/express/node_modules/mkdirp/examples/pow.js +0 -6
- data/server/node_modules/express/node_modules/mkdirp/examples/pow.js.orig +0 -6
- data/server/node_modules/express/node_modules/mkdirp/examples/pow.js.rej +0 -19
- data/server/node_modules/express/node_modules/mkdirp/index.js +0 -20
- data/server/node_modules/express/node_modules/mkdirp/package.json +0 -23
- data/server/node_modules/express/node_modules/mkdirp/test/mkdirp.js +0 -28
- data/server/node_modules/express/node_modules/mkdirp/test/race.js +0 -41
- data/server/node_modules/express/node_modules/mkdirp/test/rel.js +0 -32
- data/server/node_modules/express/node_modules/qs/test/mocha.opts +0 -2
- data/server/node_modules/express/testing/foo/app.js +0 -35
- data/server/node_modules/express/testing/foo/package.json +0 -9
- data/server/node_modules/express/testing/foo/public/stylesheets/style.css +0 -8
- data/server/node_modules/express/testing/foo/routes/index.js +0 -10
- data/server/node_modules/express/testing/foo/views/index.jade +0 -2
- data/server/node_modules/express/testing/foo/views/layout.jade +0 -6
- data/server/node_modules/express/testing/index.js +0 -43
- data/server/node_modules/express/testing/public/test.txt +0 -2971
- data/server/node_modules/express/testing/views/page.html +0 -1
- data/server/node_modules/express/testing/views/page.jade +0 -3
- data/server/node_modules/express/testing/views/test.md +0 -1
- data/server/node_modules/express/testing/views/user/index.jade +0 -1
- data/server/node_modules/express/testing/views/user/list.jade +0 -1
- data/server/node_modules/node-uuid/benchmark/README.md +0 -53
- data/server/node_modules/node-uuid/benchmark/bench.gnu +0 -174
- data/server/node_modules/node-uuid/benchmark/bench.sh +0 -34
- data/server/node_modules/node-uuid/benchmark/benchmark.js +0 -84
- data/server/node_modules/node-uuid/test/benchmark-native +0 -0
- data/server/node_modules/node-uuid/test/compare_v1.js +0 -63
data/README.md
CHANGED
@@ -1,80 +1 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
A build server in the cloud.
|
4
|
-
|
5
|
-
## Usage
|
6
|
-
|
7
|
-
$ vulcan help
|
8
|
-
Tasks:
|
9
|
-
vulcan build # build a piece of software for the heroku cloud using COMMAND as a build command if no COMMAND is...
|
10
|
-
vulcan create APP_NAME # create a build server on Heroku
|
11
|
-
vulcan help [TASK] # Describe available tasks or one specific task
|
12
|
-
vulcan update # update the build server
|
13
|
-
|
14
|
-
$ vulcan help build
|
15
|
-
Usage:
|
16
|
-
vulcan build
|
17
|
-
|
18
|
-
Options:
|
19
|
-
-c, [--command=COMMAND] # the command to run for compilation
|
20
|
-
-n, [--name=NAME] # the name of the library (defaults ot the directory name)
|
21
|
-
-o, [--output=OUTPUT] # output build artifacts to this file
|
22
|
-
-p, [--prefix=PREFIX] # the build/install --prefix of the software
|
23
|
-
-s, [--source=SOURCE] # the source directory to build from
|
24
|
-
-v, [--verbose] # show the full build output
|
25
|
-
|
26
|
-
build a piece of software for the heroku cloud using COMMAND as a build command
|
27
|
-
if no COMMAND is specified, a sensible default will be chosen for you
|
28
|
-
|
29
|
-
## Examples
|
30
|
-
|
31
|
-
### Create a Build Server
|
32
|
-
|
33
|
-
$ vulcan create vulcan-david
|
34
|
-
Creating vulcan-david... done, stack is cedar
|
35
|
-
http://vulcan-david.herokuapp.com/ | git@heroku.com:vulcan-david.git
|
36
|
-
...
|
37
|
-
|
38
|
-
### Build
|
39
|
-
|
40
|
-
$ vulcan build -s ~/Code/memcached -p /tmp/memcached -c "./autogen.sh && ./configure --prefix=/tmp/memcached && make install"
|
41
|
-
>> Packaging local directory
|
42
|
-
>> Uploading code for build
|
43
|
-
>> Building with: ./autogen.sh && ./configure --prefix=/tmp/memcached && make install
|
44
|
-
>> Downloading build artifacts to: /tmp/memcached.tgz
|
45
|
-
|
46
|
-
$ tar tvf /tmp/memcached.tgz
|
47
|
-
drwx------ 0 u24714 24714 0 Sep 21 20:25 bin/
|
48
|
-
-rwxr-xr-x 0 u24714 24714 273082 Sep 21 20:25 bin/memcached
|
49
|
-
drwx------ 0 u24714 24714 0 Sep 21 20:25 include/
|
50
|
-
drwx------ 0 u24714 24714 0 Sep 21 20:25 include/memcached/
|
51
|
-
-rw-r--r-- 0 u24714 24714 14855 Sep 21 20:25 include/memcached/protocol_binary.h
|
52
|
-
drwx------ 0 u24714 24714 0 Sep 21 20:25 share/
|
53
|
-
drwx------ 0 u24714 24714 0 Sep 21 20:25 share/man/
|
54
|
-
drwx------ 0 u24714 24714 0 Sep 21 20:25 share/man/man1/
|
55
|
-
-rw-r--r-- 0 u24714 24714 5304 Sep 21 20:25 share/man/man1/memcached.1
|
56
|
-
|
57
|
-
### Keep the Build Server Updated
|
58
|
-
|
59
|
-
$ vulcan update
|
60
|
-
Initialized empty Git repository in /private/var/folders/rm/qksq9jk15vx0xcjxkqc8yg5w0000gn/T/d20110921-70016-1iksqwy/.git/
|
61
|
-
Counting objects: 176, done.
|
62
|
-
Delta compression using up to 8 threads.
|
63
|
-
Compressing objects: 100% (156/156), done.
|
64
|
-
Writing objects: 100% (176/176), 326.86 KiB, done.
|
65
|
-
Total 176 (delta 5), reused 0 (delta 0)
|
66
|
-
|
67
|
-
-----> Heroku receiving push
|
68
|
-
-----> Node.js app detected
|
69
|
-
-----> Vendoring node 0.4.7
|
70
|
-
-----> Installing dependencies with npm 1.0.27
|
71
|
-
|
72
|
-
Dependencies installed
|
73
|
-
-----> Discovering process types
|
74
|
-
Procfile declares types -> web
|
75
|
-
-----> Compiled slug size is 5.5MB
|
76
|
-
-----> Launching... done, v5
|
77
|
-
http://vulcan-david.herokuapp.com deployed to Heroku
|
78
|
-
|
79
|
-
To git@heroku.com:vulcan-david.git
|
80
|
-
+ 2e69a42...eddcb91 master -> master (forced update)
|
1
|
+
This repo has been moved to [heroku/vulcan](http://github.com/heroku/vulcan)
|
data/lib/vulcan/cli.rb
CHANGED
@@ -1,4 +1,9 @@
|
|
1
1
|
require "digest/sha1"
|
2
|
+
require "heroku/auth"
|
3
|
+
require "heroku/command"
|
4
|
+
require "heroku/command/base"
|
5
|
+
require "heroku/command/help"
|
6
|
+
require "heroku/plugin"
|
2
7
|
require "net/http/post/multipart"
|
3
8
|
require "rest_client"
|
4
9
|
require "thor"
|
@@ -57,20 +62,15 @@ if no COMMAND is specified, a sensible default will be chosen for you
|
|
57
62
|
|
58
63
|
puts ">> Downloading build artifacts to: #{output}"
|
59
64
|
|
60
|
-
output_url = "#{server}/output/#{response["X-Make-Id"]}"
|
61
|
-
puts " (available at #{output_url})"
|
62
|
-
|
63
65
|
File.open(output, "w") do |output|
|
64
66
|
begin
|
65
|
-
output.print RestClient.get(
|
67
|
+
output.print RestClient.get("#{server}/output/#{response["X-Make-Id"]}")
|
66
68
|
rescue Exception => ex
|
67
69
|
puts ex.inspect
|
68
70
|
end
|
69
71
|
end
|
70
72
|
end
|
71
73
|
end
|
72
|
-
rescue Interrupt
|
73
|
-
error "Aborted by user"
|
74
74
|
rescue Errno::EPIPE
|
75
75
|
error "Could not connect to build server: #{server}"
|
76
76
|
end
|
@@ -101,32 +101,14 @@ update the build server
|
|
101
101
|
def update
|
102
102
|
error "no app yet, create first" unless config[:app]
|
103
103
|
|
104
|
-
|
105
|
-
|
106
|
-
File.open(File.expand_path("~/.heroku/plugins/heroku-credentials/init.rb"), "w") do |file|
|
107
|
-
file.puts <<-CONTENTS
|
108
|
-
class Heroku::Auth
|
109
|
-
def self.api_key
|
110
|
-
Heroku::Client.auth(user, password, host)["api_key"]
|
111
|
-
end
|
112
|
-
end
|
113
|
-
class Heroku::Command::Credentials < Heroku::Command::Base
|
114
|
-
|
115
|
-
# credentials
|
116
|
-
#
|
117
|
-
# list your api key
|
118
|
-
#
|
119
|
-
def index
|
120
|
-
puts Heroku::Auth.api_key
|
121
|
-
end
|
122
|
-
end
|
123
|
-
CONTENTS
|
124
|
-
end
|
104
|
+
# clean up old plugin, can use auth:token now
|
105
|
+
FileUtils.rm_rf(File.expand_path("~/.heroku/plugins/heroku-credentials"))
|
125
106
|
|
126
107
|
Dir.mktmpdir do |dir|
|
127
108
|
Dir.chdir(dir) do
|
128
|
-
|
129
|
-
|
109
|
+
Heroku::Plugin.load!
|
110
|
+
api_key = Heroku::Auth.api_key
|
111
|
+
error "invalid api key detected, try running `heroku auth:token`" if api_key =~ / /
|
130
112
|
|
131
113
|
system "git init"
|
132
114
|
system "git remote add heroku git@heroku.com:#{config[:app]}.git"
|
@@ -135,14 +117,11 @@ update the build server
|
|
135
117
|
file.puts ".env"
|
136
118
|
file.puts "node_modules"
|
137
119
|
end
|
138
|
-
|
139
|
-
%x{ env BUNDLE_GEMFILE= heroku config:add BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-nodejs.git#versions 2>&1 }
|
140
|
-
|
141
120
|
system "git add . >/dev/null"
|
142
121
|
system "git commit -m commit >/dev/null"
|
143
122
|
system "git push heroku -f master"
|
144
123
|
|
145
|
-
%x{ env BUNDLE_GEMFILE= heroku config:add SECRET=#{config[:secret]} SPAWN_ENV=heroku HEROKU_APP=#{config[:app]} HEROKU_API_KEY=#{api_key}
|
124
|
+
%x{ env BUNDLE_GEMFILE= heroku config:add SECRET=#{config[:secret]} SPAWN_ENV=heroku HEROKU_APP=#{config[:app]} HEROKU_API_KEY=#{api_key} 2>&1 }
|
146
125
|
%x{ env BUNDLE_GEMFILE= heroku addons:add cloudant:oxygen }
|
147
126
|
end
|
148
127
|
end
|
data/lib/vulcan/version.rb
CHANGED
data/server/bin/make
CHANGED
@@ -35,10 +35,12 @@ Dir.mktmpdir do |dir|
|
|
35
35
|
%x{ tar czf #{dir}/output.tgz * 2>&1 }
|
36
36
|
end
|
37
37
|
|
38
|
+
retries = 0
|
38
39
|
begin
|
39
40
|
doc.put_attachment("output", File.open("#{dir}/output.tgz"))
|
40
41
|
rescue RestClient::Conflict
|
41
|
-
|
42
|
+
retries += 1
|
43
|
+
retry if retries < 3
|
42
44
|
end
|
43
45
|
|
44
46
|
end
|
data/server/lib/spawner.js
CHANGED
@@ -62,8 +62,7 @@ var Spawner = function(env) {
|
|
62
62
|
restler.post('https://api.heroku.com/apps/' + app + '/ps', {
|
63
63
|
headers: {
|
64
64
|
'Authorization': auth,
|
65
|
-
'Accept': 'application/json'
|
66
|
-
'User-Agent': 'heroku-gem/2.5'
|
65
|
+
'Accept': 'application/json'
|
67
66
|
},
|
68
67
|
data: {
|
69
68
|
attach: true,
|
@@ -73,14 +72,10 @@ var Spawner = function(env) {
|
|
73
72
|
}).on('success', function(data) {
|
74
73
|
|
75
74
|
var url = require('url').parse(data.rendezvous_url);
|
75
|
+
var rendezvous = new net.Socket();
|
76
76
|
|
77
|
-
|
78
|
-
|
79
|
-
console.log('valid socket');
|
80
|
-
rendezvous.write(url.pathname.substring(1) + '\n');
|
81
|
-
} else {
|
82
|
-
console.log('invalid socket');
|
83
|
-
}
|
77
|
+
rendezvous.connect(url.port, url.hostname, function() {
|
78
|
+
rendezvous.write(url.pathname.substring(1) + '\n');
|
84
79
|
});
|
85
80
|
|
86
81
|
rendezvous.on('data', function(data) {
|
@@ -20,15 +20,6 @@ a big variety of clients and is considered production-ready.
|
|
20
20
|
|
21
21
|
## Changelog
|
22
22
|
|
23
|
-
### v1.0.5
|
24
|
-
|
25
|
-
* Support filename="" in multipart parts
|
26
|
-
* Explain unexpected end() errors in parser better
|
27
|
-
|
28
|
-
### v1.0.4
|
29
|
-
|
30
|
-
* Detect a good default tmp directory regardless of plattform. (#88)
|
31
|
-
|
32
23
|
### v1.0.3
|
33
24
|
|
34
25
|
* Fix problems with utf8 characters (#84) / semicolons in filenames (#58)
|
@@ -151,11 +142,9 @@ Creates a new incoming form.
|
|
151
142
|
|
152
143
|
The encoding to use for incoming form fields.
|
153
144
|
|
154
|
-
#### incomingForm.uploadDir =
|
145
|
+
#### incomingForm.uploadDir = '/tmp'
|
155
146
|
|
156
|
-
The directory for placing file uploads in. You can later on move them using
|
157
|
-
`fs.rename()`. The default directoy is picked at module load time depending on
|
158
|
-
the first existing directory from those listed above.
|
147
|
+
The directory for placing file uploads in. You can later on move them using `fs.rename()`.
|
159
148
|
|
160
149
|
#### incomingForm.keepExtensions = false
|
161
150
|
|
@@ -1,6 +1,5 @@
|
|
1
1
|
if (global.GENTLY) require = GENTLY.hijack(require);
|
2
2
|
|
3
|
-
var fs = require('fs');
|
4
3
|
var util = require('./util'),
|
5
4
|
path = require('path'),
|
6
5
|
File = require('./file'),
|
@@ -18,7 +17,7 @@ function IncomingForm() {
|
|
18
17
|
|
19
18
|
this.maxFieldsSize = 2 * 1024 * 1024;
|
20
19
|
this.keepExtensions = false;
|
21
|
-
this.uploadDir =
|
20
|
+
this.uploadDir = '/tmp';
|
22
21
|
this.encoding = 'utf-8';
|
23
22
|
this.headers = null;
|
24
23
|
this.type = null;
|
@@ -33,20 +32,6 @@ function IncomingForm() {
|
|
33
32
|
util.inherits(IncomingForm, EventEmitter);
|
34
33
|
exports.IncomingForm = IncomingForm;
|
35
34
|
|
36
|
-
IncomingForm.UPLOAD_DIR = (function() {
|
37
|
-
var dirs = [process.env.TMP, '/tmp', process.cwd()];
|
38
|
-
for (var i = 0; i < dirs.length; i++) {
|
39
|
-
var dir = dirs[i];
|
40
|
-
var isDirectory = false;
|
41
|
-
|
42
|
-
try {
|
43
|
-
isDirectory = fs.statSync(dir).isDirectory();
|
44
|
-
} catch (e) {}
|
45
|
-
|
46
|
-
if (isDirectory) return dir;
|
47
|
-
}
|
48
|
-
})();
|
49
|
-
|
50
35
|
IncomingForm.prototype.parse = function(req, cb) {
|
51
36
|
this.pause = function() {
|
52
37
|
try {
|
@@ -162,7 +147,7 @@ IncomingForm.prototype.onPart = function(part) {
|
|
162
147
|
IncomingForm.prototype.handlePart = function(part) {
|
163
148
|
var self = this;
|
164
149
|
|
165
|
-
if (part.filename
|
150
|
+
if (!part.filename) {
|
166
151
|
var value = ''
|
167
152
|
, decoder = new StringDecoder(this.encoding);
|
168
153
|
|
@@ -293,7 +278,10 @@ IncomingForm.prototype._initMultipart = function(boundary) {
|
|
293
278
|
part.name = m[1];
|
294
279
|
}
|
295
280
|
|
296
|
-
|
281
|
+
var filename = self._fileName(headerValue);
|
282
|
+
if (filename) {
|
283
|
+
part.filename = filename;
|
284
|
+
}
|
297
285
|
} else if (headerField == 'content-type') {
|
298
286
|
part.mime = headerValue;
|
299
287
|
}
|
@@ -323,7 +311,7 @@ IncomingForm.prototype._initMultipart = function(boundary) {
|
|
323
311
|
};
|
324
312
|
|
325
313
|
IncomingForm.prototype._fileName = function(headerValue) {
|
326
|
-
var m = headerValue.match(/filename="(
|
314
|
+
var m = headerValue.match(/filename="(.+?)"($|; )/i)
|
327
315
|
if (!m) return;
|
328
316
|
|
329
317
|
var filename = m[1].substr(m[1].lastIndexOf('\\') + 1);
|
@@ -49,13 +49,6 @@ function MultipartParser() {
|
|
49
49
|
};
|
50
50
|
exports.MultipartParser = MultipartParser;
|
51
51
|
|
52
|
-
MultipartParser.stateToString = function(stateNumber) {
|
53
|
-
for (var state in S) {
|
54
|
-
var number = S[state];
|
55
|
-
if (number === stateNumber) return state;
|
56
|
-
}
|
57
|
-
};
|
58
|
-
|
59
52
|
MultipartParser.prototype.initWithBoundary = function(str) {
|
60
53
|
this.boundary = new Buffer(str.length+4);
|
61
54
|
this.boundary.write('\r\n--', 'ascii', 0);
|
@@ -303,10 +296,6 @@ MultipartParser.prototype.write = function(buffer) {
|
|
303
296
|
|
304
297
|
MultipartParser.prototype.end = function() {
|
305
298
|
if (this.state != S.END) {
|
306
|
-
return new Error('MultipartParser.end(): stream ended unexpectedly
|
299
|
+
return new Error('MultipartParser.end(): stream ended unexpectedly');
|
307
300
|
}
|
308
301
|
};
|
309
|
-
|
310
|
-
MultipartParser.prototype.explain = function() {
|
311
|
-
return 'state = ' + MultipartParser.stateToString(this.state);
|
312
|
-
};
|
@@ -24,3 +24,13 @@ Content-Type: text/plain
|
|
24
24
|
I am a text file with a funky name!
|
25
25
|
|
26
26
|
------WebKitFormBoundarytyE4wkKlZ5CQJVTG--
|
27
|
+
GET /favicon.ico HTTP/1.1
|
28
|
+
Host: localhost:8080
|
29
|
+
Connection: keep-alive
|
30
|
+
Accept: */*
|
31
|
+
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.220 Safari/535.1
|
32
|
+
Accept-Encoding: gzip,deflate,sdch
|
33
|
+
Accept-Language: en-US,en;q=0.8
|
34
|
+
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
|
35
|
+
Cookie: jqCookieJar_tablesorter=%7B%22showListTable%22%3A%5B%5B5%2C1%5D%2C%5B1%2C0%5D%5D%7D
|
36
|
+
|
@@ -22,3 +22,12 @@ Content-Type: text/plain
|
|
22
22
|
|
23
23
|
|
24
24
|
------WebKitFormBoundaryEvqBNplR3ByrwQPa--
|
25
|
+
GET /favicon.ico HTTP/1.1
|
26
|
+
Host: 192.168.56.1:8080
|
27
|
+
Connection: keep-alive
|
28
|
+
Accept: */*
|
29
|
+
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30
|
30
|
+
Accept-Encoding: gzip,deflate,sdch
|
31
|
+
Accept-Language: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
|
32
|
+
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
|
33
|
+
|
@@ -40,7 +40,7 @@ test(function parserError() {
|
|
40
40
|
|
41
41
|
test(function end() {
|
42
42
|
(function testError() {
|
43
|
-
assert.equal(parser.end().message, 'MultipartParser.end(): stream ended unexpectedly
|
43
|
+
assert.equal(parser.end().message, 'MultipartParser.end(): stream ended unexpectedly');
|
44
44
|
})();
|
45
45
|
|
46
46
|
(function testRegular() {
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 cloudhead
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,39 @@
|
|
1
|
+
Vows
|
2
|
+
====
|
3
|
+
|
4
|
+
> Asynchronous BDD & continuous integration for node.js
|
5
|
+
|
6
|
+
#### <http://vowsjs.org> #
|
7
|
+
|
8
|
+
introduction
|
9
|
+
------------
|
10
|
+
There are two reasons why we might want asynchronous testing. The first, and obvious reason is that node.js is asynchronous, and therefore our tests need to be. The second reason is to make test suites which target I/O libraries run much faster.
|
11
|
+
|
12
|
+
_Vows_ is an experiment in making this possible, while adding a minimum of overhead.
|
13
|
+
|
14
|
+
synopsis
|
15
|
+
--------
|
16
|
+
|
17
|
+
var vows = require('vows'),
|
18
|
+
assert = require('assert');
|
19
|
+
|
20
|
+
vows.describe('Deep Thought').addBatch({
|
21
|
+
'An instance of DeepThought': {
|
22
|
+
topic: new DeepThought,
|
23
|
+
|
24
|
+
'should know the answer to the ultimate question of life': function (deepThought) {
|
25
|
+
assert.equal (deepThought.question('what is the answer to the universe?'), 42);
|
26
|
+
}
|
27
|
+
}
|
28
|
+
});
|
29
|
+
|
30
|
+
installation
|
31
|
+
------------
|
32
|
+
|
33
|
+
$ npm install vows
|
34
|
+
|
35
|
+
documentation
|
36
|
+
-------------
|
37
|
+
|
38
|
+
Head over to <http://vowsjs.org>
|
39
|
+
|