Move all core files into src/core.

Move Browser & Node specs to test against lib/jasmine.js instead of the separate source. Yes, this makes development a little harder but it's better to test that jasmine.js was built correctly.
This commit is contained in:
Davis W. Frank 2011-06-05 21:28:26 -07:00
parent ba10d178b2
commit e88d88e427
24 changed files with 23 additions and 35 deletions

View File

@ -1,3 +1,16 @@
## Development
## Release
# Making a Release of Jasmine Core
'Jasmine' is the Github repo for Jasmine Core and contains all the JavaScript code for the Jasmine BDD framework.

View File

@ -1,6 +1,6 @@
def jasmine_sources
sources = ["src/base.js", "src/util.js", "src/Env.js", "src/Reporter.js", "src/Block.js"]
sources += Dir.glob('src/*.js').reject { |f| f == 'src/base.js' || sources.include?(f) }.sort
sources = ["src/core/base.js", "src/core/util.js", "src/core/Env.js", "src/core/Reporter.js", "src/core/Block.js"]
sources += Dir.glob('src/core/*.js').reject { |f| f == 'src/core/base.js' || sources.include?(f) }.sort
sources
end
@ -14,7 +14,7 @@ end
def version_hash
require 'json'
@version ||= JSON.parse(File.new("src/version.json").read);
@version ||= JSON.parse(File.new("src/core/version.json").read);
end
@ -28,7 +28,7 @@ end
task :default => :spec
desc "Run spec suite: Browser, Node, JSHint"
task :spec => ["spec:node", "spec:browser", "jasmine:hint"]
task :spec => ["jasmine:build", "spec:node", "spec:browser"]
namespace :spec do
desc 'Run specs in Node.js'

View File

@ -3,6 +3,7 @@ var sys = require("sys");
var path = require("path");
var JSHINT = require("./jshint").JSHINT;
// DWF TODO: Standardize this?
function isExcluded(fullPath) {
var fileName = path.basename(fullPath);
var excludeFiles = ["json2.js", "jshint.js", "publish.js", "node_suite.js", "jasmine.js", "jasmine-html.js"];

View File

@ -2468,5 +2468,5 @@ jasmine.version_= {
"major": 1,
"minor": 1,
"build": 0,
"revision": 1306942160
"revision": 1307334045
};

View File

@ -5,21 +5,12 @@ var path = require('path');
// yes, really keep this here to keep us honest, but only for jasmine's own runner! [xw]
// undefined = "diz be undefined yo";
var jasmineGlobals = require("../src/base");
var jasmineGlobals = require('../lib/jasmine.js');
for (var k in jasmineGlobals) {
global[k] = jasmineGlobals[k];
}
//load jasmine src files based on the order in runner.html
var srcFilesInProperRequireOrder = [];
var runnerHtmlLines = fs.readFileSync("spec/runner.html", "utf8").split("\n");
var srcFileLines = [];
for (var i = 0; i < runnerHtmlLines.length; i++)
if (runnerHtmlLines[i].match(/script(.*?)\/src\//))
srcFileLines.push(runnerHtmlLines[i]);
for (i = 0; i < srcFileLines.length; i++) srcFilesInProperRequireOrder.push(srcFileLines[i].match(/src=\"(.*?)\"/)[1]);
for (i = 0; i < srcFilesInProperRequireOrder.length; i++) require(srcFilesInProperRequireOrder[i]);
require('../src/console/TrivialConsoleReporter.js');
/*
Pulling in code from jasmine-node.

View File

@ -9,24 +9,7 @@
undefined = "diz be undefined yo";
</script>
<link rel="shortcut icon" type="image/png" href="../images/jasmine_favicon.png">
<script type="text/javascript" src="../src/base.js"></script>
<script type="text/javascript" src="../src/util.js"></script>
<script type="text/javascript" src="../src/Env.js"></script>
<script type="text/javascript" src="../src/Reporter.js"></script>
<script type="text/javascript" src="../src/Block.js"></script>
<script type="text/javascript" src="../src/JsApiReporter.js"></script>
<script type="text/javascript" src="../src/Matchers.js"></script>
<script type="text/javascript" src="../src/mock-timeout.js"></script>
<script type="text/javascript" src="../src/MultiReporter.js"></script>
<script type="text/javascript" src="../src/NestedResults.js"></script>
<script type="text/javascript" src="../src/PrettyPrinter.js"></script>
<script type="text/javascript" src="../src/Queue.js"></script>
<script type="text/javascript" src="../src/Runner.js"></script>
<script type="text/javascript" src="../src/Spec.js"></script>
<script type="text/javascript" src="../src/Suite.js"></script>
<script type="text/javascript" src="../src/WaitsBlock.js"></script>
<script type="text/javascript" src="../src/WaitsForBlock.js"></script>
<script type="text/javascript" src="../lib/jasmine.js"></script>
<script type="text/javascript" src="../src/html/TrivialReporter.js"></script>
<script type="text/javascript" src="../src/console/TrivialConsoleReporter.js"></script>