Integrating Faye
#21: step.depends on pre-loaded scripts
fixed #22 - less.morph error
removed step.library
fixed comments in debug-watch-directories
Merge branch 'master' into wip
fixed #11 - added pubsub

* check in scratch for temporary tests
* depends.script_loader can be called run server side scripts and run
the resulting javascript on the browser.
* wrappers for faye - see server.coffee for examples
* watch scratch for a server restart also
* terminate server from a URL

# Using faye for pubsub.

# client:
# step(
#   () ->
#     @depends '/client/faye.coffee'
#   (error, faye) ->
#     faye.subscribe '/channel', (message) ->
#       console.log message.text
#     ...
#     faye.publish '/channel', text: 'Hello'
# )

# Same server:
# environment.faye.subscribe '/channel', (message) ->
#   console.log message.text
# ...
# environment.faye.publish '/channel', text: 'Hello'

# Different server:
# faye = require('faye')('http://localhost:9009/faye')
# faye.subscribe '/channel', (message) ->
#   console.log message.text
#   ...
# faye.publish '/channel', text: 'Hello'

See scratch/app.coffee and test-faye.server.coffee for a running
example, url = http://localhost:9009/scratch/index.html
Integrating Faye
fixed #11 - added pubsub

* check in scratch for temporary tests
* depends.script_loader can be called run server side scripts and run
the resulting javascript on the browser.
* wrappers for faye - see server.coffee for examples
* watch scratch for a server restart also
* terminate server from a URL

# Using faye for pubsub.

# client:
# step(
#   () ->
#     @depends '/client/faye.coffee'
#   (error, faye) ->
#     faye.subscribe '/channel', (message) ->
#       console.log message.text
#     ...
#     faye.publish '/channel', text: 'Hello'
# )

# Same server:
# environment.faye.subscribe '/channel', (message) ->
#   console.log message.text
# ...
# environment.faye.publish '/channel', text: 'Hello'

# Different server:
# faye = require('faye')('http://localhost:9009/faye')
# faye.subscribe '/channel', (message) ->
#   console.log message.text
#   ...
# faye.publish '/channel', text: 'Hello'

See scratch/app.coffee and test-faye.server.coffee for a running
example, url = http://localhost:9009/scratch/index.html
fixed #20 step implicitly loaded on client

* <script src=/client/depends.coffee> adds 2 methods to the global
name-space - depends and step.
* the real step is only loaded the first time it is to be used.
update template comment in debug-watch-directories
Merge branch 'refs/heads/wip'

Conflicts:
	client/depends.coffee
	scratch/app.coffee
sync master dammit

Signed-off-by: Paul Marrington <paul@marrington.net>
fixed #24 - moved most of scripts into modules

Signed-off-by: Paul Marrington <paul@marrington.net>
Merge branch 'refs/heads/paul'
fixed #26 - projects can now tweet the server before all reading for service

create /server/boot/project-init.coffee in project and add to:

module.exports =
  # called by server before creating and running server threads
  pre: (environment) ->
  # called by server after it is listening for incoming messages
  post: (environment) ->

Signed-off-by: Paul Marrington <paul@marrington.net>
Revert "fixed #26 - projects can now tweak the server before all reading for service"

This reverts commit b61690fbe6eee0a2037e83e0cc6f9ac1f8c9d607.

Signed-off-by: Paul Marrington <paul@marrington.net>
Merge branch 'refs/heads/paul'
fixed #26 - call project-init pre and post during server initialisation.

For server side programmers only (sorry Mark, that is not you any more. Writing code for a phone is as far from server side as you can be)

pull uSDLC-Node-Server master branch.
add file server/boot/project-init.coffee
template is:

module.exports =
  # call before anything is done to initialise the server
  pre: (environment) ->
  # call after server has started listening for connections
  post: (environment) ->

Signed-off-by: Paul Marrington <paul@marrington.net>
Merge remote-tracking branch 'upstream/master'