vulcan 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/vulcan/cli.rb +20 -10
- data/lib/vulcan/version.rb +1 -1
- data/server/Procfile +1 -1
- data/server/bin/web +10 -0
- data/server/lib/cloudant.coffee +20 -0
- data/server/lib/logger.coffee +17 -0
- data/server/lib/on.coffee +10 -0
- data/server/lib/spawner.coffee +65 -0
- data/server/node_modules/coffee-script/CNAME +1 -0
- data/server/node_modules/coffee-script/LICENSE +22 -0
- data/server/node_modules/coffee-script/README +51 -0
- data/server/node_modules/coffee-script/Rakefile +78 -0
- data/server/node_modules/coffee-script/bin/cake +7 -0
- data/server/node_modules/coffee-script/bin/coffee +7 -0
- data/server/node_modules/coffee-script/extras/jsl.conf +44 -0
- data/server/node_modules/coffee-script/lib/coffee-script/browser.js +92 -0
- data/server/node_modules/coffee-script/lib/coffee-script/cake.js +111 -0
- data/server/node_modules/coffee-script/lib/coffee-script/coffee-script.js +167 -0
- data/server/node_modules/coffee-script/lib/coffee-script/command.js +500 -0
- data/server/node_modules/coffee-script/lib/coffee-script/grammar.js +606 -0
- data/server/node_modules/coffee-script/lib/coffee-script/helpers.js +77 -0
- data/server/node_modules/coffee-script/lib/coffee-script/index.js +11 -0
- data/server/node_modules/coffee-script/lib/coffee-script/lexer.js +788 -0
- data/server/node_modules/coffee-script/lib/coffee-script/nodes.js +2986 -0
- data/server/node_modules/coffee-script/lib/coffee-script/optparse.js +138 -0
- data/server/node_modules/coffee-script/lib/coffee-script/parser.js +683 -0
- data/server/node_modules/coffee-script/lib/coffee-script/repl.js +261 -0
- data/server/node_modules/coffee-script/lib/coffee-script/rewriter.js +349 -0
- data/server/node_modules/coffee-script/lib/coffee-script/scope.js +146 -0
- data/server/node_modules/coffee-script/package.json +55 -0
- data/server/node_modules/connect-form/History.md +0 -6
- data/server/node_modules/connect-form/lib/connect-form.js +2 -4
- data/server/node_modules/connect-form/node_modules/formidable/Readme.md +64 -36
- data/server/node_modules/connect-form/node_modules/formidable/lib/incoming_form.js +5 -1
- data/server/node_modules/connect-form/node_modules/formidable/package.json +20 -6
- data/server/node_modules/connect-form/node_modules/formidable/test/common.js +5 -6
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/file/funkyfilename.txt +1 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/js/special-chars-in-filename.js +1 -1
- data/server/node_modules/connect-form/node_modules/formidable/test/{slow → integration}/test-fixtures.js +38 -33
- data/server/node_modules/connect-form/node_modules/formidable/test/legacy/simple/test-incoming-form.js +11 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/run.js +1 -6
- data/server/node_modules/connect-form/node_modules/formidable/test/unit/test-incoming-form.js +63 -0
- data/server/node_modules/connect-form/package.json +27 -5
- data/server/node_modules/cradle/README.md +10 -10
- data/server/node_modules/cradle/lib/cradle.js +117 -523
- data/server/node_modules/cradle/lib/cradle/database/attachments.js +120 -0
- data/server/node_modules/cradle/lib/cradle/database/changes.js +56 -0
- data/server/node_modules/cradle/lib/cradle/database/documents.js +215 -0
- data/server/node_modules/cradle/lib/cradle/database/index.js +65 -0
- data/server/node_modules/cradle/lib/cradle/database/views.js +125 -0
- data/server/node_modules/cradle/node_modules/follow/LICENSE +202 -0
- data/server/node_modules/cradle/node_modules/follow/README.md +164 -0
- data/server/node_modules/cradle/node_modules/follow/Rakefile +54 -0
- data/server/node_modules/cradle/node_modules/follow/api.js +35 -0
- data/server/node_modules/cradle/node_modules/follow/browser/eventemitter2.js +453 -0
- data/server/node_modules/cradle/node_modules/follow/browser/export.js +78 -0
- data/server/node_modules/cradle/node_modules/follow/browser/index.html +14 -0
- data/server/node_modules/cradle/node_modules/follow/browser/jquery-1.6.1.min.js +18 -0
- data/server/node_modules/cradle/node_modules/follow/browser/log4js.js +46 -0
- data/server/node_modules/cradle/node_modules/follow/browser/main.js +92 -0
- data/server/node_modules/cradle/node_modules/follow/browser/querystring.js +28 -0
- data/server/node_modules/cradle/node_modules/follow/browser/request.jquery.js +237 -0
- data/server/node_modules/cradle/node_modules/follow/browser/require.js +33 -0
- data/server/node_modules/cradle/node_modules/follow/browser/util.js +28 -0
- data/server/node_modules/cradle/node_modules/follow/cli.js +101 -0
- data/server/node_modules/cradle/node_modules/follow/lib/feed.js +556 -0
- data/server/node_modules/cradle/node_modules/follow/lib/index.js +66 -0
- data/server/node_modules/cradle/node_modules/follow/lib/stream.js +305 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/LICENSE +55 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/README.md +285 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/main.js +618 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/mimetypes.js +146 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/oauth.js +34 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/package.json +42 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/googledoodle.png +0 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/run.sh +6 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/server.js +57 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-body.js +90 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-cookie.js +29 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-cookiejar.js +90 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-errors.js +30 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-oauth.js +109 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-pipes.js +167 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-proxy.js +39 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-timeout.js +87 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/uuid.js +19 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/vendor/cookie/index.js +55 -0
- data/server/node_modules/cradle/node_modules/follow/node_modules/request/vendor/cookie/jar.js +72 -0
- data/server/node_modules/cradle/node_modules/follow/package.json +45 -0
- data/server/node_modules/cradle/node_modules/follow/test/couch.js +153 -0
- data/server/node_modules/cradle/node_modules/follow/test/follow.js +136 -0
- data/server/node_modules/cradle/node_modules/follow/test/issues.js +178 -0
- data/server/node_modules/cradle/node_modules/follow/test/issues/10.js +24 -0
- data/server/node_modules/cradle/node_modules/follow/test/stream.js +493 -0
- data/server/node_modules/cradle/node_modules/request/LICENSE +55 -0
- data/server/node_modules/cradle/node_modules/request/README.md +287 -0
- data/server/node_modules/cradle/node_modules/request/forever.js +103 -0
- data/server/node_modules/cradle/node_modules/request/main.js +913 -0
- data/server/node_modules/cradle/node_modules/request/mimetypes.js +152 -0
- data/server/node_modules/cradle/node_modules/request/oauth.js +34 -0
- data/server/node_modules/cradle/node_modules/request/package.json +42 -0
- data/server/node_modules/cradle/node_modules/request/tests/googledoodle.png +0 -0
- data/server/node_modules/cradle/node_modules/request/tests/run.js +38 -0
- data/server/node_modules/cradle/node_modules/request/tests/server.js +82 -0
- data/server/node_modules/cradle/node_modules/request/tests/squid.conf +77 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/ca.cnf +20 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/ca.crl +0 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/ca.crt +17 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/ca.csr +13 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/ca.key +18 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/ca.srl +1 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/server.cnf +19 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/server.crt +16 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/server.csr +11 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/server.js +28 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/server.key +9 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/npm-ca.crt +16 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/test.crt +15 -0
- data/server/node_modules/cradle/node_modules/request/tests/ssl/test.key +15 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-body.js +95 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-cookie.js +29 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-cookiejar.js +90 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-defaults.js +68 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-errors.js +37 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-headers.js +52 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-httpModule.js +94 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-https-strict.js +97 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-https.js +86 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-oauth.js +117 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-params.js +92 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-pipes.js +202 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-proxy.js +39 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-qs.js +28 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-redirect.js +154 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-timeout.js +87 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-toJSON.js +14 -0
- data/server/node_modules/cradle/node_modules/request/tests/test-tunnel.js +61 -0
- data/server/node_modules/cradle/node_modules/request/tunnel.js +229 -0
- data/server/node_modules/cradle/node_modules/request/uuid.js +19 -0
- data/server/node_modules/cradle/node_modules/request/vendor/cookie/index.js +65 -0
- data/server/node_modules/cradle/node_modules/request/vendor/cookie/jar.js +72 -0
- data/server/node_modules/cradle/node_modules/vargs/package.json +33 -10
- data/server/node_modules/cradle/package.json +50 -12
- data/server/node_modules/cradle/test/cache-test.js +1 -4
- data/server/node_modules/cradle/test/connection-test.js +179 -0
- data/server/node_modules/cradle/test/database-attachment-test.js +344 -0
- data/server/node_modules/cradle/test/database-cache-test.js +132 -0
- data/server/node_modules/cradle/test/database-test.js +219 -0
- data/server/node_modules/cradle/test/database-view-test.js +141 -0
- data/server/node_modules/cradle/test/fixtures/databases.json +28 -1
- data/server/node_modules/cradle/test/helpers/seed.js +14 -5
- data/server/node_modules/cradle/test/response-test.js +1 -1
- data/server/node_modules/express/History.md +16 -0
- data/server/node_modules/express/bin/express +7 -6
- data/server/node_modules/express/lib-cov/application.js +510 -0
- data/server/node_modules/express/lib-cov/express.js +65 -0
- data/server/node_modules/express/lib-cov/middleware.js +54 -0
- data/server/node_modules/express/lib-cov/request.js +225 -0
- data/server/node_modules/express/lib-cov/response.js +611 -0
- data/server/node_modules/express/lib-cov/router/collection.js +40 -0
- data/server/node_modules/express/lib-cov/router/index.js +515 -0
- data/server/node_modules/express/lib-cov/router/methods.js +9 -0
- data/server/node_modules/express/lib-cov/router/route.js +68 -0
- data/server/node_modules/express/lib-cov/utils.js +151 -0
- data/server/node_modules/express/lib-cov/view.js +81 -0
- data/server/node_modules/express/lib/express.js +1 -1
- data/server/node_modules/express/lib/http.js +1 -2
- data/server/node_modules/express/lib/request.js +2 -2
- data/server/node_modules/express/lib/router/methods.js +10 -1
- data/server/node_modules/express/node_modules/connect/lib/connect.js +1 -1
- data/server/node_modules/express/node_modules/connect/lib/http.js +3 -2
- data/server/node_modules/express/node_modules/connect/lib/middleware/limit.js +0 -2
- data/server/node_modules/express/node_modules/connect/lib/middleware/session.js +1 -2
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/Readme.md +42 -25
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js +1 -0
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/package.json +14 -3
- data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js +11 -0
- data/server/node_modules/express/node_modules/connect/package.json +35 -7
- data/server/node_modules/express/node_modules/mime/package.json +30 -8
- data/server/node_modules/express/node_modules/mkdirp/README.markdown +35 -2
- data/server/node_modules/express/node_modules/mkdirp/examples/pow.js +1 -1
- data/server/node_modules/express/node_modules/mkdirp/index.js +72 -13
- data/server/node_modules/express/node_modules/mkdirp/package.json +39 -21
- data/server/node_modules/express/node_modules/mkdirp/test/chmod.js +38 -0
- data/server/node_modules/express/node_modules/mkdirp/test/clobber.js +37 -0
- data/server/node_modules/express/node_modules/mkdirp/test/perm.js +32 -0
- data/server/node_modules/express/node_modules/mkdirp/test/perm_sync.js +39 -0
- data/server/node_modules/express/node_modules/mkdirp/test/sync.js +27 -0
- data/server/node_modules/express/node_modules/mkdirp/test/umask.js +28 -0
- data/server/node_modules/express/node_modules/mkdirp/test/umask_sync.js +27 -0
- data/server/node_modules/express/node_modules/qs/History.md +10 -0
- data/server/node_modules/express/node_modules/qs/Readme.md +9 -2
- data/server/node_modules/express/node_modules/qs/examples.js +3 -0
- data/server/node_modules/express/node_modules/qs/lib/querystring.js +8 -6
- data/server/node_modules/express/node_modules/qs/package.json +26 -8
- data/server/node_modules/express/node_modules/qs/test/parse.js +13 -1
- data/server/node_modules/express/node_modules/qs/test/stringify.js +45 -37
- data/server/node_modules/express/package.json +55 -16
- data/server/node_modules/express/test.js +41 -0
- data/server/node_modules/knox/package.json +26 -4
- data/server/node_modules/node-uuid/package.json +40 -11
- data/server/node_modules/node-uuid/test/test.js +1 -1
- data/server/node_modules/nodemon/README.md +120 -0
- data/server/node_modules/nodemon/nodemon.js +518 -0
- data/server/node_modules/nodemon/nodemonignore.example +11 -0
- data/server/node_modules/nodemon/package.json +49 -0
- data/server/node_modules/restler/README.md +144 -94
- data/server/node_modules/restler/lib/multipartform.js +2 -0
- data/server/node_modules/restler/lib/restler.js +218 -61
- data/server/node_modules/restler/package.json +35 -8
- data/server/node_modules/restler/test/all.js +6 -1
- data/server/node_modules/restler/test/restler.js +624 -118
- data/server/package.json +14 -10
- data/server/web.coffee +64 -0
- data/server/web.js +15 -3
- metadata +170 -57
- data/server/index.js +0 -14
- data/server/node_modules/connect-form/LICENSE +0 -22
- data/server/node_modules/connect-form/index.js +0 -100
- data/server/node_modules/connect-form/node_modules/formidable/test/fast/test-incoming-form.js +0 -45
- 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/http/special-chars-in-filename/osx-chrome-13.http +0 -26
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-firefox-3.6.http +0 -24
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-safari-5.http +0 -23
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-chrome-12.http +0 -24
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-ie-7.http +0 -22
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-ie-8.http +0 -22
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-safari-5.http +0 -22
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/multi_video.upload +0 -0
- data/server/node_modules/cradle/Makefile +0 -10
- data/server/node_modules/cradle/test/cradle-test.js +0 -650
- 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/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/multi_video.upload +0 -0
- data/server/node_modules/express/node_modules/connect/test.js +0 -52
- 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/knox/lib/knox/mime/index.js +0 -308
- data/server/node_modules/knox/lib/knox/mime/test.js +0 -59
- data/server/node_modules/node-uuid/test/benchmark-native +0 -0
- data/server/node_modules/on/index.js +0 -13
- data/server/node_modules/restler/test/test_helper.js +0 -163
- data/server/node_modules/spawner/index.js +0 -106
data/lib/vulcan/cli.rb
CHANGED
@@ -37,13 +37,13 @@ if no COMMAND is specified, a sensible default will be chosen for you
|
|
37
37
|
prefix = options[:prefix] || "/app/vendor/#{name}"
|
38
38
|
command = options[:command] || "./configure --prefix #{prefix} && make install"
|
39
39
|
deps = options[:deps] || []
|
40
|
-
server = URI.parse(ENV["
|
40
|
+
server = URI.parse(ENV["VULCAN_HOST"] || "http://#{app}.herokuapp.com")
|
41
41
|
|
42
42
|
Dir.mktmpdir do |dir|
|
43
|
-
|
44
|
-
|
43
|
+
action "Packaging local directory" do
|
44
|
+
%x{ cd #{source} && tar czvf #{dir}/input.tgz . 2>&1 }
|
45
|
+
end
|
45
46
|
|
46
|
-
puts ">> Uploading code for build"
|
47
47
|
File.open("#{dir}/input.tgz", "r") do |input|
|
48
48
|
request = Net::HTTP::Post::Multipart.new "/make",
|
49
49
|
"code" => UploadIO.new(input, "application/octet-stream", "input.tgz"),
|
@@ -52,11 +52,13 @@ if no COMMAND is specified, a sensible default will be chosen for you
|
|
52
52
|
"secret" => config[:secret],
|
53
53
|
"deps" => deps
|
54
54
|
|
55
|
-
|
55
|
+
print "Uploading source package... "
|
56
56
|
response = Net::HTTP.start(server.host, server.port) do |http|
|
57
57
|
http.request(request) do |response|
|
58
58
|
response.read_body do |chunk|
|
59
|
-
|
59
|
+
unless chunk == 0.chr + "\n"
|
60
|
+
print chunk if options[:verbose]
|
61
|
+
end
|
60
62
|
end
|
61
63
|
end
|
62
64
|
end
|
@@ -125,20 +127,28 @@ update the build server
|
|
125
127
|
file.puts ".env"
|
126
128
|
end
|
127
129
|
|
128
|
-
%x{ env BUNDLE_GEMFILE= heroku config:remove BUILDPACK_URL 2>&1 }
|
129
|
-
|
130
130
|
system "git add . >/dev/null"
|
131
131
|
system "git commit -m commit >/dev/null"
|
132
132
|
system "git push heroku -f master"
|
133
133
|
|
134
|
-
|
135
|
-
|
134
|
+
heroku "config:add SECRET=#{config[:secret]} SPAWN_ENV=heroku HEROKU_APP=#{config[:app]} HEROKU_API_KEY=#{api_key} NODE_PATH=lib"
|
135
|
+
heroku "addons:add cloudant:oxygen"
|
136
136
|
end
|
137
137
|
end
|
138
138
|
end
|
139
139
|
|
140
140
|
private
|
141
141
|
|
142
|
+
def action(message)
|
143
|
+
print "#{message}... "
|
144
|
+
yield
|
145
|
+
puts "done"
|
146
|
+
end
|
147
|
+
|
148
|
+
def heroku(command)
|
149
|
+
%x{ env BUNDLE_GEMFILE= heroku #{command} 2>&1 }
|
150
|
+
end
|
151
|
+
|
142
152
|
def config_file
|
143
153
|
File.expand_path("~/.vulcan")
|
144
154
|
end
|
data/lib/vulcan/version.rb
CHANGED
data/server/Procfile
CHANGED
@@ -1 +1 @@
|
|
1
|
-
web:
|
1
|
+
web: bin/web
|
data/server/bin/web
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
cradle = require("cradle")
|
2
|
+
url = require("url")
|
3
|
+
|
4
|
+
module.exports.connect = (database, cb) ->
|
5
|
+
|
6
|
+
if parsed = url.parse(process.env.CLOUDANT_URL)
|
7
|
+
if parsed.auth
|
8
|
+
options =
|
9
|
+
auth:
|
10
|
+
username: parsed.auth.split(":")[0]
|
11
|
+
password: parsed.auth.split(":")[1]
|
12
|
+
else
|
13
|
+
options = {}
|
14
|
+
else
|
15
|
+
options = {}
|
16
|
+
|
17
|
+
db = new (cradle.Connection)(parsed.hostname, parsed.port or 5984, options).database(database)
|
18
|
+
db.create ->
|
19
|
+
cb(db) if cb
|
20
|
+
db
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class Logger
|
2
|
+
|
3
|
+
constructor: (@response, @next, @id) ->
|
4
|
+
|
5
|
+
info: (subject) ->
|
6
|
+
console.log "[#{@id}] #{subject}"
|
7
|
+
|
8
|
+
error: (subject) ->
|
9
|
+
console.log "[#{@id}] ERROR: #{subject}"
|
10
|
+
if @next
|
11
|
+
@next(subject)
|
12
|
+
else
|
13
|
+
@response.write(subject)
|
14
|
+
@response.send(500)
|
15
|
+
|
16
|
+
module.exports.init = (response, next, id) ->
|
17
|
+
new Logger(response, next, id)
|
@@ -0,0 +1,65 @@
|
|
1
|
+
events = require("events")
|
2
|
+
https = require("https")
|
3
|
+
net = require("net")
|
4
|
+
qs = require("querystring")
|
5
|
+
restler = require("restler")
|
6
|
+
spawn = require("child_process").spawn
|
7
|
+
tls = require("tls")
|
8
|
+
|
9
|
+
class Spawner
|
10
|
+
|
11
|
+
constructor: (env) ->
|
12
|
+
@env = env or process.env.SPAWN_ENV or "local"
|
13
|
+
|
14
|
+
spawn: (command, options) ->
|
15
|
+
spawner = this["spawn_#{@env}"]
|
16
|
+
spawner command, options
|
17
|
+
|
18
|
+
spawn_local: (command, options) ->
|
19
|
+
args = command.match(/("[^"]*"|[^"]+)(\s+|$)/g)
|
20
|
+
command = args.shift().replace(/\s+$/g, "")
|
21
|
+
args = args.map (arg) -> arg.match(/"?([^"]*)"?/)[1]
|
22
|
+
proc = spawn command, args, env:(options.env || {})
|
23
|
+
emitter = new events.EventEmitter()
|
24
|
+
|
25
|
+
proc.stdout.on "data", (data) -> emitter.emit("data", data)
|
26
|
+
proc.stderr.on "data", (data) -> emitter.emit("data", data)
|
27
|
+
proc.on "exit", (code) -> emitter.emit("end", code)
|
28
|
+
emitter
|
29
|
+
|
30
|
+
spawn_heroku: (command, options) ->
|
31
|
+
api_key = process.env.HEROKU_API_KEY
|
32
|
+
app = process.env.HEROKU_APP
|
33
|
+
emitter = new events.EventEmitter()
|
34
|
+
|
35
|
+
data = {}
|
36
|
+
data["ps_env[#{key}]"] = "" for key, val of process.env # nullify parent env
|
37
|
+
data["ps_env[#{key}]"] = val for key, val of options.env # only add desired env
|
38
|
+
data["attach"] = "true"
|
39
|
+
data["command"] = command
|
40
|
+
|
41
|
+
request = restler.post "https://api.heroku.com/apps/#{app}/ps",
|
42
|
+
headers:
|
43
|
+
"Authorization": new Buffer(":" + api_key).toString("base64")
|
44
|
+
"Accept": "application/json"
|
45
|
+
"User-Agent": "heroku-gem/2.5"
|
46
|
+
data: data
|
47
|
+
|
48
|
+
request.on "success", (data) ->
|
49
|
+
url = require("url").parse(data.rendezvous_url)
|
50
|
+
rendezvous = tls.connect url.port, url.hostname, ->
|
51
|
+
if rendezvous.authorized
|
52
|
+
console.log "valid socket"
|
53
|
+
rendezvous.write url.pathname.substring(1) + "\n"
|
54
|
+
else
|
55
|
+
console.log "invalid socket"
|
56
|
+
rendezvous.on "data", (data) -> emitter.emit("data", data) unless data.toString() is "rendezvous\r\n"
|
57
|
+
rendezvous.on "end", -> emitter.emit "end"
|
58
|
+
|
59
|
+
request.on "error", (error) ->
|
60
|
+
emitter.emit "error", error
|
61
|
+
|
62
|
+
emitter
|
63
|
+
|
64
|
+
module.exports.init = (env) ->
|
65
|
+
new Spawner(env)
|
@@ -0,0 +1 @@
|
|
1
|
+
coffeescript.org
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2009-2012 Jeremy Ashkenas
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person
|
4
|
+
obtaining a copy of this software and associated documentation
|
5
|
+
files (the "Software"), to deal in the Software without
|
6
|
+
restriction, including without limitation the rights to use,
|
7
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the
|
9
|
+
Software is furnished to do so, subject to the following
|
10
|
+
conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
17
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
19
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
20
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,51 @@
|
|
1
|
+
|
2
|
+
{
|
3
|
+
} } {
|
4
|
+
{ { } }
|
5
|
+
} }{ {
|
6
|
+
{ }{ } } _____ __ __
|
7
|
+
( }{ }{ { ) / ____| / _|/ _|
|
8
|
+
.- { { } { }} -. | | ___ | |_| |_ ___ ___
|
9
|
+
( ( } { } { } } ) | | / _ \| _| _/ _ \/ _ \
|
10
|
+
|`-..________ ..-'| | |___| (_) | | | || __/ __/
|
11
|
+
| | \_____\___/|_| |_| \___|\___|
|
12
|
+
| ;--.
|
13
|
+
| (__ \ _____ _ _
|
14
|
+
| | ) ) / ____| (_) | |
|
15
|
+
| |/ / | (___ ___ _ __ _ _ __ | |_
|
16
|
+
| ( / \___ \ / __| '__| | '_ \| __|
|
17
|
+
| |/ ____) | (__| | | | |_) | |_
|
18
|
+
| | |_____/ \___|_| |_| .__/ \__|
|
19
|
+
`-.._________..-' | |
|
20
|
+
|_|
|
21
|
+
|
22
|
+
|
23
|
+
CoffeeScript is a little language that compiles into JavaScript.
|
24
|
+
|
25
|
+
Install Node.js, and then the CoffeeScript compiler:
|
26
|
+
sudo bin/cake install
|
27
|
+
|
28
|
+
Or, if you have the Node Package Manager installed:
|
29
|
+
npm install -g coffee-script
|
30
|
+
(Leave off the -g if you don't wish to install globally.)
|
31
|
+
|
32
|
+
Execute a script:
|
33
|
+
coffee /path/to/script.coffee
|
34
|
+
|
35
|
+
Compile a script:
|
36
|
+
coffee -c /path/to/script.coffee
|
37
|
+
|
38
|
+
For documentation, usage, and examples, see:
|
39
|
+
http://coffeescript.org/
|
40
|
+
|
41
|
+
To suggest a feature, report a bug, or general discussion:
|
42
|
+
http://github.com/jashkenas/coffee-script/issues/
|
43
|
+
|
44
|
+
If you'd like to chat, drop by #coffeescript on Freenode IRC,
|
45
|
+
or on webchat.freenode.net.
|
46
|
+
|
47
|
+
The source repository:
|
48
|
+
git://github.com/jashkenas/coffee-script.git
|
49
|
+
|
50
|
+
All contributors are listed here:
|
51
|
+
http://github.com/jashkenas/coffee-script/contributors
|
@@ -0,0 +1,78 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'erb'
|
3
|
+
require 'fileutils'
|
4
|
+
require 'rake/testtask'
|
5
|
+
require 'json'
|
6
|
+
|
7
|
+
desc "Build the documentation page"
|
8
|
+
task :doc do
|
9
|
+
source = 'documentation/index.html.erb'
|
10
|
+
child = fork { exec "bin/coffee -bcw -o documentation/js documentation/coffee/*.coffee" }
|
11
|
+
at_exit { Process.kill("INT", child) }
|
12
|
+
Signal.trap("INT") { exit }
|
13
|
+
loop do
|
14
|
+
mtime = File.stat(source).mtime
|
15
|
+
if !@mtime || mtime > @mtime
|
16
|
+
rendered = ERB.new(File.read(source)).result(binding)
|
17
|
+
File.open('index.html', 'w+') {|f| f.write(rendered) }
|
18
|
+
end
|
19
|
+
@mtime = mtime
|
20
|
+
sleep 1
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
desc "Build coffee-script-source gem"
|
25
|
+
task :gem do
|
26
|
+
require 'rubygems'
|
27
|
+
require 'rubygems/package'
|
28
|
+
|
29
|
+
gemspec = Gem::Specification.new do |s|
|
30
|
+
s.name = 'coffee-script-source'
|
31
|
+
s.version = JSON.parse(File.read('package.json'))["version"]
|
32
|
+
s.date = Time.now.strftime("%Y-%m-%d")
|
33
|
+
|
34
|
+
s.homepage = "http://jashkenas.github.com/coffee-script/"
|
35
|
+
s.summary = "The CoffeeScript Compiler"
|
36
|
+
s.description = <<-EOS
|
37
|
+
CoffeeScript is a little language that compiles into JavaScript.
|
38
|
+
Underneath all of those embarrassing braces and semicolons,
|
39
|
+
JavaScript has always had a gorgeous object model at its heart.
|
40
|
+
CoffeeScript is an attempt to expose the good parts of JavaScript
|
41
|
+
in a simple way.
|
42
|
+
EOS
|
43
|
+
|
44
|
+
s.files = [
|
45
|
+
'lib/coffee_script/coffee-script.js',
|
46
|
+
'lib/coffee_script/source.rb'
|
47
|
+
]
|
48
|
+
|
49
|
+
s.authors = ['Jeremy Ashkenas']
|
50
|
+
s.email = 'jashkenas@gmail.com'
|
51
|
+
s.rubyforge_project = 'coffee-script-source'
|
52
|
+
end
|
53
|
+
|
54
|
+
file = File.open("coffee-script-source.gem", "w")
|
55
|
+
Gem::Package.open(file, 'w') do |pkg|
|
56
|
+
pkg.metadata = gemspec.to_yaml
|
57
|
+
|
58
|
+
path = "lib/coffee_script/source.rb"
|
59
|
+
contents = <<-ERUBY
|
60
|
+
module CoffeeScript
|
61
|
+
module Source
|
62
|
+
def self.bundled_path
|
63
|
+
File.expand_path("../coffee-script.js", __FILE__)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
ERUBY
|
68
|
+
pkg.add_file_simple(path, 0644, contents.size) do |tar_io|
|
69
|
+
tar_io.write(contents)
|
70
|
+
end
|
71
|
+
|
72
|
+
contents = File.read("extras/coffee-script.js")
|
73
|
+
path = "lib/coffee_script/coffee-script.js"
|
74
|
+
pkg.add_file_simple(path, 0644, contents.size) do |tar_io|
|
75
|
+
tar_io.write(contents)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# JavaScriptLint configuration file for CoffeeScript.
|
2
|
+
|
3
|
+
+no_return_value # function {0} does not always return a value
|
4
|
+
+duplicate_formal # duplicate formal argument {0}
|
5
|
+
-equal_as_assign # test for equality (==) mistyped as assignment (=)?{0}
|
6
|
+
+var_hides_arg # variable {0} hides argument
|
7
|
+
+redeclared_var # redeclaration of {0} {1}
|
8
|
+
-anon_no_return_value # anonymous function does not always return a value
|
9
|
+
+missing_semicolon # missing semicolon
|
10
|
+
+meaningless_block # meaningless block; curly braces have no impact
|
11
|
+
-comma_separated_stmts # multiple statements separated by commas (use semicolons?)
|
12
|
+
+unreachable_code # unreachable code
|
13
|
+
+missing_break # missing break statement
|
14
|
+
-missing_break_for_last_case # missing break statement for last case in switch
|
15
|
+
-comparison_type_conv # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==)
|
16
|
+
-inc_dec_within_stmt # increment (++) and decrement (--) operators used as part of greater statement
|
17
|
+
-useless_void # use of the void type may be unnecessary (void is always undefined)
|
18
|
+
+multiple_plus_minus # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs
|
19
|
+
+use_of_label # use of label
|
20
|
+
-block_without_braces # block statement without curly braces
|
21
|
+
+leading_decimal_point # leading decimal point may indicate a number or an object member
|
22
|
+
+trailing_decimal_point # trailing decimal point may indicate a number or an object member
|
23
|
+
+octal_number # leading zeros make an octal number
|
24
|
+
+nested_comment # nested comment
|
25
|
+
+misplaced_regex # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma
|
26
|
+
+ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement
|
27
|
+
+empty_statement # empty statement or extra semicolon
|
28
|
+
-missing_option_explicit # the "option explicit" control comment is missing
|
29
|
+
+partial_option_explicit # the "option explicit" control comment, if used, must be in the first script tag
|
30
|
+
+dup_option_explicit # duplicate "option explicit" control comment
|
31
|
+
+useless_assign # useless assignment
|
32
|
+
+ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity
|
33
|
+
+ambiguous_else_stmt # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent)
|
34
|
+
-missing_default_case # missing default case in switch statement
|
35
|
+
+duplicate_case_in_switch # duplicate case in switch statements
|
36
|
+
+default_not_at_end # the default case is not at the end of the switch statement
|
37
|
+
+legacy_cc_not_understood # couldn't understand control comment using /*@keyword@*/ syntax
|
38
|
+
+jsl_cc_not_understood # couldn't understand control comment using /*jsl:keyword*/ syntax
|
39
|
+
+useless_comparison # useless comparison; comparing identical expressions
|
40
|
+
+with_statement # with statement hides undeclared variables; use temporary variable instead
|
41
|
+
+trailing_comma_in_array # extra comma is not recommended in array initializers
|
42
|
+
+assign_to_function_call # assignment to a function call
|
43
|
+
+parseint_missing_radix # parseInt missing radix parameter
|
44
|
+
+lambda_assign_requires_semicolon
|
@@ -0,0 +1,92 @@
|
|
1
|
+
// Generated by CoffeeScript 1.3.3
|
2
|
+
(function() {
|
3
|
+
var CoffeeScript, runScripts;
|
4
|
+
|
5
|
+
CoffeeScript = require('./coffee-script');
|
6
|
+
|
7
|
+
CoffeeScript.require = require;
|
8
|
+
|
9
|
+
CoffeeScript["eval"] = function(code, options) {
|
10
|
+
var _ref;
|
11
|
+
if (options == null) {
|
12
|
+
options = {};
|
13
|
+
}
|
14
|
+
if ((_ref = options.bare) == null) {
|
15
|
+
options.bare = true;
|
16
|
+
}
|
17
|
+
return eval(CoffeeScript.compile(code, options));
|
18
|
+
};
|
19
|
+
|
20
|
+
CoffeeScript.run = function(code, options) {
|
21
|
+
if (options == null) {
|
22
|
+
options = {};
|
23
|
+
}
|
24
|
+
options.bare = true;
|
25
|
+
return Function(CoffeeScript.compile(code, options))();
|
26
|
+
};
|
27
|
+
|
28
|
+
if (typeof window === "undefined" || window === null) {
|
29
|
+
return;
|
30
|
+
}
|
31
|
+
|
32
|
+
CoffeeScript.load = function(url, callback) {
|
33
|
+
var xhr;
|
34
|
+
xhr = new (window.ActiveXObject || XMLHttpRequest)('Microsoft.XMLHTTP');
|
35
|
+
xhr.open('GET', url, true);
|
36
|
+
if ('overrideMimeType' in xhr) {
|
37
|
+
xhr.overrideMimeType('text/plain');
|
38
|
+
}
|
39
|
+
xhr.onreadystatechange = function() {
|
40
|
+
var _ref;
|
41
|
+
if (xhr.readyState === 4) {
|
42
|
+
if ((_ref = xhr.status) === 0 || _ref === 200) {
|
43
|
+
CoffeeScript.run(xhr.responseText);
|
44
|
+
} else {
|
45
|
+
throw new Error("Could not load " + url);
|
46
|
+
}
|
47
|
+
if (callback) {
|
48
|
+
return callback();
|
49
|
+
}
|
50
|
+
}
|
51
|
+
};
|
52
|
+
return xhr.send(null);
|
53
|
+
};
|
54
|
+
|
55
|
+
runScripts = function() {
|
56
|
+
var coffees, execute, index, length, s, scripts;
|
57
|
+
scripts = document.getElementsByTagName('script');
|
58
|
+
coffees = (function() {
|
59
|
+
var _i, _len, _results;
|
60
|
+
_results = [];
|
61
|
+
for (_i = 0, _len = scripts.length; _i < _len; _i++) {
|
62
|
+
s = scripts[_i];
|
63
|
+
if (s.type === 'text/coffeescript') {
|
64
|
+
_results.push(s);
|
65
|
+
}
|
66
|
+
}
|
67
|
+
return _results;
|
68
|
+
})();
|
69
|
+
index = 0;
|
70
|
+
length = coffees.length;
|
71
|
+
(execute = function() {
|
72
|
+
var script;
|
73
|
+
script = coffees[index++];
|
74
|
+
if ((script != null ? script.type : void 0) === 'text/coffeescript') {
|
75
|
+
if (script.src) {
|
76
|
+
return CoffeeScript.load(script.src, execute);
|
77
|
+
} else {
|
78
|
+
CoffeeScript.run(script.innerHTML);
|
79
|
+
return execute();
|
80
|
+
}
|
81
|
+
}
|
82
|
+
})();
|
83
|
+
return null;
|
84
|
+
};
|
85
|
+
|
86
|
+
if (window.addEventListener) {
|
87
|
+
addEventListener('DOMContentLoaded', runScripts, false);
|
88
|
+
} else {
|
89
|
+
attachEvent('onload', runScripts);
|
90
|
+
}
|
91
|
+
|
92
|
+
}).call(this);
|