Skip to content
This repository has been archived by the owner on Dec 20, 2020. It is now read-only.

Commit

Permalink
Release v1.0.94
Browse files Browse the repository at this point in the history
  • Loading branch information
dhowe committed Jun 20, 2015
1 parent 236947a commit 6c4bce6
Show file tree
Hide file tree
Showing 6 changed files with 812 additions and 814 deletions.
12 changes: 6 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ gulp.task('lint', function() {
});

// Test(node): gulp test.node (all) || gulp test.node --name RiString
gulp.task('test.node.pkg', function(cb) {
/*gulp.task('test.node.pkg', function(cb) {
var testrunner = require("qunit");
Expand Down Expand Up @@ -293,10 +293,10 @@ gulp.task('test.node.pkg', function(cb) {
}, function(err, report) {
if (err) console.error(err);
});
});
});*/

// Test(node): gulp test.node (all) || gulp test.node --name RiString
gulp.task('test.node', function(cb) {
gulp.task('test', function(cb) {

var testrunner = require("qunit");

Expand Down Expand Up @@ -339,7 +339,7 @@ gulp.task('test.node', function(cb) {


// Test(phantom): gulp test (all) || gulp test --name RiString
gulp.task('test', function() {
gulp.task('test.phantom', function() {

var tests = [testDir + 'LibStructure-tests.html', testDir + '/Ri*.html'];

Expand All @@ -359,7 +359,7 @@ gulp.task('test', function() {
});


//gulp.task('node', [ 'clean','test.node','build.node','copy-node' ]);
//gulp.task('node', [ 'clean','test','build.node','copy-node' ]);

gulp.task('build', ['build.js']); // 'build.node' ]);
gulp.task('default', ['help']);
gulp.task('default', ['help']);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rita",
"version": "1.0.93",
"version": "1.0.94",
"author": "Daniel C. Howe <daniel@rednoise.org>",
"description": "RiTa: A toolkit for natural language and computational literature",
"homepage": "http://rednoise.org/rita",
Expand Down
12 changes: 5 additions & 7 deletions src/rita.js
Original file line number Diff line number Diff line change
Expand Up @@ -1585,14 +1585,13 @@

if (typeof _RiTa_DICT != 'undefined' && RiTa.USE_LEXICON) {

console.log('[RiTa] Loading lexicon data...');
//console.log('[RiTa] Loading lexicon data...');
//RiLexicon.data = _RiTa_DICT;

RiLexicon.data = _RiTa_DICT;

/*RiLexicon.data = {}; // changed 6/20/15 DCH
RiLexicon.data = {};
for (var word in _RiTa_DICT) {
RiLexicon.data[word] = _RiTa_DICT[word]; // needed?
}*/
}

} else {

Expand Down Expand Up @@ -6708,6 +6707,7 @@
window['RiMarkov'] = RiMarkov;
window['RiTaEvent'] = RiTaEvent;
window['RiWordNet'] = RiWordNet;

} else if (typeof module != 'undefined' && module.exports) { // for node

module.exports['RiTa'] = RiTa;
Expand All @@ -6722,6 +6722,4 @@

/*jshint +W069 */

RiTa.p5Compatible(false);

})(typeof window !== 'undefined' ? window : null);
33 changes: 13 additions & 20 deletions test/LibStructure-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
QUnit, RiTa, RiTaEvent, RiString, RiGrammar, RiMarkov, RiLexicon */

var runtests = function() {

QUnit.module("LibraryStructure", {
setup: function () {},
teardown: function () {}
});

// NOTE: Instances of RiText are not available on this page

test("Public Api Functions", function() {

if (QUnit.checkAPI) {

var pathToDocs = '../../RiTa/docs/json/';
QUnit.checkAPI('RiTaEvent', RiTaEvent, new RiTaEvent(this), pathToDocs);
QUnit.checkAPI('RiTa', RiTa, RiTa, pathToDocs);
Expand All @@ -23,7 +23,7 @@ var runtests = function() {
QUnit.checkAPI('RiLexicon', RiLexicon, RiLexicon(), pathToDocs);
}
else {

console.log("[TEST] Skipping checkAPI() for LibraryStructure (node-only)");
ok("Only check in Node");
}
Expand All @@ -46,10 +46,10 @@ var runtests = function() {
test("Private Statics (funs)", function() {

if (typeof window != 'undefined' && window) {

//equal(typeof RiText._handleLeading, 'function');
//equal(typeof RiText._disposeOne, 'function');

// these fail in phantom outside the conditional ??
equal(typeof is, 'undefined');
}
Expand All @@ -58,9 +58,9 @@ var runtests = function() {
equal(typeof _disposeOne, 'undefined');

});

test("Private Statics (vars)", function() {

equal(typeof _VERSION_, 'undefined');
equal(typeof RiTa._VERSION_, 'undefined');
equal(typeof timers, 'undefined');
Expand Down Expand Up @@ -91,14 +91,7 @@ var runtests = function() {

equal(typeof RiTa.splitSentences, 'function');
equal(typeof RiTa.getPhonemes, 'function');
equal(typeof RiTa.timer, 'function');
equal(typeof RiTa.random, 'function');

if (typeof window != 'undefined') {

//equal(typeof RiText.random, 'function');
//equal(typeof RiText.timer, 'function');
}
});

test("Public Constants", function() {
Expand Down Expand Up @@ -140,7 +133,7 @@ var runtests = function() {
equal(typeof RiString, 'function'); // pub
equal(typeof RiGrammar, 'function');
equal(typeof RiLexicon, 'function');

notEqual(typeof RiTa, 'function'); // prv

var rx = new RiString("hello");
Expand All @@ -150,13 +143,13 @@ var runtests = function() {
equal(typeof rx, 'object');

var lr = RiGrammar();
equal(typeof lr, 'object');
equal(typeof lr, 'object');

var lg = new RiGrammar();
equal(typeof lg, 'object');

if (typeof window != 'undefined') {

equal(typeof RiText, 'function');

}
Expand Down
Loading

0 comments on commit 6c4bce6

Please sign in to comment.