-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Owen Barnes
committed
Mar 11, 2012
1 parent
2e5691c
commit 3eeb233
Showing
64 changed files
with
1,775 additions
and
636 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Temporary code to update existing 0.3 alpha projects | ||
// REMOVE_BEFORE_0.3.0 | ||
|
||
require('colors'); | ||
|
||
var pathlib = require('path') | ||
, bar = "\n\n*************************************************************************\n\n".cyan; | ||
|
||
// Upgrade project to new directory format introduced in 0.3 alpha3 | ||
if (pathlib.existsSync('server/rpc/middleware')) { | ||
console.log(bar + | ||
"Thanks for upgrading to the latest SocketStream 0.3 alpha.\nWe've decided to move the following directories\n\n" + | ||
" /server/rpc/middleware to /server/middleware\n\n" + | ||
" /server/rpc/actions to /server/rpc\n\n" + | ||
"so that websocket middleware can be used by other websocket responders (including forthcoming models).\n" + | ||
"Please make this change to your existing project now then restart the server. Pasting this line into a UNIX-based shell should do the trick:\n\n" + | ||
" mv server/rpc/middleware server && mv server/rpc/actions/* server/rpc/ && rm -fr server/rpc/actions\n" + bar); | ||
throw new Error("Please paste the line above into the shell then restart the server"); | ||
} | ||
|
||
// Delete 'console.js' file if it exists (no longer needed from 0.3 alpha4) | ||
if (pathlib.existsSync('console.js')) require('fs').unlinkSync('console.js'); | ||
|
||
// Notify of changes to client code when upgrading to 0.3 alpha5 | ||
if (pathlib.existsSync('client/code/modules')) { | ||
console.log(bar + | ||
"Thanks for upgrading to the latest SocketStream 0.3 alpha.\n\n" + | ||
"We've made some major improvements to client-side code which will require\na few changes on your part. Please read:\n\n" + | ||
"https://github.com/socketstream/socketstream/blob/master/doc/guide/en/client_side_code.md\n\n".yellow + | ||
"then generate a new project to see the new format.\n\n" + | ||
"This message will go away when /client/code/modules has been renamed to\nsomething else (we suggest 'app') so we know you've upgraded your code" + bar); | ||
throw new Error("Please update your /client/code with the latest changes (see above)"); | ||
} |
Oops, something went wrong.
3eeb233
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I apologize in advance if this is in the wrong place to put this kind of stuff Owen, this is the first time I've used github and I'm not sure if this goes in the issues section or not!
I noticed you removed the windows-specific slash replacement
.replace(/\\/g, '/')
from several places and instead put it into magic_path.Unfortunately the assignment of
numRootFolders
in magic_path assumes the slash-replacement as been already done. This produces the wrong values ofnumRootFolders
so I get errors likeI inserted the slash-replacement before the assignment of
numRootFolder
like so to fix it.3eeb233
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Gary
Feel free to log an issue about things like this in future.
In this case David has already submitted a pull request and (hopefully) fixed the problem for you. Let me know if you're still having problems on Windows.
Cheers,
Owen
3eeb233
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Gary,
You've found the same spot in the code, and I think it's fixed now. Let me know if it works for you. I'm glad to see I'm not the only one developing on Windows.
Dave