Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add pretest to install rack

  • Loading branch information...
commit 66f2ad5f8f054e6bfc775777e0b436fa95eec5ed 1 parent 1751642
@josh josh authored
Showing with 13 additions and 3 deletions.
  1. +9 −0 Cakefile
  2. +4 −3 package.json
View
9 Cakefile
@@ -50,6 +50,15 @@ task 'build', 'Compile CoffeeScript source files', ->
task 'watch', 'Recompile CoffeeScript source files when modified', ->
build true
+task 'pretest', "Install test dependencies", ->
+ exec 'which ruby gem', (err) ->
+ throw "ruby not found" if err
+
+ exec 'ruby -rubygems -e \'require "rack"\'', (err) ->
+ if err
+ exec 'gem install rack', (err, stdout, stderr) ->
+ throw err if err
+
task 'test', 'Run the Pow test suite', ->
build ->
process.env["RUBYOPT"] = "-rubygems"
View
7 package.json
@@ -23,8 +23,9 @@
}
, "engines" : { "node" : ">=0.4.1" }
, "scripts": {
- "test": "cake test"
-, "start": "cake start"
-, "stop": "cake stop"
+ "pretest": "cake pretest"
+ , "test": "cake test"
+ , "start": "cake start"
+ , "stop": "cake stop"
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.