Permalink
Browse files

- 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
  • Loading branch information...
1 parent 2e16962 commit 1fc36b9acb90bffd13dec88eb0cd237d4f5a383a nickolay committed Jul 5, 2010
Showing with 39 additions and 34 deletions.
  1. +3 −0 Changes
  2. +4 −4 README.md
  3. +28 −26 lib/Task/Joose/NodeJS.js
  4. +4 −4 lib/Task/Joose/NodeJS.mmd
View
@@ -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
View
@@ -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
View
@@ -3,7 +3,7 @@
Joose.top = this
-Joose.VERSION = 3.009
+Joose.VERSION = 3.01
Joose.AUTHORITY = 'jsan:NPLATONOV'
@@ -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" }
@@ -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 () {
@@ -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
}
}
@@ -3610,8 +3602,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
})
}
})
- }
-
+ }
}
}
})
@@ -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) } }
@@ -4149,7 +4142,9 @@ Role('JooseX.Namespace.Depended.Materialize.Eval', {
methods : {
materialize : function (resourceBlob) {
- eval.call(Joose.top, resourceBlob)
+ ;(function (){
+ eval(resourceBlob)
+ })()
}
}
})
@@ -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 + '')
+ })()
}
}
})
@@ -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

0 comments on commit 1fc36b9

Please sign in to comment.