Permalink
Browse files

Fix typos/inconsistencies and trailing whitespace

  • Loading branch information...
orpheuslummis committed Feb 2, 2012
1 parent e34d2bf commit 16cae88f6b3d79832e591b8c0ce0611e1e9e0215
Showing with 43 additions and 47 deletions.
  1. +1 −1 Cakefile
  2. +2 −3 README.md
  3. +1 −1 bin/concrete
  4. +1 −1 lib/views/index.coffee
  5. +2 −2 lib/views/jobPartial.coffee
  6. +10 −10 lib/views/js/concrete.coffee
  7. +11 −11 lib/views/stylesheets/app.styl
  8. +1 −1 package.json
  9. +7 −10 src/git.coffee
  10. +3 −3 src/jobs.coffee
  11. +1 −1 src/logger.coffee
  12. +3 −3 src/server.coffee
View
@@ -1,6 +1,6 @@
{print} = require 'sys'
{spawn} = require 'child_process'
-task 'build', 'Compilie coffeescript files', (options)->
+task 'build', 'Compile CoffeeScript files', (options)->
options = ['-c', '-o', 'lib', 'src']
coffee = spawn 'coffee', options
coffee.stdout.on 'data', (data) -> print data.toString()
View
@@ -13,11 +13,11 @@ Concrete is a minimalistic Continuous Integration server.
## Usage
Usage: concrete [-hpv] path_to_git_repo
-
+
Options:
-h, --host The hostname or ip of the host to bind to [default: "0.0.0.0"]
-p, --port The port to listen on [default: 4567]
- --help Show this message
+ --help Show this message
-v, --version Show version
## Setting the test runner
@@ -31,4 +31,3 @@ After building Concrete will run `.git/hooks/build-failed` or `.git/hooks/build-
Concrete is **heavily** inspired by [CI Joe](https://github.com/defunkt/cijoe)
-
View
@@ -1,2 +1,2 @@
#!/usr/bin/env node
-module.exports = require('../lib/concrete')
+module.exports = require('../lib/concrete')
View
@@ -17,7 +17,7 @@ html ->
nav ->
form method: 'post', action: '/', ->
button '.build', -> 'Build'
-
+
div '#content', ->
ul '.jobs', ->
if @jobs.length is 0
@@ -1,5 +1,5 @@
li '.job', ->
- a href: "/job/#{@job._id.toString()}", ->
+ a href: "/job/#{@job._id.toString()}", ->
d = new Date(@job.addedTime)
div '.time', -> "#{d.toDateString()} #{d.toTimeString()}"
div '.job_id', -> "#{@job._id.toString()}"
@@ -8,4 +8,4 @@ li '.job', ->
div ".outcome#{outcomeClass}", ->
if @job.failed then '✘ failure' else '✓ success'
div '.job_container', ->
- @job.log
+ @job.log
@@ -1,13 +1,13 @@
-$(document).ready ->
- addClick = (job)->
+$(document).ready ->
+ addClick = (job)->
$(job).click (event)->
alreadyOpened = $(event.currentTarget).find('div.job_container').hasClass 'open'
closeAll()
if not alreadyOpened
$(event.currentTarget).find('div.job_container').slideDown 'fast'
$(event.currentTarget).find('div.job_container').addClass 'open'
return false
-
+
updateJob = (job)->
id = $(job).find('.job_id').first().html()
$.get "/job/#{id}", (data)->
@@ -21,42 +21,42 @@ $(document).ready ->
updateJob job
, 1000
, 'json'
-
+
outcomeTemplate = ->
outcomeClass = if @job.failed then '.failure' else '.success'
div ".outcome#{outcomeClass}", ->
if @job.failed then '✘ failure' else '✓ success'
-
+
jobTemplate = ->
li '.job', ->
- a href: "/job/#{@job._id.toString()}", ->
+ a href: "/job/#{@job._id.toString()}", ->
d = new Date(@job.addedTime)
div '.time', -> "#{d.toDateString()} #{d.toTimeString()}"
div '.job_id', -> "#{@job._id.toString()}"
img '.loader', src:'images/spinner.gif'
div '.job_container', ->
@job.log
-
+
closeAll = ->
opened = $('li.job').find 'div.job_container.open'
for container in opened
$(container).slideUp 'fast'
$(container).removeClass 'open'
-
+
$('button.build').click (event) ->
closeAll()
$('button.build').hide()
$('li.nojob').hide()
$.post '/', (data) ->
if $('ul.jobs').find('li.nojob').length > 0
- $('ul.jobs').find('li.nojob').first().remove()
+ $('ul.jobs').find('li.nojob').first().remove()
job = $('ul.jobs').prepend CoffeeKup.render jobTemplate, job: data
job = $(job).find('li').first()
addClick job
updateJob job
$(job).find('.job_container').click()
, 'json'
return false
-
+
$('li.job').each (iterator, job)->
addClick job
@@ -3,13 +3,13 @@
src url('../font/mensch-wf.eot?#iefix') format('embedded-opentype'), url('../font/mensch-wf.woff') format('woff'), url('../font/mensch-wf.ttf') format('truetype'), url('../font/mensch-wf.svg#MenschMenschRegular') format('svg')
font-weight normal
font-style normal
-
+
@font-face
font-family: 'MenschBold'
src url('../font/mensch-bold-wf.eot?#iefix') format('embedded-opentype'),url('../font/mensch-bold-wf.woff') format('woff'),url('../font/mensch-bold-wf.ttf') format('truetype'),url('../font/mensch-bold-wf.svg#MenschMenschBold') format('svg')
font-weight normal
font-style normal
-
+
center()
width 960px
margin 0 auto
@@ -20,7 +20,7 @@ body
#content
center()
-
+
header
center()
margin-top: 40px
@@ -72,38 +72,38 @@ li.job
border-top 1px solid #E6E6E6
text-decoration none
color #BBB
-
+
.job_id
float: left
font-size 16px
font-weight normal
color #666
-
+
.outcome
font 16px 'MenschRegular', sans-serif
float right
-
+
img.loader
float right
-
+
.time
font 13px 'Monaco', courier, 'courier new', monospace
float left
margin-right 20px
-
+
&:hover
background-color #EAEAEA
-
+
.job_container
display none
width 920px
padding 20px
background-color #333
font 13px 'Monaco', courier, 'courier new', monospace
color #777
-
+
span.output
color #DDD
-
+
nav
float right
View
@@ -13,7 +13,7 @@
"bin": {
"concrete": "./bin/concrete"
},
- "directories" : {
+ "directories" : {
"bin" : "./bin",
"lib" : "./lib"
},
View
@@ -13,18 +13,16 @@ git = module.exports =
config:
runner: 'concrete.runner'
branch: 'concrete.branch'
-
- # init at target directory
+
+ # init at target directory
init: (target, callback) ->
# save callback for after git is ready to go
readyCallback = callback
- # we're using node's path to
- # run directory level operations
+ # we're using node's path to run directory level operations
path = require 'path'
- # get the full path to the target and change
- # the process to that directory
+ # get the full path to target and change the process to that directory
if target.toString().charAt(0) isnt '/'
target = process.cwd()+'/'+target
process.chdir target
@@ -33,15 +31,15 @@ git = module.exports =
git.target = path.normalize target+'/.git/'
git.failure = path.normalize target+'/.git/hooks/build-failed'
git.success = path.normalize target+'/.git/hooks/build-worked'
-
+
# make sure the path exists and is a valid repo
path.exists git.target, (exists)->
if exists is no
console.log "'#{target}' is not a valid Git repo".red
process.exit 1
getBranch()
getRunner()
-
+
# pull from the git repo
pull: (next)->
# get the job list so we can queue jobs
@@ -83,8 +81,7 @@ getRunner = ->
git.runner = 'none' if git.runner is ''
gitContinue()
-# notify the user of any issue prior
-# to continuing the concrete operation
+# notify the user of any issue prior to continuing the concrete operation
gitContinue = ->
if git.branch is 'none'
git.branch = 'master'
View
@@ -39,15 +39,15 @@ jobs = module.exports =
clear: (next)->
db.dropCollection 'jobs', (error) ->
next() if next?
-
+
getLog: (id, next)->
db.collection 'jobs', (error, collection) ->
collection.findOne {_id: new ObjectID id}, (error, job) ->
if job?
next job.log
else
next "No job found with the id '#{id}'"
-
+
updateLog: (id, string, next)->
db.collection 'jobs', (error, collection) ->
collection.findOne {_id: new ObjectID id}, (error, job) ->
@@ -56,7 +56,7 @@ jobs = module.exports =
job.log += "#{string} <br />"
collection.save(job)
next() if next?
-
+
currentComplete: (success, next)->
db.collection 'jobs', (error, collection) ->
collection.findOne {_id: new ObjectID jobs.current}, (error, job) ->
View
@@ -1,4 +1,4 @@
Logger = module.exports = (currentStream)->
stream: currentStream ? ''
log: (args) ->
- @stream += "#{args}\n"
+ @stream += "#{args}\n"
View
@@ -15,8 +15,8 @@ app.configure ->
app.set 'view options', {
layout: false
}
-
- # This must be BEFORE other app.use
+
+ # this must be BEFORE other app.use
app.use stylus.middleware
debug: false
src: __dirname + '/views'
@@ -27,7 +27,7 @@ app.configure ->
coffeeDir = __dirname + '/views'
publicDir = __dirname + '/public'
app.use express.compiler src: coffeeDir, dest: publicDir, enable: ['coffeescript']
-
+
app.use express.logger()
app.use app.router
app.use express.static __dirname + '/public'

0 comments on commit 16cae88

Please sign in to comment.