Permalink
Browse files

docs, Cakefile

  • Loading branch information...
1 parent d6a59f2 commit cc02f7e4395f361464eb10e2f75ddfbae0b4b1ed @n1k0 committed Feb 1, 2012
Showing with 41 additions and 15 deletions.
  1. +10 −6 Cakefile
  2. +1 −1 docs/Fortune.html
  3. +1 −1 docs/config.html
  4. +1 −1 docs/errors.html
  5. +1 −1 docs/form.html
  6. +1 −1 docs/helpers-test.html
  7. +1 −1 docs/helpers.html
  8. +1 −1 docs/index.html
  9. +1 −1 docs/model.html
  10. +1 −1 docs/test.html
  11. +22 −0 docs/utils.html
View
@@ -80,7 +80,7 @@ exit = (status) ->
info = (message) -> log statuses.info, ansi.blue, message
load = (callback) ->
- connect -> Fortune.remove ->
+ Fortune.remove ->
processed = 0
info "loading fixtures…"
for ref, fortune of fortunes
@@ -120,8 +120,10 @@ setup = (env, callback) ->
test = (callback) ->
info "launching unit test suite…"
- options = ['--require', 'should']
- options = options.concat(utils.findFiles("src/test", matchFiles: /\.coffee$/, excludeDirs: ["casperjs"]))
+ testFiles = utils.findFiles "src/test",
+ matchFiles: /\.coffee$/
+ excludeDirs: ["casperjs"]
+ options = testFiles.concat ['--require', 'should']
command "./node_modules/.bin/mocha", options, (status) ->
if status is 0 then ok "unit test suite ok" else ko "unit test suite failed"
callback?(status)
@@ -137,17 +139,19 @@ task 'casper', 'Launches casperjs test suite', ->
setup 'test', -> build -> load -> casper (status) -> exit(1 if status)
task 'docs', 'Generate annotated source code with Docco', ->
- files = utils.findFiles("src", matchFiles: /\.coffee$/, excludeDirs: "views")
+ files = utils.findFiles "src",
+ matchFiles: /\.coffee$/
+ excludeDirs: "views"
setup -> command './node_modules/.bin/docco', files, (status) -> exit(1 if status)
task 'funk', 'Fantastic stuff', ->
- setup 'test', -> build -> load -> test -> casper (status) -> exit(1 if status)
+ setup 'test', -> build -> connect -> load -> test -> load -> casper (status) -> exit(1 if status)
task 'load', 'Load test fixtures', ->
setup -> load (err) -> exit(1 if err)
task 'test', 'Run test suite', ->
- setup 'test', -> build -> test (status) -> exit(1 if status)
+ setup 'test', -> build -> connect -> load -> test (status) -> exit(1 if status)
task 'server', 'Start server', ->
setup -> build -> server()
View
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <html> <head> <title>Fortune.coffee</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <div id="jump_to"> Jump To &hellip; <div id="jump_wrapper"> <div id="jump_page"> <a class="source" href="config.html"> config.coffee </a> <a class="source" href="index.html"> index.coffee </a> <a class="source" href="index.html"> index.coffee </a> <a class="source" href="errors.html"> errors.coffee </a> <a class="source" href="form.html"> form.coffee </a> <a class="source" href="helpers.html"> helpers.coffee </a> <a class="source" href="Fortune.html"> Fortune.coffee </a> <a class="source" href="index.html"> index.coffee </a> <a class="source" href="test.html"> test.coffee </a> <a class="source" href="helpers-test.html"> helpers-test.coffee </a> <a class="source" href="model.html"> model.coffee </a> </div> </div> </div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> Fortune.coffee </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">&#182;</a> </div> </td> <td class="code"> <div class="highlight"><pre><span class="nv">mongoose = </span><span class="nx">require</span> <span class="s2">&quot;mongoose&quot;</span>
+<!DOCTYPE html> <html> <head> <title>Fortune.coffee</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <div id="jump_to"> Jump To &hellip; <div id="jump_wrapper"> <div id="jump_page"> <a class="source" href="config.html"> config.coffee </a> <a class="source" href="index.html"> index.coffee </a> <a class="source" href="index.html"> index.coffee </a> <a class="source" href="errors.html"> errors.coffee </a> <a class="source" href="form.html"> form.coffee </a> <a class="source" href="helpers.html"> helpers.coffee </a> <a class="source" href="utils.html"> utils.coffee </a> <a class="source" href="Fortune.html"> Fortune.coffee </a> <a class="source" href="index.html"> index.coffee </a> <a class="source" href="test.html"> test.coffee </a> <a class="source" href="helpers-test.html"> helpers-test.coffee </a> <a class="source" href="model.html"> model.coffee </a> </div> </div> </div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> Fortune.coffee </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">&#182;</a> </div> </td> <td class="code"> <div class="highlight"><pre><span class="nv">mongoose = </span><span class="nx">require</span> <span class="s2">&quot;mongoose&quot;</span>
<span class="p">{</span><span class="nx">slugify</span><span class="p">}</span> <span class="o">=</span> <span class="nx">require</span> <span class="s2">&quot;../lib/helpers&quot;</span>
<span class="nv">Fortune = </span><span class="k">new</span> <span class="nx">mongoose</span><span class="p">.</span><span class="nx">Schema</span>
View
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <html> <head> <title>config.coffee</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <div id="jump_to"> Jump To &hellip; <div id="jump_wrapper"> <div id="jump_page"> <a class="source" href="config.html"> config.coffee </a> <a class="source" href="index.html"> index.coffee </a> <a class="source" href="index.html"> index.coffee </a> <a class="source" href="errors.html"> errors.coffee </a> <a class="source" href="form.html"> form.coffee </a> <a class="source" href="helpers.html"> helpers.coffee </a> <a class="source" href="Fortune.html"> Fortune.coffee </a> <a class="source" href="index.html"> index.coffee </a> <a class="source" href="test.html"> test.coffee </a> <a class="source" href="helpers-test.html"> helpers-test.coffee </a> <a class="source" href="model.html"> model.coffee </a> </div> </div> </div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> config.coffee </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">&#182;</a> </div> </td> <td class="code"> <div class="highlight"><pre><span class="nv">module.exports =</span>
+<!DOCTYPE html> <html> <head> <title>config.coffee</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <div id="jump_to"> Jump To &hellip; <div id="jump_wrapper"> <div id="jump_page"> <a class="source" href="config.html"> config.coffee </a> <a class="source" href="index.html"> index.coffee </a> <a class="source" href="index.html"> index.coffee </a> <a class="source" href="errors.html"> errors.coffee </a> <a class="source" href="form.html"> form.coffee </a> <a class="source" href="helpers.html"> helpers.coffee </a> <a class="source" href="utils.html"> utils.coffee </a> <a class="source" href="Fortune.html"> Fortune.coffee </a> <a class="source" href="index.html"> index.coffee </a> <a class="source" href="test.html"> test.coffee </a> <a class="source" href="helpers-test.html"> helpers-test.coffee </a> <a class="source" href="model.html"> model.coffee </a> </div> </div> </div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> config.coffee </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">&#182;</a> </div> </td> <td class="code"> <div class="highlight"><pre><span class="nv">module.exports =</span>
<span class="nv">production:</span>
<span class="nv">mongo:</span>
<span class="nv">uri: </span><span class="s2">&quot;mongodb://localhost/nodetunes&quot;</span>
View
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <html> <head> <title>errors.coffee</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <div id="jump_to"> Jump To &hellip; <div id="jump_wrapper"> <div id="jump_page"> <a class="source" href="config.html"> config.coffee </a> <a class="source" href="index.html"> index.coffee </a> <a class="source" href="index.html"> index.coffee </a> <a class="source" href="errors.html"> errors.coffee </a> <a class="source" href="form.html"> form.coffee </a> <a class="source" href="helpers.html"> helpers.coffee </a> <a class="source" href="Fortune.html"> Fortune.coffee </a> <a class="source" href="index.html"> index.coffee </a> <a class="source" href="test.html"> test.coffee </a> <a class="source" href="helpers-test.html"> helpers-test.coffee </a> <a class="source" href="model.html"> model.coffee </a> </div> </div> </div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> errors.coffee </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">&#182;</a> </div> </td> <td class="code"> <div class="highlight"><pre><span class="nv">exports.NotFound = </span><span class="k">class</span> <span class="k">extends</span> <span class="nb">Error</span>
+<!DOCTYPE html> <html> <head> <title>errors.coffee</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <div id="jump_to"> Jump To &hellip; <div id="jump_wrapper"> <div id="jump_page"> <a class="source" href="config.html"> config.coffee </a> <a class="source" href="index.html"> index.coffee </a> <a class="source" href="index.html"> index.coffee </a> <a class="source" href="errors.html"> errors.coffee </a> <a class="source" href="form.html"> form.coffee </a> <a class="source" href="helpers.html"> helpers.coffee </a> <a class="source" href="utils.html"> utils.coffee </a> <a class="source" href="Fortune.html"> Fortune.coffee </a> <a class="source" href="index.html"> index.coffee </a> <a class="source" href="test.html"> test.coffee </a> <a class="source" href="helpers-test.html"> helpers-test.coffee </a> <a class="source" href="model.html"> model.coffee </a> </div> </div> </div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> errors.coffee </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">&#182;</a> </div> </td> <td class="code"> <div class="highlight"><pre><span class="nv">exports.NotFound = </span><span class="k">class</span> <span class="k">extends</span> <span class="nb">Error</span>
<span class="nv">name: </span><span class="s2">&quot;NotFound&quot;</span>
<span class="nv">constructor: </span><span class="nf">(@message) -&gt;</span>
<span class="nb">Error</span><span class="p">.</span><span class="nx">call</span> <span class="err">@</span><span class="p">,</span> <span class="nx">@message</span>
Oops, something went wrong.

0 comments on commit cc02f7e

Please sign in to comment.