Skip to content

Commit

Permalink
Merge branch 'release/0.11.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
crucialfelix committed Jun 27, 2016
2 parents d29058b + b5ac58c commit 1c72eec
Show file tree
Hide file tree
Showing 16 changed files with 435 additions and 313 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
supercollider.js
================

[![npm version](https://badge.fury.io/js/supercolliderjs.svg)](http://badge.fury.io/js/supercolliderjs) [![Build Status](https://travis-ci.org/crucialfelix/supercolliderjs.svg?branch=master)](https://travis-ci.org/crucialfelix/supercolliderjs) [![Dependency Status](https://david-dm.org/crucialfelix/supercolliderjs.svg)](https://david-dm.org/crucialfelix/supercolliderjs) [![devDependency Status](https://david-dm.org/crucialfelix/supercolliderjs/dev-status.svg)](https://david-dm.org/crucialfelix/supercolliderjs#info=devDependencies)

[![Build Status][travis-image]][travis-url] [![NPM downloads][npm-downloads-image]][npm-url] [![MIT License][license-image]][license-url] [![Dependency Status](https://david-dm.org/crucialfelix/supercolliderjs.svg)](https://david-dm.org/crucialfelix/supercolliderjs) [![devDependency Status](https://david-dm.org/crucialfelix/supercolliderjs/dev-status.svg)](https://david-dm.org/crucialfelix/supercolliderjs#info=devDependencies)

Node.js tools for working with the SuperCollider language and synthesis server.

Expand All @@ -28,9 +27,9 @@ Features

- Start SuperCollider synthesis servers (scsynth)
- Send and receive OSC messages to scsynth
- Call async commands on scsynth and receive results
- Call async commands on scsynth and receive results as Promises
- Comprehensive library for calling all commands the server understands
- Node-id/Bus/Buffer allocators
- Node-id/Bus/Buffer allocators with clean immutable state implementation
- Server state and synth/group tracking

- Dryadic: declarative DSL for managing component trees. Documentation coming in 0.11.0
Expand Down Expand Up @@ -101,3 +100,13 @@ License
-------

The project is licensed under the MIT license.

[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: LICENSE

[npm-url]: https://npmjs.org/package/supercolliderjs
[npm-version-image]: http://img.shields.io/npm/v/supercolliderjs.svg?style=flat
[npm-downloads-image]: http://img.shields.io/npm/dm/supercolliderjs.svg?style=flat

[travis-url]: http://travis-ci.org/crucialfelix/supercolliderjs
[travis-image]: https://travis-ci.org/crucialfelix/supercolliderjs.svg?branch=master
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "supercolliderjs",
"description": "Tools for working with the SuperCollider music language environment",
"version": "0.11.0",
"version": "0.11.1",
"author": "Chris Sattinger <[email protected]>",
"contributors": [
{
Expand All @@ -10,29 +10,29 @@
}
],
"dependencies": {
"bluebird": "^3.3.5",
"bluebird": "^3.4.1",
"chalk": "^1.1.3",
"commander": "^2.9.0",
"dryadic": "^0.2.0",
"immutable": "^3.8.1",
"js-yaml": "^3.6.0",
"js-yaml": "^3.6.1",
"ncp": "^2.0.0",
"node-uuid": "^1.4.7",
"osc-min": "^1.1.1",
"rx": "^4.1.0",
"temp": "~0.8.3",
"underscore": "^1.8.3",
"untildify": "^2.1.0"
"untildify": "^3.0.2"
},
"devDependencies": {
"babel": "^6.2.4",
"babel-cli": "^6.7.7",
"babel-jest": "^12.0.1",
"babel-preset-es2015": "^6.6.0",
"babel-cli": "^6.10.1",
"babel-jest": "^12.1.0",
"babel-preset-es2015": "^6.9.0",
"baconjs": "^0.7.84",
"eslint": "^2.7.0",
"jest-cli": "^12.0.1",
"jscs": "^3.0.3"
"eslint": "^2.13.0",
"jest-cli": "^12.1.1",
"jscs": "^3.0.4"
},
"license": "MIT",
"keywords": [
Expand All @@ -59,7 +59,7 @@
"jsstyle": "jscs src bin examples/*.js",
"compile": "babel --source-maps --out-dir=./lib src",
"watch": "babel --watch --source-maps --out-dir=./lib src",
"copy": "cp src/server/*.json lib/server/ && cp -R src/sc-classes lib/",
"copy": "cp src/server/*.json lib/server/ && cp -R src/supercollider-js lib/",
"docs": "esdoc -c esdoc.json",
"build": "npm run compile && npm run copy",
"prepublish": "npm run build",
Expand Down
14 changes: 8 additions & 6 deletions src/lang/__tests__/sclang-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ describe('sclang', function() {

describe('sclangConfigOptions', function() {

it('should include sc-classes', function() {
it('should include supercollider-js', function() {
var sclang = new SCLang();
var opts = sclang.sclangConfigOptions();
expect(opts.includePaths.length).toEqual(1);
var isIn = _.some(opts.includePaths, function(p) {
// and that directory should really exist
return p.match(/sc\-classes/) && fs.existsSync(p);
return p.match(/supercollider\-js/) && fs.existsSync(p);
});
expect(isIn).toBeTruthy();
});
Expand All @@ -51,7 +51,7 @@ describe('sclang', function() {
var opts = sclang.sclangConfigOptions({
sclang_conf: path.join(__dirname, 'fixtures', 'sclang_test_conf.yaml')
});
// as well as sc-classes
// as well as supercollider-js
expect(opts.includePaths.length).toEqual(2 + 1);
expect(opts.excludePaths.length).toEqual(1);
});
Expand Down Expand Up @@ -104,11 +104,11 @@ describe('sclang', function() {
});

describe('sclangConfigOptions', function() {
it('should include sc-classes', function() {
it('should include supercollider-js', function() {
var sclang = new SCLang();
var config = sclang.sclangConfigOptions();
expect(config.includePaths.length).toEqual(1);
expect(config.includePaths[0].match(/sc-classes/)).toBeTruthy();
expect(config.includePaths[0].match(/supercollider-js/)).toBeTruthy();
});

it('postInlineWarning should not be undefined', function() {
Expand Down Expand Up @@ -165,7 +165,9 @@ describe('sclang', function() {
// mock spawn to return an event emitter
it('should spawnProcess', function() {
var sclang = new SCLang();
spyOn(sclang, '_spawnProcess');
spyOn(sclang, '_spawnProcess').and.returnValue({
pid: 1
});
spyOn(sclang, 'installListeners');
var promise = sclang.spawnProcess('/tmp/fake/path', {});
expect(promise).toBeTruthy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ empty
compiling class library...
NumPrimitives = 710
compiling dir: '/Users/crucial/code/supercollider/build/Install/SuperCollider/SuperCollider.app/Contents/Resources/SCClassLibrary'
compiling dir: '/Users/crucial/github/atom-supercollider/node_modules/supercolliderjs/lib/sc-classes'
compiling dir: '/Users/crucial/github/atom-supercollider/node_modules/supercolliderjs/lib/supercollider-js'
compiling dir: '/Users/crucial/Library/Application Support/SuperCollider/downloaded-quarks/Steno'
pass 1 done
numentries = 819694 / 11593660 = 0.071
Expand Down
18 changes: 9 additions & 9 deletions src/lang/internals/__tests__/sclang-io-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,18 @@ describe('sclang-io', function() {
io.setState(STATES.BOOTING);
feedIt('io-duplicate-class.txt', io);
expect(io.state).toEqual(STATES.COMPILE_ERROR);
expect(io.compileErrors).toBeDefined();
expect(io.compileErrors.duplicateClasses).toBeDefined();
expect(io.compileErrors.duplicateClasses.length).toEqual(1);
expect(io.compileErrors.duplicateClasses[0].forClass).toEqual('Crucial');
expect(io.compileErrors.duplicateClasses[0].files[0]).toEqual('/Users/crucial/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/Crucial.sc');
expect(io.result).toBeDefined();
expect(io.result.duplicateClasses).toBeDefined();
expect(io.result.duplicateClasses.length).toEqual(1);
expect(io.result.duplicateClasses[0].forClass).toEqual('Crucial');
expect(io.result.duplicateClasses[0].files[0]).toEqual('/Users/crucial/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/Crucial.sc');
});

describe('parseCompleErrors', () => {
it('should parse Duplicate class errors', function() {
var io = new SclangIO();
io.setState(STATES.BOOTING);
var errors = io.parseCompileErrors(readFile('io-duplicate-class.txt'));
var errors = io.parseCompileOutput(readFile('io-duplicate-class.txt'));

expect(errors).toBeDefined();
expect(errors.duplicateClasses).toBeDefined();
Expand All @@ -95,7 +95,7 @@ describe('sclang-io', function() {
it('should parse extension for non-existent class', function() {
var io = new SclangIO();
io.setState(STATES.BOOTING);
var errors = io.parseCompileErrors(readFile('io-extension-for-non-existent-class.txt'));
var errors = io.parseCompileOutput(readFile('io-extension-for-non-existent-class.txt'));

expect(errors).toBeDefined();
expect(errors.extensionErrors).toBeDefined();
Expand All @@ -109,7 +109,7 @@ describe('sclang-io', function() {
it('should parse class syntax error', function() {
var io = new SclangIO();
io.setState(STATES.BOOTING);
var errors = io.parseCompileErrors(readFile('io-class-syntax-error.txt'));
var errors = io.parseCompileOutput(readFile('io-class-syntax-error.txt'));
console.log(errors);
expect(errors).toBeDefined;
expect(errors.extensionErrors).toBeDefined;
Expand All @@ -120,7 +120,7 @@ describe('sclang-io', function() {
it('should parse double class syntax error', function() {
var io = new SclangIO();
io.setState(STATES.BOOTING);
var errors = io.parseCompileErrors(readFile('io-class-syntax-error-2.txt'));
var errors = io.parseCompileOutput(readFile('io-class-syntax-error-2.txt'));
console.log(errors);
expect(errors).toBeDefined;
expect(errors.extensionErrors).toBeDefined;
Expand Down
Loading

0 comments on commit 1c72eec

Please sign in to comment.