Permalink
Browse files

tests now passing with new structure

  • Loading branch information...
1 parent 2db1a54 commit a246972d9dbb9b3d4a2cb09a75f302e2009f19a6 @lancejpollard lancejpollard committed Aug 3, 2012
View
@@ -1,6 +1,8 @@
var path = require('path');
require('coffee-script');
+/*
if (path.existsSync('./lib/tower.js'))
module.exports = require('./lib/tower.js');
else
- module.exports = require('./src/tower.coffee');
+*/
+module.exports = require('./packages/tower.coffee');
@@ -1,3 +1,4 @@
+require './shared'
require './server/application'
require './server/assets'
require './server/watcher'
@@ -0,0 +1,30 @@
+require './shared'
+require './server/actions'
+require './server/caching'
+require './server/events'
+require './server/net'
+require './server/sockets'
+
+Tower.Controller.include Tower.Controller.Actions
+Tower.Controller.include Tower.Controller.Caching
+Tower.Controller.include Tower.Controller.Events
+Tower.Controller.include Tower.Controller.Net
+Tower.Controller.include Tower.Controller.Sockets
+
+Tower.Controller.reopenClass extended: ->
+ object = {}
+ name = @className()
+ camelName = _.camelize(name, true)
+
+ object[camelName] = Ember.computed(->
+ Tower.Application.instance()[name].create()
+ ).cacheable()
+
+ Tower.Net.Connection.controllers.push(camelName)
+
+ Tower.Net.Connection.reopen(object)
+
+ @
+
+require './server/renderers'
+require './shared/tst'
@@ -1,28 +0,0 @@
-require './controller/actions'
-require './controller/caching'
-require './controller/events'
-require './controller/net'
-require './controller/sockets'
-
-Tower.Controller.include Tower.Controller.Actions
-Tower.Controller.include Tower.Controller.Caching
-Tower.Controller.include Tower.Controller.Events
-Tower.Controller.include Tower.Controller.Net
-Tower.Controller.include Tower.Controller.Sockets
-
-Tower.Controller.reopenClass extended: ->
- object = {}
- name = @className()
- camelName = _.camelize(name, true)
-
- object[camelName] = Ember.computed(->
- Tower.Application.instance()[name].create()
- ).cacheable()
-
- Tower.Net.Connection.controllers.push(camelName)
-
- Tower.Net.Connection.reopen(object)
-
- @
-
-require './controller/renderers'
@@ -1,9 +1,9 @@
# @module
Tower.Middleware = {}
-require './middleware/agent'
-require './middleware/cookies'
-require './middleware/location'
-require './middleware/router'
+require './server/agent'
+require './server/cookies'
+require './server/location'
+require './server/router'
module.exports = Tower.Middleware
@@ -1,3 +1,4 @@
+require './shared'
require './server/connection'
require './server/connection/socketio'
require './server/connection/sockjs'
@@ -0,0 +1 @@
+require './shared'
@@ -32,23 +32,35 @@ Tower.modules =
sockjs: try require 'sockjs'
_: _
-require './support'
-require './application'
-require './server/application'
-require './store'
-require './server/store'
-require './model'
-require './server/model'
-require './view'
-require './controller'
-require './server/controller'
-require './controller/tst'
-require './net'
-require './server/net'
-require './server/mailer'
-require './middleware'
-require './server/command'
-require './server/generator'
+require '../tower-support/server'
+require '../tower-application/server'
+require '../tower-store/server'
+require '../tower-model/server'
+require '../tower-view/server'
+require '../tower-controller/server'
+require '../tower-net/server'
+require '../tower-mailer/server'
+require '../tower-middleware/server'
+require '../tower-command/server'
+require '../tower-generator/server'
+
+#require './support'
+#require './application'
+#require './server/application'
+#require './store'
+#require './server/store'
+#require './model'
+#require './server/model'
+#require './view'
+#require './controller'
+#require './server/controller'
+#require './controller/tst'
+#require './net'
+#require './server/net'
+#require './server/mailer'
+#require './middleware'
+#require './server/command'
+#require './server/generator'
Tower.watch = true
@@ -9,7 +9,7 @@ cakefileDestination = null
describe 'Tower.Generator.Actions', ->
beforeEach ->
try wrench.rmdirSyncRecursive("#{process.cwd()}/test/tmp", true)
- sourceRoot = process.cwd() + "/src/tower/server/generator/generators/tower/app"
+ sourceRoot = process.cwd() + "/packages/tower-generator/server/generators/tower/app"
destinationRoot = process.cwd() + "/test/tmp"
cakefileDestination = File.join(destinationRoot, "Cakefile")
fs.unlinkSync cakefileDestination if File.exists(cakefileDestination)
View
@@ -27,7 +27,7 @@ config = require(Tower.root + '/config/databases')
for key, value of config
delete config[key] unless key == store
-require '../src/tower/server/generator/tst'
+require '../packages/tower-generator/server/tst'
app = Tower.Application.instance()

0 comments on commit a246972

Please sign in to comment.