Skip to content

Commit

Permalink
- upgraded Joose to 3.010, JooseX.Attribute to 0.04, JooseX.CPS to 0.…
Browse files Browse the repository at this point in the history
…07 and JooseX.N.D to 0.05

    - all bundled distributions now passes the test suites on NodeJS
  • Loading branch information
nickolay committed Jul 5, 2010
1 parent 2e16962 commit 1fc36b9
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 34 deletions.
3 changes: 3 additions & 0 deletions Changes
Expand Up @@ -2,6 +2,9 @@ Revision history for Task.Joose.NodeJS

{{ $NEXT }}

- upgraded Joose to 3.010, JooseX.Attribute to 0.04, JooseX.CPS to 0.07 and JooseX.N.D to 0.05
- all bundled distributions now passes the test suites on NodeJS

0.02 2010-06-30 08:41

- switched to Dist::Zilla
Expand Down
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -56,19 +56,19 @@ DESCRIPTION

`Task.Joose.NodeJS` is a distribution, containing Joose core bundled along with several essential extensions. Below is the composition:

> Joose [3.009](http://openjsan.org/doc/s/sa/samuraijack/Joose/3.009/lib/Joose.html)
> Joose [3.010](http://openjsan.org/doc/s/sa/samuraijack/Joose/3.010/lib/Joose.html)
>> Joose core, provides definitions for `Class/Role/Module` helpers
> JooseX.Attribute [0.03](http://openjsan.org/doc/s/sa/samuraijack/JooseX/Attribute/0.03/lib/JooseX/Attribute.html)
> JooseX.Attribute [0.04](http://openjsan.org/doc/s/sa/samuraijack/JooseX/Attribute/0.04/lib/JooseX/Attribute.html)
>> Additional features for attributes
> JooseX.Namespace.Depended [0.04](http://openjsan.org/doc/s/sa/samuraijack/JooseX/Namespace/Depended/0.04/lib/JooseX/Namespace/Depended.html)
> JooseX.Namespace.Depended [0.05](http://openjsan.org/doc/s/sa/samuraijack/JooseX/Namespace/Depended/0.05/lib/JooseX/Namespace/Depended.html)
>> Dependencies handling extension
> JooseX.CPS [0.06](http://openjsan.org/doc/s/sa/samuraijack/JooseX/CPS/0.06/lib/JooseX/CPS.html)
> JooseX.CPS [0.07](http://openjsan.org/doc/s/sa/samuraijack/JooseX/CPS/0.07/lib/JooseX/CPS.html)
>> Trait, allowing to add the asynchronous (aka non-blocking) methods to your classes
Expand Down
54 changes: 28 additions & 26 deletions lib/Task/Joose/NodeJS.js
Expand Up @@ -3,7 +3,7 @@

Joose.top = this

Joose.VERSION = 3.009
Joose.VERSION = 3.01
Joose.AUTHORITY = 'jsan:NPLATONOV'


Expand Down Expand Up @@ -171,21 +171,8 @@ Joose.I = {
Now : function () { return new Date() }
}



//XXX needs to be checked for IE8
try {
Joose.is_IE = /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent)
} catch (e) {
Joose.is_IE = false
}


try {
Joose.is_NodeJS = Boolean(process.argv[0])
} catch (e) {
Joose.is_NodeJS = false
};
Joose.is_IE = '\v' == 'v'
Joose.is_NodeJS = Boolean(typeof process != 'undefined' && process.pid);
Joose.Proto = function () { throw "Modules may not be instantiated." }

Joose.Proto.Empty = function () { throw "Joose.Proto.Empty can't be instantiated" }
Expand Down Expand Up @@ -2456,10 +2443,11 @@ Joose.Managed.My = new Joose.Managed.Role('Joose.Managed.My', {
var c = this.c
var myProto = this.myClass.prototype

Joose.O.eachOwn(c, function (property, name) {
if (property.IS_ALIAS) delete c[ name ]
})

this.myClass.meta.stem.properties.methods.each(function (method, name) {
var alias = c[ name ]

if (alias && alias.IS_ALIAS) delete c[ name ]

if (!c[ name ])
(c[ name ] = function () {
Expand All @@ -2473,13 +2461,17 @@ Joose.Managed.My = new Joose.Managed.Role('Joose.Managed.My', {
override : {

extend : function (props) {
if (!this.myClass && this.superClass.meta.myClass) this.createMy(props)
var myClass = this.myClass

if (!myClass && this.superClass.meta.myClass) this.createMy(props)

if (props.my) {
if (!this.myClass)
if (!myClass)
this.createMy(props)
else {
this.myClass.meta.extend(props.my)
this.needToReAlias = true

myClass.meta.extend(props.my)
delete props.my
}
}
Expand Down Expand Up @@ -3610,8 +3602,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
})
}
})
}

}
}
}
})
Expand All @@ -3620,6 +3611,8 @@ use = function (dependenciesInfo, callback, scope) {
JooseX.Namespace.Depended.Manager.my.use(dependenciesInfo, callback, scope)
}

use.paths = JooseX.Namespace.Depended.Manager.my.INC


Joose.I.FutureClass = function (className) { return function () { return eval(className) } }

Expand Down Expand Up @@ -4149,7 +4142,9 @@ Role('JooseX.Namespace.Depended.Materialize.Eval', {
methods : {

materialize : function (resourceBlob) {
eval.call(Joose.top, resourceBlob)
;(function (){
eval(resourceBlob)
})()
}
}
})
Expand Down Expand Up @@ -4407,7 +4402,14 @@ Role('JooseX.Namespace.Depended.Materialize.NodeJS', {
methods : {

materialize : function (resourceBlob, url) {
process.binding('evals').Script.runInThisContext(resourceBlob, url)
// global scope
if (process.global == global)
process.binding('evals').Script.runInThisContext(resourceBlob + '', url)
else
// running in Test.Run
(function (){
eval(resourceBlob + '')
})()
}
}
})
Expand Down
8 changes: 4 additions & 4 deletions lib/Task/Joose/NodeJS.mmd
Expand Up @@ -56,19 +56,19 @@ DESCRIPTION

`Task.Joose.NodeJS` is a distribution, containing Joose core bundled along with several essential extensions. Below is the composition:

> Joose [3.009](http://openjsan.org/doc/s/sa/samuraijack/Joose/3.009/lib/Joose.html)
> Joose [3.010](http://openjsan.org/doc/s/sa/samuraijack/Joose/3.010/lib/Joose.html)

>> Joose core, provides definitions for `Class/Role/Module` helpers

> JooseX.Attribute [0.03](http://openjsan.org/doc/s/sa/samuraijack/JooseX/Attribute/0.03/lib/JooseX/Attribute.html)
> JooseX.Attribute [0.04](http://openjsan.org/doc/s/sa/samuraijack/JooseX/Attribute/0.04/lib/JooseX/Attribute.html)

>> Additional features for attributes

> JooseX.Namespace.Depended [0.04](http://openjsan.org/doc/s/sa/samuraijack/JooseX/Namespace/Depended/0.04/lib/JooseX/Namespace/Depended.html)
> JooseX.Namespace.Depended [0.05](http://openjsan.org/doc/s/sa/samuraijack/JooseX/Namespace/Depended/0.05/lib/JooseX/Namespace/Depended.html)

>> Dependencies handling extension

> JooseX.CPS [0.06](http://openjsan.org/doc/s/sa/samuraijack/JooseX/CPS/0.06/lib/JooseX/CPS.html)
> JooseX.CPS [0.07](http://openjsan.org/doc/s/sa/samuraijack/JooseX/CPS/0.07/lib/JooseX/CPS.html)

>> Trait, allowing to add the asynchronous (aka non-blocking) methods to your classes

Expand Down

0 comments on commit 1fc36b9

Please sign in to comment.