-
-
Save tobi/162911 to your computer and use it in GitHub Desktop.
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
{ | |
version:343adbc323, | |
setup: '.................', | |
setup_errorcode: 0, | |
test: '.................', | |
test_errorcode: 0, | |
} |
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
{ | |
project: shopify, | |
version: 58dsag131, | |
setup: '.................', | |
setup_errorcode: 0, | |
test: '.................', | |
test_errorcode: 0, | |
} |
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
output_directory = ARGV[1] | |
class TestRunner | |
class Result < Struct.new(:setup, :test_output, :setup_errorcode, :test_errorcode) | |
end | |
def initialize(dir) | |
@dir = dir | |
end | |
def valid? | |
if File.stat(@dir, '.ci', 'setup').executable? | |
fail "#{name} .ci directory setup script missing or not executable" | |
end | |
if File.stat(@dir, '.ci', 'version').executable? | |
fail "#{name} .ci directory version script missing or not executable" | |
end | |
if File.stat(@dir, '.ci', 'run-tests').executable? | |
fail "#{name} .ci directory run-tests script missing or not executable" | |
end | |
end | |
def run_script | |
popen(...) | |
return output, $? | |
end | |
def invoke | |
if valid? | |
Dir.chdir(dir) do | |
results = Result.new | |
results.version = run_script('version') | |
results.setup, results.setup_errorcode = run_script('setup') | |
if results.setup_errorcode.zero? | |
results.output, results.test_errorcode = run_script('run-tests') | |
end | |
end | |
end | |
end | |
end | |
Dir['*'].each do |dir| | |
report = ReportAssembler.new | |
if File.directory?(dir) | |
report.tests.push TestRunner.new(dir).invoke | |
end | |
report.generate | |
end |
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
{ | |
project: shopify, | |
version:343adbc323, | |
setup: '.................', | |
setup_errorcode: 0, | |
test: '.................', | |
test_errorcode: 0, | |
} |
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
use http://json-template.googlecode.com/svn/trunk/doc/Introducing-JSON-Template.html | |
new Ajax('projects.json', onSuccess: function(t){ | |
var projects = eval(t.responseText) | |
projects.each(function(proj) { | |
$('projects').insert( new Element('div', proj, id: "project-" + proj)); | |
new Ajax(proj + '/current.json', onSuccess: function(t){ | |
var projects = eval(t.responseText) | |
}) | |
}) | |
}) | |
<div id="projects"> | |
</div> |
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
['shopify'] |
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
['58dsag131', '343adbc323'] |
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
git pull |
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
rake cruise |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment