Skip to content
Browse files

Fixed several issues found on the templates and tasks related to Coff…

…ee-Script.
  • Loading branch information...
1 parent abb22c0 commit 99414464652ddd34b448b75f8533f9500e672343 @mr-rock mr-rock committed Jan 25, 2012
Showing with 22 additions and 23 deletions.
  1. +7 −7 .lemmy/templates
  2. +15 −16 Makefile
View
14 .lemmy/templates
@@ -93,10 +93,10 @@ TESTMODULE_JS += "\n\n\tdescribe('\#example', function() {\
ifeq "$(APP)" ""
TESTMODULE_CS = "describe '$(NAME)', ->\
-\n\tvar $(NAME_CAMELIZED) = require '../../$(SOURCE_DIRECTORY)/$(MODULES_DIRECTORY)/$(NAME_CAMELIZED)'"
+\n\t$(NAME_CAMELIZED) = require '../../$(SOURCE_DIRECTORY)/$(MODULES_DIRECTORY)/$(NAME_CAMELIZED)'"
else
TESTMODULE_CS = "describe '$(APP) > $(NAME)', ->\
-\n\tvar $(NAME_CAMELIZED) = require '../../../../$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(MODULES_DIRECTORY)/$(NAME_CAMELIZED)'"
+\n\t$(NAME_CAMELIZED) = require '../../../../$(SOURCE_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(MODULES_DIRECTORY)/$(NAME_CAMELIZED)'"
endif
TESTMODULE_CS += "\n\n\tdescribe '\#example', ->\
@@ -160,7 +160,7 @@ TESTMIDDLEWARE_CS = "describe '$(NAME)', ->\
\n\t$(NAME_FUNCTIONALIZED) = require '../../$(SOURCE_DIRECTORY)/$(MIDDLEWARES_DIRECTORY)/$(NAME_CAMELIZED)'"
else
TESTMIDDLEWARE_CS = "describe '$(APP) > $(NAME)', ->\
-\n\t$(NAME_FUNCTIONALIZED) = require '../../../../$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(MIDDLEWARES_DIRECTORY)/$(NAME_CAMELIZED)'"
+\n\t$(NAME_FUNCTIONALIZED) = require '../../../../$(SOURCE_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(MIDDLEWARES_DIRECTORY)/$(NAME_CAMELIZED)'"
endif
TESTMIDDLEWARE_CS += "\n\tapp = require('express').createServer()\
@@ -378,7 +378,7 @@ else
TESTROUTE_CS = "describe '$(APP) > $(NAME)', ->\
\n\tapp = require('express').createServer()\
\n\thttp = require 'http'\
-\n\n\trequire('../../../../$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SOURCE_DIRECTORY)/$(ROUTES_DIRECTORY)/$(NAME_CAMELIZED)')(app)"
+\n\n\trequire('../../../../$(SOURCE_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(ROUTES_DIRECTORY)/$(NAME_CAMELIZED)')(app)"
endif
TESTROUTE_CS += "\n\n\tapp.listen 3000\
@@ -594,7 +594,7 @@ TESTCONTROLLER_CS = "describe '$(NAME)', ->\
\n\t$(NAME) = require '../../$(SOURCE_DIRECTORY)/$(CONTROLLERS_DIRECTORY)/$(NAME_CAMELIZED)'"
else
TESTCONTROLLER_CS = "describe '$(APP) > $(NAME)', ->\
-\n\t$(NAME) = require '../../../../$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SOURCE_DIRECTORY)/$(CONTROLLERS_DIRECTORY)/$(NAME_CAMELIZED)'"
+\n\t$(NAME) = require '../../../../$(SOURCE_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)//$(CONTROLLERS_DIRECTORY)/$(NAME_CAMELIZED)'"
endif
TESTCONTROLLER_CS += "\n\tcontroller = new $(NAME)()\
@@ -692,10 +692,10 @@ TESTMODEL_CS = "describe '$(NAME)', ->\
\n\t$(NAME) = require '../../$(SOURCE_DIRECTORY)/$(MODELS_DIRECTORY)/$(NAME_CAMELIZED)'"
else
TESTMODEL_CS = "describe '$(APP) > $(NAME)', ->\
-\n\t$(NAME) = require '../../../../$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SOURCE_DIRECTORY)/$(MODELS_DIRECTORY)/$(NAME_CAMELIZED)'"
+\n\t$(NAME) = require '../../../../$(SOURCE_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(MODELS_DIRECTORY)/$(NAME_CAMELIZED)'"
endif
-TESTMODEL_CS = "\n\tinstance = new $(NAME)()\
+TESTMODEL_CS += "\n\tinstance = new $(NAME)()\
\n\n\tdescribe '\#counter', ->\
\n\t\tit 'should not exist', ->\
\n\t\t\tinstance.should.not.have.property 'counter'\
View
31 Makefile
@@ -109,10 +109,10 @@ endif
else
ifeq "$(APP_LANGUAGE)" "CS"
module:
- @if [ -d "$(APPS_DIRECTORY)/$(APP_CAMELIZED)" ]; \
+ @if [ -d "$(SOURCE_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)" ]; \
then \
- mkdir -p $(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SOURCE_DIRECTORY)/$(MODULES_DIRECTORY); \
- echo $(MODULE_CS) > $(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SOURCE_DIRECTORY)/$(MODULES_DIRECTORY)/$(NAME_CAMELIZED).coffee; \
+ mkdir -p $(SOURCE_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(MODULES_DIRECTORY); \
+ echo $(MODULE_CS) > $(SOURCE_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(MODULES_DIRECTORY)/$(NAME_CAMELIZED).coffee; \
mkdir -p $(TESTING_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(MODULES_DIRECTORY); \
echo $(TESTMODULE_CS) > $(TESTING_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(MODULES_DIRECTORY)/$(NAME_CAMELIZED)-test.coffee; \
else \
@@ -155,10 +155,10 @@ endif
else
ifeq "$(APP_LANGUAGE)" "CS"
middleware:
- @if [ -d "$(APPS_DIRECTORY)/$(APP_CAMELIZED)" ]; \
+ @if [ -d "$(SOURCE_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)" ]; \
then \
- mkdir -p $(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SOURCE_DIRECTORY)/$(MIDDLEWARES_DIRECTORY); \
- echo $(MIDDLEWARE_CS) > $(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SOURCE_DIRECTORY)/$(MIDDLEWARES_DIRECTORY)/$(NAME_CAMELIZED).coffee; \
+ mkdir -p $(SOURCE_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(MIDDLEWARES_DIRECTORY); \
+ echo $(MIDDLEWARE_CS) > $(SOURCE_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(MIDDLEWARES_DIRECTORY)/$(NAME_CAMELIZED).coffee; \
mkdir -p $(TESTING_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(MIDDLEWARES_DIRECTORY); \
echo $(TESTMIDDLEWARE_CS) > $(TESTING_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(MIDDLEWARES_DIRECTORY)/$(NAME_CAMELIZED)-test.coffee; \
else \
@@ -201,10 +201,10 @@ endif
else
ifeq "$(APP_LANGUAGE)" "CS"
route:
- @if [ -d "$(APPS_DIRECTORY)/$(APP_CAMELIZED)" ]; \
+ @if [ -d "$(SOURCE_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)" ]; \
then \
- mkdir -p $(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SOURCE_DIRECTORY)/$(ROUTES_DIRECTORY); \
- echo $(ROUTE_CS) > $(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SOURCE_DIRECTORY)/$(ROUTES_DIRECTORY)/$(NAME_CAMELIZED).coffee; \
+ mkdir -p $(SOURCE_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(ROUTES_DIRECTORY); \
+ echo $(ROUTE_CS) > $(SOURCE_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(ROUTES_DIRECTORY)/$(NAME_CAMELIZED).coffee; \
mkdir -p $(TESTING_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(ROUTES_DIRECTORY); \
echo $(TESTROUTE_CS) > $(TESTING_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(ROUTES_DIRECTORY)/$(NAME_CAMELIZED)-test.coffee; \
else \
@@ -247,10 +247,10 @@ endif
else
ifeq "$(APP_LANGUAGE)" "CS"
controller:
- @if [ -d "$(APPS_DIRECTORY)/$(APP_CAMELIZED)" ]; \
+ @if [ -d "$(SOURCE_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)" ]; \
then \
- mkdir -p $(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SOURCE_DIRECTORY)/$(CONTROLLERS_DIRECTORY); \
- echo $(CONTROLLER_CS) > $(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SOURCE_DIRECTORY)/$(CONTROLLERS_DIRECTORY)/$(NAME_CAMELIZED).coffee; \
+ mkdir -p $(SOURCE_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(CONTROLLERS_DIRECTORY); \
+ echo $(CONTROLLER_CS) > $(SOURCE_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(CONTROLLERS_DIRECTORY)/$(NAME_CAMELIZED).coffee; \
mkdir -p $(TESTING_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(CONTROLLERS_DIRECTORY); \
echo $(TESTCONTROLLER_CS) > $(TESTING_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(CONTROLLERS_DIRECTORY)/$(NAME_CAMELIZED)-test.coffee; \
else \
@@ -293,10 +293,10 @@ endif
else
ifeq "$(APP_LANGUAGE)" "CS"
model:
- @if [ -d "$(APPS_DIRECTORY)/$(APP_CAMELIZED)" ]; \
+ @if [ -d "$(SOURCE_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)" ]; \
then \
- mkdir -p $(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SOURCE_DIRECTORY)/$(MODELS_DIRECTORY); \
- echo $(MODEL_CS) > $(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SOURCE_DIRECTORY)/$(MODELS_DIRECTORY)/$(NAME_CAMELIZED).coffee; \
+ mkdir -p $(SOURCE_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(MODELS_DIRECTORY); \
+ echo $(MODEL_CS) > $(SOURCE_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(MODELS_DIRECTORY)/$(NAME_CAMELIZED).coffee; \
mkdir -p $(TESTING_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(MODELS_DIRECTORY); \
echo $(TESTMODEL_CS) > $(TESTING_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(MODELS_DIRECTORY)/$(NAME_CAMELIZED)-test.coffee; \
else \
@@ -344,7 +344,6 @@ test:
--ui $(TEST_INTERFACE) \
--slow $(TEST_THRESHOLD) \
--colors \
- --watch \
$(TEST_FILES_CS)
else
test:

0 comments on commit 9941446

Please sign in to comment.
Something went wrong with that request. Please try again.