Skip to content

Commit

Permalink
extended target paths to be absolute
Browse files Browse the repository at this point in the history
  • Loading branch information
ryankee committed Sep 16, 2011
1 parent 2cd179a commit 0cbadf5
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion lib/concrete.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function() {
var argv, colors, git, optimist, startServer, usage, version;
process.title = 'Concrete';
version = '0.0.1';
version = '0.0.2';
colors = require('colors');
usage = 'Usage: concrete [-hpv] path_to_git_repo';
optimist = require('optimist');
Expand Down
6 changes: 4 additions & 2 deletions lib/git.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "concrete",
"version": "0.0.1",
"version": "0.0.2",
"description": "A minimalistic Continuous Integration server",
"author": "Ryan Kee <me@ryankee.com> (http://ryankee.com)",
"preferGlobal" : true,
Expand Down
4 changes: 2 additions & 2 deletions src/concrete.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process.title = 'Concrete'
version = '0.0.1'
version = '0.0.2'

# cli colors
colors = require 'colors'
Expand Down Expand Up @@ -52,4 +52,4 @@ startServer = ->

# check the path and start the git request
git = require '../lib/git'
git.init(argv._[0], startServer)
git.init(argv._[0], startServer)
5 changes: 3 additions & 2 deletions src/git.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ git = module.exports =
init: (target, callback) ->
readyCallback = callback
path = require 'path'
if target.toString().charAt(0) isnt '/'
target = process.cwd()+'/'+target
process.chdir target
git.target = path.normalize target+'/.git/'
git.failure = path.normalize target+'/.git/hooks/build-failed'
git.success = path.normalize target+'/.git/hooks/build-worked'
path.exists git.target, (exists)->
if exists is no
console.log "'#{target}' is not a valid Git repo".red
process.exit 1
process.chdir target
getBranch()
getRunner()

Expand All @@ -43,7 +45,6 @@ git = module.exports =
next()

getBranch = ->
console.log process.cwd()
exec 'git config --get ' + git.config.branch, (error, stdout, stderr)=>
if error?
git.branch = 'master'
Expand Down
8 changes: 1 addition & 7 deletions src/server.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,16 @@ app.configure ->
coffeeDir = __dirname + '/views'
publicDir = __dirname + '/public'
app.use express.compiler src: coffeeDir, dest: publicDir, enable: ['coffeescript']
# app.use express.static publicDir

app.use express.logger()
# app.use express.bodyParser()
# app.use express.methodOverride()
# app.use express.cookieParser()
# app.use express.session({secret:"concrete"})
app.use app.router
app.use express.static __dirname + '/public'
app.use express.static __dirname + '/public'

app.configure 'development', ->
app.use express.errorHandler dumpExceptions: on, showStack: on

app.configure 'production', ->
app.use express.errorHandler dumpExceptions: on, showStack: on
# app.use express.errorHandler()

app.get '/', (req, res) ->
jobs.getAll (jobs)->
Expand Down

0 comments on commit 0cbadf5

Please sign in to comment.