Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow '.' in pathname

  • Loading branch information...
commit 27d51fd213fbdb5538c7122018c2fa7907989b50 1 parent efd58a5
@joefiorini joefiorini authored
Showing with 9 additions and 2 deletions.
  1. +8 −1 lib/jobs.js
  2. +1 −1  src/jobs.coffee
View
9 lib/jobs.js
@@ -1,17 +1,24 @@
+// Generated by CoffeeScript 1.3.1
(function() {
var ObjectID, db, getJobs, jobs, mongo, path;
+
mongo = require('mongodb');
+
path = require('path');
- db = new mongo.Db("concrete_" + (path.basename(process.cwd())), new mongo.Server('localhost', mongo.Connection.DEFAULT_PORT, {
+
+ db = new mongo.Db("concrete_" + (path.basename(process.cwd()).replace(/\./, "-")), new mongo.Server('localhost', mongo.Connection.DEFAULT_PORT, {
auto_reconnect: true
}), {});
+
db.open(function(error) {
if (error) {
console.log('There was an error creating a connection with the Mongo database. Please check that MongoDB is properly installed and running.'.red);
return process.exit(1);
}
});
+
ObjectID = mongo.BSONPure.ObjectID;
+
jobs = module.exports = {
current: null,
addJob: function(next) {
View
2  src/jobs.coffee
@@ -1,6 +1,6 @@
mongo = require 'mongodb'
path = require 'path'
-db = new mongo.Db "concrete_#{path.basename process.cwd()}", new mongo.Server('localhost', mongo.Connection.DEFAULT_PORT, {auto_reconnect: true}), {}
+db = new mongo.Db "concrete_#{path.basename(process.cwd()).replace(/\./, "-")}", new mongo.Server('localhost', mongo.Connection.DEFAULT_PORT, {auto_reconnect: true}), {}
db.open (error) ->
if error
console.log 'There was an error creating a connection with the Mongo database. Please check that MongoDB is properly installed and running.'.red
Please sign in to comment.
Something went wrong with that request. Please try again.