Permalink
Browse files

Merge pull request #2 from shift/master

Might be of some use
  • Loading branch information...
2 parents 161779b + 3c23d29 commit dabb4261f586a3f79f6c1323437c68b370b1a626 @kristianmandrup committed Apr 27, 2012
Showing with 30 additions and 24 deletions.
  1. +5 −5 Cakefile
  2. +3 −2 Gemfile
  3. +7 −3 package.json
  4. +1 −1 readme.md
  5. +3 −4 spec/coffee/config.coffee
  6. +8 −6 src/beer_can.coffee
  7. +3 −3 src/beer_can/tower.coffee
View
@@ -11,10 +11,10 @@ fs = require 'fs'
{spawn, exec} = require 'child_process'
# ANSI Terminal Colors
-bold = '\033[0;1m'
-green = '\033[0;32m'
-reset = '\033[0m'
-red = '\033[0;31m'
+bold = "BOLD"
+green = "GREEN"
+reset = "RESET"
+red = "RED"
# Internal Functions
#
@@ -143,4 +143,4 @@ task 'watch', 'compile and watch', -> build true, -> log ":-)", green
# ```
# cake test
# ```
-task 'test', 'run tests', -> build -> mocha -> log ":)", green
+task 'test', 'run tests', -> build -> mocha -> log ":)", green
View
@@ -1,8 +1,9 @@
source :rubygems
group :test, :development do
- gem 'jasmine-node'
+ gem 'rake'
+ gem 'jasmine'
gem 'guard-coffeescript'
gem 'jasmine-headless-webkit', :git => 'git://github.com/johnbintz/jasmine-headless-webkit.git'
gem 'guard-jasmine-headless-webkit'
-end
+end
View
@@ -46,9 +46,13 @@
"devDependencies": {
"coffee-script": ">= 1.2.0",
"jasmine-node": ">= 1.0",
- "mocha": ">= 0.8.1"
+ "mocha": ">= 0.8.1",
+ "pathfinder": ">= 0.3.0-1",
+ "chai": ">= 0.5.3",
+ "sinon": ">= 1.3.4",
+ "async": ">= 0.1.18"
},
"scripts": {
- "test": "mocha $(find spec/coffee -name \"*spec.coffee\") -r coffee-script $@"
+ "test": "mocha spec/coffee/config.coffee $(find spec/coffee -name "*spec.coffee") -r coffee-script $@"
}
-}
+}
View
@@ -15,7 +15,7 @@ See http://watirmelon.com/2012/01/23/writing-a-coffeescript-web-application-usin
Modify Jasmine configuration...
-There’s a rake task called ‘jasmine’ which you can run to launch a jasmine server locally on port 8888. Then go to that pahe `http://localhost:8888` to see the results of the test.
+There’s a rake task called ‘jasmine’ which you can run to launch a jasmine server locally on port 8888. Then go to that page `http://localhost:8888` to see the results of the test.
## Current status
@@ -1,6 +1,7 @@
-require '../,,/lib/beer_can'
+require 'tower'
+require '../../lib/beer_can'
+
File = require('pathfinder').File
-# require './secrets'
global.chai = require 'chai'
global.assert = chai.assert
@@ -10,6 +11,4 @@ global.sinon = require 'sinon'
global.async = require 'async'
global.cb = true
-# Tower.root = process.cwd() + "/test/test-app"
-# Tower.publicPath = Tower.root + "/public"
Tower.env = "test"
View
@@ -5,6 +5,14 @@ Array::remove = (e) -> @splice(t, 1)[0] if (t = @indexOf(e)) > -1
# top level namespace
BeerCan = {}
+class BeerCan.RuleResult extends Boolean
+ byThe: (relation) ->
+ # ...
+ byAny: (models) ->
+ # ...
+
+module.exports = global.BeerCan = BeerCan = {};
+
require './beer_can/rule'
require './beer_can/ability'
require './beer_can/api'
@@ -13,10 +21,4 @@ require './beer_can/model_mixin'
require './beer_can/tower' if Tower?
-class BeerCan.RuleResult extends Boolean
- byThe: (relation) ->
- # ...
- byAny: (models) ->
- # ...
-module.exports = BeerCan
@@ -1,3 +1,3 @@
-require('.tower/controller')
-require('.tower/model')
-require('.tower/view')
+require('./tower/controller')
+require('./tower/model')
+require('./tower/view')

0 comments on commit dabb426

Please sign in to comment.