Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

tests now passing with new structure

  • Loading branch information...
commit a246972d9dbb9b3d4a2cb09a75f302e2009f19a6 1 parent 2db1a54
@lancejpollard lancejpollard authored
View
4 index.js
@@ -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');
View
1  packages/tower-application/server.coffee
@@ -1,3 +1,4 @@
+require './shared'
require './server/application'
require './server/assets'
require './server/watcher'
View
30 packages/tower-controller/server.coffee
@@ -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'
View
28 packages/tower-controller/server/controller.coffee
@@ -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'
View
8 packages/tower-middleware/server.coffee
@@ -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
View
1  packages/tower-net/server.coffee
@@ -1,3 +1,4 @@
+require './shared'
require './server/connection'
require './server/connection/socketio'
require './server/connection/sockjs'
View
1  packages/tower-support/server.coffee
@@ -0,0 +1 @@
+require './shared'
View
46 packages/tower/server.coffee
@@ -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
View
2  test/cases/server/generator/actionsTest.coffee
@@ -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
2  test/server.coffee
@@ -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()
Please sign in to comment.
Something went wrong with that request. Please try again.