Permalink
Browse files

- switched to Dist::Zilla for distribution management

  • Loading branch information...
1 parent ef3fc16 commit fe40ac1e10b607ee6d210392b57b9a557fa14068 nickolay committed Jun 15, 2010
Showing with 98 additions and 3,570 deletions.
  1. +0 −50 .project
  2. +0 −16 Build.PL
  3. +4 −3 Changes
  4. +0 −21 LICENCE
  5. +0 −221 MANIFEST
  6. +0 −56 MANIFEST.SKIP
  7. +0 −258 META.json
  8. BIN bin/yuicompressor-2.4.1.jar
  9. +72 −0 dist.ini
  10. +9 −2 lib/Joose/Managed/Class.js
  11. +4 −3 lib/Joose/Managed/PropertySet/Composition.js
  12. +8 −4 lib/Joose/Managed/Stem.js
  13. +1 −1 lib/Joose/Proto/Class.js
  14. +0 −2,935 lib/Task/Joose/Core.js
View
50 .project
@@ -5,56 +5,6 @@
<projects>
</projects>
<buildSpec>
- <buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>auto,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value>&lt;project&gt;/.externalToolBuilders/create Build (Joose).launch</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>auto,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value>&lt;project&gt;/.externalToolBuilders/Build (Joose).launch</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>auto,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value>&lt;project&gt;/.externalToolBuilders/Build docs (Joose).launch</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>auto,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value>&lt;project&gt;/.externalToolBuilders/Build task (Joose).launch</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value>&lt;project&gt;/.externalToolBuilders/New_Builder (1).launch</value>
- </dictionary>
- </arguments>
- </buildCommand>
</buildSpec>
<natures>
</natures>
View
16 Build.PL
@@ -1,16 +0,0 @@
-use inc::Module::JSAN::DSL;
-
-
-name Joose
-version 3.009
-
-author 'Nickolay Platonov (aka SamuraiJack) <nplatonov@cpan.org>'
-author 'Malte Ubl'
-author 'Jeremy Wall'
-
-abstract 'Post modern self-hosting meta object system for JavaScript with support for classes, inheritance, roles, traits, method modifiers and more.'
-
-license bsd
-
-
-docs_markup mmd
View
7 Changes
@@ -1,9 +1,10 @@
-3.009 .............
+Release history for Joose:
+
+{{ $NEXT }}
[ENHANCEMENTS]
- -none-
-
+ - switched to Dist::Zilla for distribution management
[API CHANGES]
View
21 LICENCE
@@ -1,21 +0,0 @@
-Copyright (c) 2008, Malte Ubl
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-* Neither the name of Malte Ubl nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
221 MANIFEST
@@ -1,221 +0,0 @@
-.gitignore
-bin/yuicompressor-2.4.1.jar
-Build.PL
-Changes
-Components.JS
-doc/html/Joose.html
-doc/html/Joose/Cookbook.html
-doc/html/Joose/Cookbook/Basics/Recipe1.html
-doc/html/Joose/Managed/Attribute.html
-doc/html/Joose/Managed/Attribute/Builder.html
-doc/html/Joose/Managed/Bootstrap.html
-doc/html/Joose/Managed/Builder.html
-doc/html/Joose/Managed/Class.html
-doc/html/Joose/Managed/My.html
-doc/html/Joose/Managed/Property.html
-doc/html/Joose/Managed/Property/Attribute.html
-doc/html/Joose/Managed/Property/ConflictMarker.html
-doc/html/Joose/Managed/Property/MethodModifier.html
-doc/html/Joose/Managed/Property/MethodModifier/After.html
-doc/html/Joose/Managed/Property/MethodModifier/Around.html
-doc/html/Joose/Managed/Property/MethodModifier/Augment.html
-doc/html/Joose/Managed/Property/MethodModifier/Before.html
-doc/html/Joose/Managed/Property/MethodModifier/Override.html
-doc/html/Joose/Managed/Property/MethodModifier/Put.html
-doc/html/Joose/Managed/Property/Requirement.html
-doc/html/Joose/Managed/PropertySet.html
-doc/html/Joose/Managed/PropertySet/Composition.html
-doc/html/Joose/Managed/PropertySet/Mutable.html
-doc/html/Joose/Managed/PropertySet/Namespace.html
-doc/html/Joose/Managed/Role.html
-doc/html/Joose/Managed/Stem.html
-doc/html/Joose/Managed/StemElement/Attributes.html
-doc/html/Joose/Managed/StemElement/MethodModifiers.html
-doc/html/Joose/Managed/StemElement/Methods.html
-doc/html/Joose/Managed/StemElement/Requirements.html
-doc/html/Joose/Manual.html
-doc/html/Joose/Manual/Attributes.html
-doc/html/Joose/Manual/BestPractices.html
-doc/html/Joose/Manual/Classes.html
-doc/html/Joose/Manual/Concepts.html
-doc/html/Joose/Manual/Construction.html
-doc/html/Joose/Manual/Contributing.html
-doc/html/Joose/Manual/Delta.html
-doc/html/Joose/Manual/FAQ.html
-doc/html/Joose/Manual/Installation.html
-doc/html/Joose/Manual/JooseX.html
-doc/html/Joose/Manual/MetaRoles.html
-doc/html/Joose/Manual/MethodModifiers.html
-doc/html/Joose/Manual/Mutability.html
-doc/html/Joose/Manual/Reflection.html
-doc/html/Joose/Manual/Roles.html
-doc/html/Joose/Manual/Static.html
-doc/html/Joose/Manual/Traits.html
-doc/html/Joose/Manual/Unsweetened.html
-doc/html/Joose/Meta/Class.html
-doc/html/Joose/Meta/Object.html
-doc/html/Joose/Meta/Role.html
-doc/html/Joose/Namespace/Able.html
-doc/html/Joose/Namespace/Keeper.html
-doc/html/Joose/Namespace/Manager.html
-doc/html/Joose/Proto/Class.html
-doc/html/Joose/Proto/Empty.html
-doc/html/Joose/Proto/Object.html
-doc/html/Task/Joose/Core.html
-doc/mmd/Joose.txt
-doc/mmd/Joose/Cookbook.txt
-doc/mmd/Joose/Cookbook/Basics/Recipe1.txt
-doc/mmd/Joose/Managed/Attribute.txt
-doc/mmd/Joose/Managed/Attribute/Builder.txt
-doc/mmd/Joose/Managed/Bootstrap.txt
-doc/mmd/Joose/Managed/Builder.txt
-doc/mmd/Joose/Managed/Class.txt
-doc/mmd/Joose/Managed/My.txt
-doc/mmd/Joose/Managed/Property.txt
-doc/mmd/Joose/Managed/Property/Attribute.txt
-doc/mmd/Joose/Managed/Property/ConflictMarker.txt
-doc/mmd/Joose/Managed/Property/MethodModifier.txt
-doc/mmd/Joose/Managed/Property/MethodModifier/After.txt
-doc/mmd/Joose/Managed/Property/MethodModifier/Around.txt
-doc/mmd/Joose/Managed/Property/MethodModifier/Augment.txt
-doc/mmd/Joose/Managed/Property/MethodModifier/Before.txt
-doc/mmd/Joose/Managed/Property/MethodModifier/Override.txt
-doc/mmd/Joose/Managed/Property/MethodModifier/Put.txt
-doc/mmd/Joose/Managed/Property/Requirement.txt
-doc/mmd/Joose/Managed/PropertySet.txt
-doc/mmd/Joose/Managed/PropertySet/Composition.txt
-doc/mmd/Joose/Managed/PropertySet/Mutable.txt
-doc/mmd/Joose/Managed/PropertySet/Namespace.txt
-doc/mmd/Joose/Managed/Role.txt
-doc/mmd/Joose/Managed/Stem.txt
-doc/mmd/Joose/Managed/StemElement/Attributes.txt
-doc/mmd/Joose/Managed/StemElement/MethodModifiers.txt
-doc/mmd/Joose/Managed/StemElement/Methods.txt
-doc/mmd/Joose/Managed/StemElement/Requirements.txt
-doc/mmd/Joose/Manual.txt
-doc/mmd/Joose/Manual/Attributes.txt
-doc/mmd/Joose/Manual/BestPractices.txt
-doc/mmd/Joose/Manual/Classes.txt
-doc/mmd/Joose/Manual/Concepts.txt
-doc/mmd/Joose/Manual/Construction.txt
-doc/mmd/Joose/Manual/Contributing.txt
-doc/mmd/Joose/Manual/Delta.txt
-doc/mmd/Joose/Manual/FAQ.txt
-doc/mmd/Joose/Manual/Installation.txt
-doc/mmd/Joose/Manual/JooseX.txt
-doc/mmd/Joose/Manual/MetaRoles.txt
-doc/mmd/Joose/Manual/MethodModifiers.txt
-doc/mmd/Joose/Manual/Mutability.txt
-doc/mmd/Joose/Manual/Reflection.txt
-doc/mmd/Joose/Manual/Roles.txt
-doc/mmd/Joose/Manual/Static.txt
-doc/mmd/Joose/Manual/Traits.txt
-doc/mmd/Joose/Manual/Unsweetened.txt
-doc/mmd/Joose/Meta/Class.txt
-doc/mmd/Joose/Meta/Object.txt
-doc/mmd/Joose/Meta/Role.txt
-doc/mmd/Joose/Namespace/Able.txt
-doc/mmd/Joose/Namespace/Keeper.txt
-doc/mmd/Joose/Namespace/Manager.txt
-doc/mmd/Joose/Proto/Class.txt
-doc/mmd/Joose/Proto/Empty.txt
-doc/mmd/Joose/Proto/Object.txt
-doc/mmd/Task/Joose/Core.txt
-inc/Module/Build/Functions.pm
-inc/Module/Build/Functions/DSL.pm
-inc/Module/Build/JSAN.pm
-inc/Module/Build/JSAN/Installable.pm
-inc/Module/JSAN.pm
-inc/Module/JSAN/DSL.pm
-INSTALL
-lib/Joose.js
-lib/Joose.mmd
-lib/Joose/Cookbook.js
-lib/Joose/Cookbook/Basics/Recipe1.js
-lib/Joose/Managed/Attribute.js
-lib/Joose/Managed/Attribute/Builder.js
-lib/Joose/Managed/Bootstrap.js
-lib/Joose/Managed/Builder.js
-lib/Joose/Managed/Class.js
-lib/Joose/Managed/My.js
-lib/Joose/Managed/Property.js
-lib/Joose/Managed/Property/Attribute.js
-lib/Joose/Managed/Property/ConflictMarker.js
-lib/Joose/Managed/Property/MethodModifier.js
-lib/Joose/Managed/Property/MethodModifier/After.js
-lib/Joose/Managed/Property/MethodModifier/Around.js
-lib/Joose/Managed/Property/MethodModifier/Augment.js
-lib/Joose/Managed/Property/MethodModifier/Before.js
-lib/Joose/Managed/Property/MethodModifier/Override.js
-lib/Joose/Managed/Property/MethodModifier/Put.js
-lib/Joose/Managed/Property/Requirement.js
-lib/Joose/Managed/PropertySet.js
-lib/Joose/Managed/PropertySet/Composition.js
-lib/Joose/Managed/PropertySet/Mutable.js
-lib/Joose/Managed/PropertySet/Namespace.js
-lib/Joose/Managed/Role.js
-lib/Joose/Managed/Stem.js
-lib/Joose/Managed/StemElement/Attributes.js
-lib/Joose/Managed/StemElement/MethodModifiers.js
-lib/Joose/Managed/StemElement/Methods.js
-lib/Joose/Managed/StemElement/Requirements.js
-lib/Joose/Manual.js
-lib/Joose/Manual/Attributes.js
-lib/Joose/Manual/BestPractices.js
-lib/Joose/Manual/Classes.js
-lib/Joose/Manual/Concepts.js
-lib/Joose/Manual/Construction.js
-lib/Joose/Manual/Contributing.js
-lib/Joose/Manual/Delta.js
-lib/Joose/Manual/FAQ.js
-lib/Joose/Manual/Installation.js
-lib/Joose/Manual/JooseX.js
-lib/Joose/Manual/MetaRoles.js
-lib/Joose/Manual/MethodModifiers.js
-lib/Joose/Manual/Mutability.js
-lib/Joose/Manual/Reflection.js
-lib/Joose/Manual/Roles.js
-lib/Joose/Manual/Static.js
-lib/Joose/Manual/Traits.js
-lib/Joose/Manual/Unsweetened.js
-lib/Joose/Meta/Class.js
-lib/Joose/Meta/Object.js
-lib/Joose/Meta/Role.js
-lib/Joose/Namespace/Able.js
-lib/Joose/Namespace/Keeper.js
-lib/Joose/Namespace/Manager.js
-lib/Joose/Proto/Class.js
-lib/Joose/Proto/Empty.js
-lib/Joose/Proto/Object.js
-lib/Task/Joose/Core.js
-LICENCE
-MANIFEST
-META.json
-README.md
-t/001_helpers.t.js
-t/010_proto_class.t.js
-t/011_propertyset.t.js
-t/012_propertyset_mutable.t.js
-t/020_managed_class.t.js
-t/021_method_modifiers.t.js
-t/022_inheriting_from_proto_class.t.js
-t/023_builder_stem_inheritance.t.js
-t/024_builder_stem_inheritance.t.js
-t/031_managed_role.t.js
-t/032_role_application_basic.t.js
-t/033_role_application_sugar.t.js
-t/040_my_symbiont.t.js
-t/045_role_builder.t.js
-t/050_helpers.t.js
-t/051_advanced_attribute.t.js
-t/052_adv_attr_in_metaclasses.t.js
-t/052_advanced_attribute.t.js
-t/052_role_application_advanced.t.js
-t/053_using_class_as_role.t.js
-t/054_meta_roles.t.js
-t/055_role_to_instance_application.t.js
-t/060_modules.t.js
-t/070_reflection.t.js
-t/080_non_joose_inheritance.t.js
-t/index.html
-TODO
View
56 MANIFEST.SKIP
@@ -1,56 +0,0 @@
-# Avoid version control files.
-\bRCS\b
-\bCVS\b
-,v$
-\B\.svn\b
-\B\.cvsignore$
-
-# Avoid Makemaker generated and utility files.
-\bMakefile$
-\bblib
-\bMakeMaker-\d
-\bpm_to_blib$
-\bblibdirs$
-^MANIFEST\.SKIP$
-
-# Avoid VMS specific Makmaker generated files
-\bDescrip.MMS$
-\bDESCRIP.MMS$
-\bdescrip.mms$
-
-# Avoid Module::Build generated and utility files.
-\bBuild$
-\bBuild.bat$
-\b_build
-\bBuild.COM$
-\bBUILD.COM$
-\bbuild.com$
-
-# Avoid Devel::Cover generated files
-\bcover_db
-
-# Avoid temp and backup files.
-~$
-\.tmp$
-\.old$
-\.bak$
-\#$
-\.#
-\.rej$
-
-# Avoid OS-specific files/dirs
-# Mac OSX metadata
-\B\.DS_Store
-# Mac OSX SMB mount metadata files
-\B\._
-# Avoid archives of this distribution
-\bJoose-[\d\.\_]+
-.tar.gz$
-^tests/lib/
-Joose-3.001
-
-.externalToolBuilders
-^todo/
-^\.git\b
-^\.project\b
-^MYMETA.yml$
View
258 META.json
@@ -1,258 +0,0 @@
-{
- "resources" : {
- "license" : "http://www.opensource.org/licenses/bsd-license.php"
- },
- "generated_by" : "Module::Build version 0.3601",
- "meta-spec" : {
- "version" : "1.4",
- "url" : "http://module-build.sourceforge.net/META-spec-v1.4.html"
- },
- "version" : "3.009",
- "name" : "Joose",
- "author" : [
- "Nickolay Platonov (aka SamuraiJack) <nplatonov@cpan.org>",
- "Malte Ubl",
- "Jeremy Wall"
- ],
- "license" : "bsd",
- "static_dir" : "static",
- "provides" : {
- "Joose.Meta.Role" : {
- "version" : null,
- "file" : "lib/Joose/Meta/Role.js"
- },
- "Joose.Manual.Classes" : {
- "version" : "0.01",
- "file" : "lib/Joose/Manual/Classes.js"
- },
- "Joose.Manual.Traits" : {
- "version" : null,
- "file" : "lib/Joose/Manual/Traits.js"
- },
- "Joose.Managed.Property.MethodModifier" : {
- "version" : null,
- "file" : "lib/Joose/Managed/Property/MethodModifier.js"
- },
- "Joose" : {
- "version" : "3.009",
- "file" : "lib/Joose.js"
- },
- "Joose.Meta.Object" : {
- "version" : null,
- "file" : "lib/Joose/Meta/Object.js"
- },
- "Joose.Manual.Reflection" : {
- "version" : null,
- "file" : "lib/Joose/Manual/Reflection.js"
- },
- "Joose.Cookbook" : {
- "version" : null,
- "file" : "lib/Joose/Cookbook.js"
- },
- "Joose.Meta.Class" : {
- "version" : null,
- "file" : "lib/Joose/Meta/Class.js"
- },
- "Joose.Manual.Construction" : {
- "version" : null,
- "file" : "lib/Joose/Manual/Construction.js"
- },
- "Joose.Managed.Property.Attribute" : {
- "version" : null,
- "file" : "lib/Joose/Managed/Property/Attribute.js"
- },
- "Joose.Manual.Contributing" : {
- "version" : null,
- "file" : "lib/Joose/Manual/Contributing.js"
- },
- "Joose.Managed.Property.MethodModifier.Around" : {
- "version" : null,
- "file" : "lib/Joose/Managed/Property/MethodModifier/Around.js"
- },
- "Joose.Namespace.Manager" : {
- "version" : null,
- "file" : "lib/Joose/Namespace/Manager.js"
- },
- "Joose.Managed.Attribute.Builder" : {
- "version" : null,
- "file" : "lib/Joose/Managed/Attribute/Builder.js"
- },
- "Joose.Managed.Class" : {
- "version" : null,
- "file" : "lib/Joose/Managed/Class.js"
- },
- "Joose.Managed.StemElement.Requirements" : {
- "version" : null,
- "file" : "lib/Joose/Managed/StemElement/Requirements.js"
- },
- "Joose.Manual.Mutability" : {
- "version" : null,
- "file" : "lib/Joose/Manual/Mutability.js"
- },
- "Joose.Manual.BestPractices" : {
- "version" : null,
- "file" : "lib/Joose/Manual/BestPractices.js"
- },
- "Joose.Manual.Roles" : {
- "version" : null,
- "file" : "lib/Joose/Manual/Roles.js"
- },
- "Joose.Namespace.Keeper" : {
- "version" : null,
- "file" : "lib/Joose/Namespace/Keeper.js"
- },
- "Joose.Managed.StemElement.MethodModifiers" : {
- "version" : null,
- "file" : "lib/Joose/Managed/StemElement/MethodModifiers.js"
- },
- "Joose.Proto.Class" : {
- "version" : ".",
- "file" : "lib/Joose/Proto/Class.js"
- },
- "Joose.Managed.Property.MethodModifier.Put" : {
- "version" : null,
- "file" : "lib/Joose/Managed/Property/MethodModifier/Put.js"
- },
- "Joose.Managed.Property.MethodModifier.Override" : {
- "version" : null,
- "file" : "lib/Joose/Managed/Property/MethodModifier/Override.js"
- },
- "Joose.Managed.My" : {
- "version" : null,
- "file" : "lib/Joose/Managed/My.js"
- },
- "Joose.Manual.Concepts" : {
- "version" : null,
- "file" : "lib/Joose/Manual/Concepts.js"
- },
- "Joose.Managed.PropertySet.Composition" : {
- "version" : null,
- "file" : "lib/Joose/Managed/PropertySet/Composition.js"
- },
- "Joose.Managed.PropertySet.Mutable" : {
- "version" : null,
- "file" : "lib/Joose/Managed/PropertySet/Mutable.js"
- },
- "Joose.Cookbook.Basics.Recipe1" : {
- "version" : null,
- "file" : "lib/Joose/Cookbook/Basics/Recipe1.js"
- },
- "Joose.Managed.Property.MethodModifier.After" : {
- "version" : null,
- "file" : "lib/Joose/Managed/Property/MethodModifier/After.js"
- },
- "Joose.Managed.PropertySet.Namespace" : {
- "version" : null,
- "file" : "lib/Joose/Managed/PropertySet/Namespace.js"
- },
- "Joose.Managed.Property.MethodModifier.Augment" : {
- "version" : null,
- "file" : "lib/Joose/Managed/Property/MethodModifier/Augment.js"
- },
- "Joose.Manual.JooseX" : {
- "version" : "1.23",
- "file" : "lib/Joose/Manual/JooseX.js"
- },
- "Joose.Manual.MetaRoles" : {
- "version" : null,
- "file" : "lib/Joose/Manual/MetaRoles.js"
- },
- "Joose.Manual.Static" : {
- "version" : null,
- "file" : "lib/Joose/Manual/Static.js"
- },
- "Joose.Managed.Stem" : {
- "version" : null,
- "file" : "lib/Joose/Managed/Stem.js"
- },
- "Joose.Proto.Object" : {
- "version" : null,
- "file" : "lib/Joose/Proto/Object.js"
- },
- "Joose.Manual.MethodModifiers" : {
- "version" : null,
- "file" : "lib/Joose/Manual/MethodModifiers.js"
- },
- "Joose.Manual.Delta" : {
- "version" : null,
- "file" : "lib/Joose/Manual/Delta.js"
- },
- "Joose.Managed.Property.MethodModifier.Before" : {
- "version" : null,
- "file" : "lib/Joose/Managed/Property/MethodModifier/Before.js"
- },
- "Joose.Managed.PropertySet" : {
- "version" : null,
- "file" : "lib/Joose/Managed/PropertySet.js"
- },
- "Joose.Manual.FAQ" : {
- "version" : null,
- "file" : "lib/Joose/Manual/FAQ.js"
- },
- "Task.Joose.Core" : {
- "version" : "3.009",
- "file" : "lib/Task/Joose/Core.js"
- },
- "Joose.Managed.Property.ConflictMarker" : {
- "version" : null,
- "file" : "lib/Joose/Managed/Property/ConflictMarker.js"
- },
- "Joose.Managed.Attribute" : {
- "version" : null,
- "file" : "lib/Joose/Managed/Attribute.js"
- },
- "Joose.Manual.Installation" : {
- "version" : null,
- "file" : "lib/Joose/Manual/Installation.js"
- },
- "Joose.Managed.Property" : {
- "version" : null,
- "file" : "lib/Joose/Managed/Property.js"
- },
- "Joose.Managed.Role" : {
- "version" : null,
- "file" : "lib/Joose/Managed/Role.js"
- },
- "Joose.Managed.Property.Requirement" : {
- "version" : null,
- "file" : "lib/Joose/Managed/Property/Requirement.js"
- },
- "Joose.Proto.Empty" : {
- "version" : null,
- "file" : "lib/Joose/Proto/Empty.js"
- },
- "Joose.Manual.Attributes" : {
- "version" : null,
- "file" : "lib/Joose/Manual/Attributes.js"
- },
- "Joose.Managed.Builder" : {
- "version" : null,
- "file" : "lib/Joose/Managed/Builder.js"
- },
- "Joose.Manual.Unsweetened" : {
- "version" : null,
- "file" : "lib/Joose/Manual/Unsweetened.js"
- },
- "Joose.Managed.StemElement.Attributes" : {
- "version" : null,
- "file" : "lib/Joose/Managed/StemElement/Attributes.js"
- },
- "Joose.Namespace.Able" : {
- "version" : null,
- "file" : "lib/Joose/Namespace/Able.js"
- },
- "Joose.Manual" : {
- "version" : null,
- "file" : "lib/Joose/Manual.js"
- },
- "Joose.Managed.Bootstrap" : {
- "version" : null,
- "file" : "lib/Joose/Managed/Bootstrap.js"
- },
- "Joose.Managed.StemElement.Methods" : {
- "version" : null,
- "file" : "lib/Joose/Managed/StemElement/Methods.js"
- }
- },
- "abstract" : "Post modern self-hosting meta object system for JavaScript with support for classes, inheritance, roles, traits, method modifiers and more."
-}
View
BIN bin/yuicompressor-2.4.1.jar
Binary file not shown.
View
72 dist.ini
@@ -0,0 +1,72 @@
+name = Joose
+abstract = Post modern self-hosting meta object system for JavaScript with support for classes, inheritance, roles, traits, method modifiers and more.
+
+author = Nickolay Platonov <nplatonov@cpan.org>
+author = Malte Ubl
+author = Jeremy Wall
+
+license = LGPL_3_0
+copyright_holder = Nickolay Platonov <nplatonov@cpan.org>
+
+
+; version provider
+[BumpVersionFromGit]
+
+
+; choose/generate files to include
+
+[GatherDir]
+[PruneCruft]
+[ManifestSkip]
+[License]
+
+; build system
+
+[ExecDir]
+[ShareDir]
+
+
+; JSAN-specific configuration
+[JSAN] ; includes META.JSON generation
+docs_markup = mmd ; default
+static_dir = static ; default
+
+[JSAN::ReadmeFromMD] ; should be after docs generation
+[JSAN::Bundle] ; after docs generation to avoid docs for bundles
+
+; manifest (after all generated files)
+[Manifest]
+
+
+; before release
+
+[Git::Check]
+[CheckChangesHasContent]
+
+; [TestRelease] todo
+[ConfirmRelease]
+
+; releaser
+[JSAN::Upload] ; just a no-op for now
+
+; after release
+[Git::Commit / Commit_Dirty_Files]
+
+[Git::Tag]
+
+[NextRelease]
+format = %-9v %{yyyy-MM-dd HH:mm}d
+
+[Git::Commit / Commit_Changes]
+
+[Git::Push]
+push_to = origin
+
+[Twitter]
+tweet_url = http://openjsan.org/go/?l={{ my $dist = $DIST; $dist =~ s/-/./g; $dist; }}
+tweet = Released {{$DIST}}-{{$VERSION}} {{$URL}}
+hash_tags = #jsan
+
+; prerequisites
+
+; [JSAN::Prereq] none
View
11 lib/Joose/Managed/Class.js
@@ -233,6 +233,11 @@ Joose.Managed.Class = new Joose.Proto.Class('Joose.Managed.Class', {
},
+ getComposeInfo : function () {
+ return this.stem
+ },
+
+
eachRole : function (roles, func, scope) {
Joose.A.each(roles, function (arg, index) {
var role = (arg.meta instanceof Joose.Managed.Class) ? arg : arg.role
@@ -250,11 +255,13 @@ Joose.Managed.Class = new Joose.Proto.Class('Joose.Managed.Class', {
var desc = arg
+ //compose descriptor can contain 'alias' and 'exclude' fields, in this case actual reference should be stored
+ //into 'propertySet' field
if (role != arg) {
- desc.propertySet = role.meta.stem
+ desc.propertySet = role.meta.getComposeInfo()
delete desc.role
} else
- desc = desc.meta.stem
+ desc = desc.meta.getComposeInfo()
this.stem.addComposeInfo(desc)
View
7 lib/Joose/Managed/PropertySet/Composition.js
@@ -17,10 +17,11 @@ Joose.Managed.PropertySet.Composition = new Joose.Proto.Class('Joose.Managed.Pro
eachR : function (func, scope) {
- var props = this.properties
+ var props = this.properties
+ var processOrder = this.processOrder
- for(var i = this.processOrder.length - 1; i >= 0; i--)
- func.call(scope || this, props[this.processOrder[i]], this.processOrder[i])
+ for(var i = processOrder.length - 1; i >= 0; i--)
+ func.call(scope || this, props[ processOrder[i] ], processOrder[i])
},
View
12 lib/Joose/Managed/Stem.js
@@ -44,20 +44,24 @@ Joose.Managed.Stem = new Joose.Proto.Class('Joose.Managed.Stem', {
reCompose : function () {
- this.preApply(this.targetMeta.c)
+ var c = this.targetMeta.c
+
+ this.preApply(c)
Joose.Managed.Stem.superClass.reCompose.call(this)
- this.apply(this.targetMeta.c)
+ this.apply(c)
},
deCompose : function () {
- this.unapply(this.targetMeta.c)
+ var c = this.targetMeta.c
+
+ this.unapply(c)
Joose.Managed.Stem.superClass.deCompose.call(this)
- this.postUnApply(this.targetMeta.c)
+ this.postUnApply(c)
}
View
2 lib/Joose/Proto/Class.js
@@ -1,4 +1,4 @@
-(function () {
+;(function () {
Joose.Proto.Class = function () {
this.initialize(this.BUILD.apply(this, arguments))
View
2,935 lib/Task/Joose/Core.js
@@ -1,2935 +0,0 @@
-Joose = function () { throw "Modules may not be instantiated." }
-
-Joose.top = this
-
-Joose.VERSION = 3.009
-Joose.AUTHORITY = 'jsan:NPLATONOV'
-
-
-// Static helpers for Arrays
-Joose.A = {
-
- each : function (array, func, scope) {
- scope = scope || this
-
- for (var i = 0, len = array.length; i < len; i++)
- if (func.call(scope, array[i], i) === false) return false
- },
-
-
- exists : function (array, value) {
- for (var i = 0, len = array.length; i < len; i++) if (array[i] == value) return true
-
- return false
- },
-
-
- map : function (array, func, scope) {
- scope = scope || this
-
- var res = []
-
- for (var i = 0, len = array.length; i < len; i++)
- res.push( func.call(scope, array[i], i) )
-
- return res
- },
-
-
- grep : function (array, func) {
- var a = []
-
- Joose.A.each(array, function (t) {
- if (func(t)) a.push(t)
- })
-
- return a
- },
-
-
- remove : function (array, removeEle) {
- var a = []
-
- Joose.A.each(array, function (t) {
- if (t !== removeEle) a.push(t)
- })
-
- return a
- }
-
-}
-
-// Static helpers for Strings
-Joose.S = {
-
- saneSplit : function (str, delimeter) {
- var res = (str || '').split(delimeter)
-
- if (res.length == 1 && !res[0]) res.shift()
-
- return res
- },
-
-
- uppercaseFirst : function (string) {
- return string.substr(0, 1).toUpperCase() + string.substr(1, string.length - 1)
- }
-
-}
-
-
-// Static helpers for objects
-Joose.O = {
-
- each : function (object, func, scope) {
- scope = scope || this
-
- for (var i in object)
- if (func.call(scope, object[i], i) === false) return false
-
- if (Joose.is_IE)
- return Joose.A.each([ 'toString', 'constructor', 'hasOwnProperty' ], function (el) {
-
- if (object.hasOwnProperty(el)) return func.call(scope, object[el], el)
- })
- },
-
-
- eachOwn : function (object, func, scope) {
- scope = scope || this
-
- return Joose.O.each(object, function (value, name) {
- if (object.hasOwnProperty(name)) return func.call(scope, value, name)
- }, scope)
- },
-
-
- copy : function (source, target) {
- target = target || {}
-
- Joose.O.each(source, function (value, name) { target[name] = value })
-
- return target
- },
-
-
- copyOwn : function (source, target) {
- target = target || {}
-
- Joose.O.eachOwn(source, function (value, name) { target[name] = value })
-
- return target
- },
-
-
- getMutableCopy : function (object) {
- var f = function () {}
-
- f.prototype = object
-
- return new f()
- },
-
-
- extend : function (target, source) {
- return Joose.O.copy(source, target)
- },
-
-
- isEmpty : function (object) {
- for (var i in object) if (object.hasOwnProperty(i)) return false
-
- return true
- },
-
-
- isInstance: function (obj) {
- return obj && obj.meta && obj.constructor == obj.meta.c
- },
-
-
- wantArray : function (obj) {
- if (obj instanceof Array) return obj
-
- return [ obj ]
- },
-
-
- isFunction : function (obj) {
- return typeof obj == 'function' && obj.constructor != RegExp
- }
-}
-
-
-//initializers
-
-Joose.I = {
- Array : function () { return [] },
- Object : function () { return {} },
- Function : function () { return function () {} },
- 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.Proto = function () { throw "Modules may not be instantiated." }
-
-Joose.Proto.Empty = function () { throw "Joose.Proto.Empty can't be instantiated" }
-
-Joose.Proto.Empty.meta = {};
-(function () {
-
- Joose.Proto.Object = function () {
- throw "Joose.Proto.Object can't be instantiated"
- }
-
-
- var SUPER = function () {
- var self = SUPER.caller
-
- if (self == SUPERARG) self = self.caller
-
- if (!self.SUPER) throw "Invalid call to SUPER"
-
- return self.SUPER[self.methodName].apply(this, arguments)
- }
-
-
- var SUPERARG = function () {
- return this.SUPER.apply(this, arguments[0])
- }
-
-
-
- Joose.Proto.Object.prototype = {
-
- SUPERARG : SUPERARG,
- SUPER : SUPER,
-
- INNER : function () {
- throw "Invalid call to INNER"
- },
-
-
- BUILD : function (config) {
- return arguments.length == 1 && typeof config == 'object' && config || {}
- },
-
-
- initialize: function () {
- },
-
-
- toString: function () {
- return "a " + this.meta.name
- }
-
- }
-
- Joose.Proto.Object.meta = {
- constructor : Joose.Proto.Object,
-
- methods : Joose.O.copy(Joose.Proto.Object.prototype),
- attributes : {}
- }
-
- Joose.Proto.Object.prototype.meta = Joose.Proto.Object.meta
-
-})();
-(function () {
-
- Joose.Proto.Class = function () {
- this.initialize(this.BUILD.apply(this, arguments))
- }
-
- var bootstrap = {
-
- VERSION : null,
- AUTHORITY : null,
-
- constructor : Joose.Proto.Class,
- superClass : null,
-
- name : null,
-
- attributes : null,
- methods : null,
-
- meta : null,
- c : null,
-
- defaultSuperClass : Joose.Proto.Object,
-
-
- BUILD : function (name, extend) {
- this.name = name
-
- return { __extend__ : extend || {} }
- },
-
-
- initialize: function (props) {
- var extend = props.__extend__
-
- this.VERSION = extend.VERSION
- this.AUTHORITY = extend.AUTHORITY
-
- delete extend.VERSION
- delete extend.AUTHORITY
-
- this.c = this.extractConstructor(extend)
-
- this.adaptConstructor(this.c)
-
- if (extend.constructorOnly) {
- delete extend.constructorOnly
- return
- }
-
- this.construct(extend)
- },
-
-
- construct : function (extend) {
- if (!this.prepareProps(extend)) return
-
- var superClass = this.superClass = this.extractSuperClass(extend)
- this.processSuperClass(superClass)
-
- this.adaptPrototype(this.c.prototype)
-
- this.finalize(extend)
- },
-
-
- finalize : function (extend) {
- this.processStem(extend)
-
- this.extend(extend)
- },
-
-
- //if the extension returns false from this method it should re-enter 'construct'
- prepareProps : function (extend) {
- return true
- },
-
-
- extractConstructor : function (extend) {
- var res = extend.hasOwnProperty('constructor') ? extend.constructor : this.defaultConstructor()
-
- delete extend.constructor
-
- return res
- },
-
-
- extractSuperClass : function (extend) {
- var res = extend.isa || this.defaultSuperClass
-
- delete extend.isa
-
- return res
- },
-
-
- processStem : function () {
- // '|| {}' for non-Joose superclasses
- var superMeta = this.superClass.meta || {}
-
- this.methods = Joose.O.getMutableCopy(superMeta.methods || {})
- this.attributes = Joose.O.getMutableCopy(superMeta.attributes || {})
- },
-
-
- initInstance : function (instance, props) {
- Joose.O.copyOwn(props, instance)
- },
-
-
- defaultConstructor: function () {
- return function () {
- var args = this.BUILD.apply(this, arguments)
-
- this.meta.initInstance(this, args)
-
- var initialize = this.initialize
-
- if (typeof initialize == 'function') initialize.call(this, args)
- }
- },
-
-
- processSuperClass: function (superClass) {
- this.c.prototype = Joose.O.getMutableCopy(superClass.prototype)
- this.c.superClass = superClass.prototype
- },
-
-
- adaptConstructor: function (c) {
- c.meta = this
-
- if (!c.hasOwnProperty('toString')) c.toString = function () { return this.meta.name }
- },
-
-
- adaptPrototype: function (proto) {
- //this will fix weird semantic of native "constructor" property to more intuitive (idea borrowed from Ext)
- proto.constructor = this.c
- proto.meta = this
- },
-
-
- addMethod: function (name, func) {
- func.SUPER = this.superClass.prototype
-
- //chrome don't allow to redefine the "name" property
- func.methodName = name
-
- this.methods[name] = func
- this.c.prototype[name] = func
- },
-
-
- addAttribute: function (name, init) {
- this.attributes[name] = init
- this.c.prototype[name] = init
- },
-
-
- removeMethod : function (name) {
- delete this.methods[name]
- delete this.c.prototype[name]
- },
-
-
- removeAttribute: function (name) {
- delete this.attributes[name]
- delete this.c.prototype[name]
- },
-
-
- hasMethod: function (name) {
- return Boolean(this.methods[name])
- },
-
-
- hasAttribute: function (name) {
- return this.attributes[name] !== undefined
- },
-
-
- hasOwnMethod: function (name) {
- return this.hasMethod(name) && this.methods.hasOwnProperty(name)
- },
-
-
- hasOwnAttribute: function (name) {
- return this.hasAttribute(name) && this.attributes.hasOwnProperty(name)
- },
-
-
- extend : function (props) {
- Joose.O.eachOwn(props, function (value, name) {
- if (name != 'meta' && name != 'constructor')
- if (Joose.O.isFunction(value) && !value.meta)
- this.addMethod(name, value)
- else
- this.addAttribute(name, value)
- }, this)
- },
-
-
- subClassOf : function (classObject, extend) {
- extend = extend || {}
- extend.isa = classObject || this.c
-
- return new this.constructor(null, extend).c
- },
-
-
- instantiate : function () {
- var f = function () {}
-
- f.prototype = this.c.prototype
-
- var obj = new f()
-
- return this.c.apply(obj, arguments) || obj
- }
- }
-
- //micro bootstraping
-
- Joose.Proto.Class.prototype = Joose.O.getMutableCopy(Joose.Proto.Object.prototype)
-
- Joose.O.extend(Joose.Proto.Class.prototype, bootstrap)
-
- Joose.Proto.Class.prototype.meta = new Joose.Proto.Class('Joose.Proto.Class', bootstrap)
-
-
-
- Joose.Proto.Class.meta.addMethod('isa', function (someClass) {
- var f = function () {}
-
- f.prototype = this.c.prototype
-
- return new f() instanceof someClass
- })
-})();
-Joose.Managed = function () { throw "Modules may not be instantiated." }
-
-Joose.Managed.Property = new Joose.Proto.Class('Joose.Managed.Property', {
-
- name : null,
-
- init : null,
- value : null,
-
- definedIn : null,
-
-
- initialize : function (props) {
- Joose.Managed.Property.superClass.initialize.call(this, props)
-
- this.computeValue()
- },
-
-
- computeValue : function () {
- this.value = this.init
- },
-
-
- //targetClass is still open at this stage
- preApply : function (targetClass) {
- },
-
-
- //targetClass is already open at this stage
- postUnApply : function (targetClass) {
- },
-
-
- apply : function (target) {
- target[this.name] = this.value
- },
-
-
- isAppliedTo : function (target) {
- return target[this.name] == this.value
- },
-
-
- unapply : function (from) {
- if (!this.isAppliedTo(from)) throw "Unapply of property [" + this.name + "] from [" + from + "] failed"
-
- delete from[this.name]
- },
-
-
- cloneProps : function () {
- return {
- name : this.name,
- init : this.init,
- definedIn : this.definedIn
- }
- },
-
-
- clone : function (name) {
- var props = this.cloneProps()
-
- props.name = name || props.name
-
- return new this.constructor(props)
- }
-
-
-}).c;
-Joose.Managed.Property.ConflictMarker = new Joose.Proto.Class('Joose.Managed.Property.ConflictMarker', {
-
- isa : Joose.Managed.Property,
-
- apply : function (target) {
- throw "Attempt to apply ConflictMarker [" + this.name + "] to [" + target + "]"
- }
-
-}).c;
-Joose.Managed.Property.Requirement = new Joose.Proto.Class('Joose.Managed.Property.Requirement', {
-
- isa : Joose.Managed.Property,
-
-
- apply : function (target) {
- if (!target.meta.hasMethod(this.name)) throw "Requirement [" + this.name + "], defined in [" + this.definedIn.definedIn.name + "] is not satisfied for class [" + target + "]"
- },
-
-
- unapply : function (from) {
- }
-
-}).c;
-Joose.Managed.Property.Attribute = new Joose.Proto.Class('Joose.Managed.Property.Attribute', {
-
- isa : Joose.Managed.Property,
-
- slot : null,
-
-
- initialize : function () {
- Joose.Managed.Property.Attribute.superClass.initialize.apply(this, arguments)
-
- this.slot = this.name
- },
-
-
- apply : function (target) {
- target.prototype[this.slot] = this.value
- },
-
-
- isAppliedTo : function (target) {
- return target.prototype[this.slot] == this.value
- },
-
-
- unapply : function (from) {
- if (!this.isAppliedTo(from)) throw "Unapply of property [" + this.name + "] from [" + from + "] failed"
-
- delete from.prototype[this.slot]
- },
-
-
- getRawValueFrom : function (instance) {
- return instance[this.slot]
- },
-
-
- setRawValueTo : function (instance, value) {
- instance[this.slot] = value
- }
-
-}).c;
-Joose.Managed.Property.MethodModifier = new Joose.Proto.Class('Joose.Managed.Property.MethodModifier', {
-
- isa : Joose.Managed.Property,
-
-
- prepareWrapper : function () {
- throw "Abstract method [prepareWrapper] of " + this + " was called"
- },
-
-
- apply : function (target) {
- var name = this.name
- var targetProto = target.prototype
- var isOwn = targetProto.hasOwnProperty(name)
- var original = targetProto[name]
- var superProto = target.meta.superClass.prototype
-
-
- var originalCall = isOwn ? original : function () {
- return superProto[name].apply(this, arguments)
- }
-
- var methodWrapper = this.prepareWrapper({
- name : name,
- modifier : this.value,
-
- isOwn : isOwn,
- originalCall : originalCall,
-
- superProto : superProto,
-
- target : target
- })
-
- if (isOwn) methodWrapper._original = original
- methodWrapper._contain = this.value
-
- targetProto[name] = methodWrapper
- },
-
-
- isAppliedTo : function (target) {
- var targetCont = target.prototype[this.name]
-
- return targetCont && targetCont._contain == this.value
- },
-
-
- unapply : function (from) {
- var name = this.name
- var fromProto = from.prototype
- var original = fromProto[name]._original
-
- if (!this.isAppliedTo(from)) throw "Unapply of method [" + name + "] from class [" + from + "] failed"
-
- //if modifier was applied to own method - restore it
- if (original)
- fromProto[name] = original
- //otherwise - just delete it, to reveal the inherited method
- else
- delete fromProto[name]
- }
-
-}).c;
-Joose.Managed.Property.MethodModifier.Override = new Joose.Proto.Class('Joose.Managed.Property.MethodModifier.Override', {
-
- isa : Joose.Managed.Property.MethodModifier,
-
-
- prepareWrapper : function (params) {
-
- var modifier = params.modifier
- var originalCall = params.originalCall
- var superProto = params.superProto
- var superMetaConst = superProto.meta.constructor
-
- //call to Joose.Proto level, require some additional processing
- var isCallToProto = (superMetaConst == Joose.Proto.Class || superMetaConst == Joose.Proto.Object) && !(params.isOwn && originalCall.IS_OVERRIDE)
-
- var original = originalCall
-
- if (isCallToProto) original = function () {
- var beforeSUPER = this.SUPER
-
- this.SUPER = superProto.SUPER
-
- var res = originalCall.apply(this, arguments)
-
- this.SUPER = beforeSUPER
-
- return res
- }
-
- var override = function () {
-
- var beforeSUPER = this.SUPER
-
- this.SUPER = original
-
- var res = modifier.apply(this, arguments)
-
- this.SUPER = beforeSUPER
-
- return res
- }
-
- override.IS_OVERRIDE = true
-
- return override
- }
-
-
-}).c;
-Joose.Managed.Property.MethodModifier.Put = new Joose.Proto.Class('Joose.Managed.Property.MethodModifier.Put', {
-
- isa : Joose.Managed.Property.MethodModifier.Override,
-
-
- prepareWrapper : function (params) {
-
- if (params.isOwn) throw "Method [" + params.name + "] is applying over something [" + params.originalCall + "] in class [" + params.target + "]"
-
- return Joose.Managed.Property.MethodModifier.Put.superClass.prepareWrapper.call(this, params)
- }
-
-
-}).c;
-Joose.Managed.Property.MethodModifier.After = new Joose.Proto.Class('Joose.Managed.Property.MethodModifier.After', {
-
- isa : Joose.Managed.Property.MethodModifier,
-
-
- prepareWrapper : function (params) {
-
- var modifier = params.modifier
- var originalCall = params.originalCall
-
- return function () {
- var res = originalCall.apply(this, arguments)
- modifier.apply(this, arguments)
- return res
- }
- }
-
-
-}).c;
-Joose.Managed.Property.MethodModifier.Before = new Joose.Proto.Class('Joose.Managed.Property.MethodModifier.Before', {
-
- isa : Joose.Managed.Property.MethodModifier,
-
-
- prepareWrapper : function (params) {
-
- var modifier = params.modifier
- var originalCall = params.originalCall
-
- return function () {
- modifier.apply(this, arguments)
- return originalCall.apply(this, arguments)
- }
- }
-
-}).c;
-Joose.Managed.Property.MethodModifier.Around = new Joose.Proto.Class('Joose.Managed.Property.MethodModifier.Around', {
-
- isa : Joose.Managed.Property.MethodModifier,
-
- prepareWrapper : function (params) {
-
- var modifier = params.modifier
- var originalCall = params.originalCall
-
- var me
-
- var bound = function () {
- return originalCall.apply(me, arguments)
- }
-
- return function () {
- me = this
-
- var boundArr = [ bound ]
- boundArr.push.apply(boundArr, arguments)
-
- return modifier.apply(this, boundArr)
- }
- }
-
-}).c;
-Joose.Managed.Property.MethodModifier.Augment = new Joose.Proto.Class('Joose.Managed.Property.MethodModifier.Augment', {
-
- isa : Joose.Managed.Property.MethodModifier,
-
-
- prepareWrapper : function (params) {
-
- var AUGMENT = function () {
-
- //populate callstack to the most deep non-augment method
- var callstack = []
-
- var self = AUGMENT
-
- do {
- callstack.push(self.IS_AUGMENT ? self._contain : self)
-
- self = self.IS_AUGMENT && (self._original || self.SUPER[self.methodName])
- } while (self)
-
-
- //save previous INNER
- var beforeINNER = this.INNER
-
- //create new INNER
- this.INNER = function () {
- var innerCall = callstack.pop()
-
- return innerCall ? innerCall.apply(this, arguments) : undefined
- }
-
- //augment modifier results in hypotetical INNER call of the same method in subclass
- var res = this.INNER.apply(this, arguments)
-
- //restore previous INNER chain
- this.INNER = beforeINNER
-
- return res
- }
-
- AUGMENT.methodName = params.name
- AUGMENT.SUPER = params.superProto
- AUGMENT.IS_AUGMENT = true
-
- return AUGMENT
- }
-
-}).c;
-Joose.Managed.PropertySet = new Joose.Proto.Class('Joose.Managed.PropertySet', {
-
- isa : Joose.Managed.Property,
-
- properties : null,
-
- propertyMetaClass : Joose.Managed.Property,
-
-
- initialize : function (props) {
- Joose.Managed.PropertySet.superClass.initialize.call(this, props)
-
- //XXX this guards the meta roles :)
- this.properties = props.properties || {}
- },
-
-
- addProperty : function (name, props) {
- var metaClass = props.meta || this.propertyMetaClass
- delete props.meta
-
- props.definedIn = this
- props.name = name
-
- return this.properties[name] = new metaClass(props)
- },
-
-
- addPropertyObject : function (object) {
- return this.properties[object.name] = object
- },
-
-
- removeProperty : function (name) {
- var prop = this.properties[name]
-
- delete this.properties[name]
-
- return prop
- },
-
-
- haveProperty : function (name) {
- return this.properties[name] != null
- },
-
-
- haveOwnProperty : function (name) {
- return this.haveProperty(name) && this.properties.hasOwnProperty(name)
- },
-
-
- getProperty : function (name) {
- return this.properties[name]
- },
-
-
- //includes inherited properties (probably you wants 'eachOwn', which process only "own" (including consumed from Roles) properties)
- each : function (func, scope) {
- scope = scope || this
-
- Joose.O.each(this.properties, function (property, name) {
- func.call(scope, property, name)
- })
- },
-
-
- eachOwn : function (func, scope) {
- scope = scope || this
-
- Joose.O.eachOwn(this.properties, function (property, name) {
- func.call(scope, property, name)
- })
- },
-
-
- eachAll : function (func, scope) {
- this.each(func, scope)
- },
-
-
- cloneProps : function () {
- var props = Joose.Managed.PropertySet.superClass.cloneProps.call(this)
-
- props.propertyMetaClass = this.propertyMetaClass
-
- return props
- },
-
-
- clone : function (name) {
- var clone = this.cleanClone(name)
-
- clone.properties = Joose.O.copyOwn(this.properties)
-
- return clone
- },
-
-
- cleanClone : function (name) {
- var props = this.cloneProps()
-
- props.name = name || props.name
-
- return new this.constructor(props)
- },
-
-
- alias : function (what) {
- var props = this.properties
-
- Joose.O.each(what, function (aliasName, originalName) {
- var original = props[originalName]
-
- if (original) this.addPropertyObject(original.clone(aliasName))
- }, this)
- },
-
-
- exclude : function (what) {
- var props = this.properties
-
- Joose.A.each(what, function (name) {
- delete props[name]
- })
- },
-
-
- flattenTo : function (target) {
- var targetProps = target.properties
-
- this.eachOwn(function (property, name) {
- var targetProperty = targetProps[name]
-
- if (targetProperty instanceof Joose.Managed.Property.ConflictMarker) return
-
- if (targetProperty == null) {
- target.addPropertyObject(property)
- return
- }
-
- if (targetProperty == property) return
-
- target.removeProperty(name)
- target.addProperty(name, {
- meta : Joose.Managed.Property.ConflictMarker
- })
- }, this)
- },
-
-
- composeTo : function (target) {
- this.eachOwn(function (property, name) {
- if (!target.haveOwnProperty(name)) target.addPropertyObject(property)
- })
- },
-
-
- composeFrom : function () {
- if (!arguments.length) return
-
- var flattening = this.cleanClone()
-
- Joose.A.each(arguments, function (arg) {
- var propSet = arg
-
- if (!(arg instanceof Joose.Managed.PropertySet)) {
- propSet = arg.propertySet
-
- if (arg.alias || arg.exclude) propSet = propSet.clone()
- if (arg.alias) propSet.alias(arg.alias)
- if (arg.exclude) propSet.exclude(arg.exclude)
- }
-
- propSet.flattenTo(flattening)
- })
-
- flattening.composeTo(this)
- },
-
-
- preApply : function (target) {
- this.eachOwn(function (property) {
- property.preApply(target)
- })
- },
-
-
- apply : function (target) {
- this.eachOwn(function (property) {
- property.apply(target)
- })
- },
-
-
- unapply : function (from) {
- this.eachOwn(function (property) {
- property.unapply(from)
- })
- },
-
-
- postUnApply : function (target) {
- this.eachOwn(function (property) {
- property.postUnApply(target)
- })
- }
-
-}).c
-;
-(function () {
-
- var __ID__ = 1
-
-
- Joose.Managed.PropertySet.Mutable = new Joose.Proto.Class('Joose.Managed.PropertySet.Mutable', {
-
- isa : Joose.Managed.PropertySet,
-
- ID : null,
-
- derivatives : null,
-
- opened : null,
-
- composedFrom : null,
-
-
- initialize : function (props) {
- Joose.Managed.PropertySet.Mutable.superClass.initialize.call(this, props)
-
- //initially opened
- this.opened = 1
- this.derivatives = {}
- this.ID = __ID__++
- this.composedFrom = []
- },
-
-
- setComposeInfo : function () {
- this.ensureOpen()
-
- Joose.A.each(this.composedFrom, function (arg) {
- var propSet = arg instanceof Joose.Managed.PropertySet ? arg : arg.propertySet
-
- delete propSet.derivatives[this.ID]
- }, this)
-
- this.composedFrom = []
-
- this.addComposeInfo.apply(this, arguments)
- },
-
-
- addComposeInfo : function () {
- this.ensureOpen()
-
- Joose.A.each(arguments, function (arg) {
- this.composedFrom.push(arg)
-
- var propSet = arg instanceof Joose.Managed.PropertySet ? arg : arg.propertySet
-
- propSet.derivatives[this.ID] = this
- }, this)
- },
-
-
- removeComposeInfo : function () {
- this.ensureOpen()
-
- Joose.A.each(arguments, function (arg) {
-
- var i = 0
-
- while (i < this.composedFrom.length) {
- var propSet = this.composedFrom[i]
- propSet = propSet instanceof Joose.Managed.PropertySet ? propSet : propSet.propertySet
-
- if (arg == propSet) {
- delete propSet.derivatives[this.ID]
- this.composedFrom.splice(i, 1)
- } else i++
- }
-
- }, this)
- },
-
-
- ensureOpen : function () {
- if (!this.opened) throw "Mutation of closed property set: [" + this.name + "]"
- },
-
-
- addProperty : function (name, props) {
- this.ensureOpen()
-
- return Joose.Managed.PropertySet.Mutable.superClass.addProperty.call(this, name, props)
- },
-
-
- addPropertyObject : function (object) {
- this.ensureOpen()
-
- return Joose.Managed.PropertySet.Mutable.superClass.addPropertyObject.call(this, object)
- },
-
-
- removeProperty : function (name) {
- this.ensureOpen()
-
- return Joose.Managed.PropertySet.Mutable.superClass.removeProperty.call(this, name)
- },
-
-
- composeFrom : function () {
- this.ensureOpen()
-
- return Joose.Managed.PropertySet.Mutable.superClass.composeFrom.apply(this, this.composedFrom)
- },
-
-
- open : function () {
- this.opened++
-
- if (this.opened == 1) {
-
- Joose.O.each(this.derivatives, function (propSet) {
- propSet.open()
- })
-
- this.deCompose()
- }
- },
-
-
- close : function () {
- if (!this.opened) throw "Unmatched 'close' operation on property set: [" + this.name + "]"
-
- if (this.opened == 1) {
- this.reCompose()
-
- Joose.O.each(this.derivatives, function (propSet) {
- propSet.close()
- })
- }
- this.opened--
- },
-
-
- reCompose : function () {
- this.composeFrom()
- },
-
-
- deCompose : function () {
- this.eachOwn(function (property, name) {
- if (property.definedIn != this) this.removeProperty(name)
- }, this)
- }
-
- }).c
-
-
-})()
-
-;
-Joose.Managed.StemElement = function () { throw "Modules may not be instantiated." }
-
-Joose.Managed.StemElement.Attributes = new Joose.Proto.Class('Joose.Managed.StemElement.Attributes', {
-
- isa : Joose.Managed.PropertySet.Mutable,
-
- propertyMetaClass : Joose.Managed.Property.Attribute
-
-}).c
-;
-Joose.Managed.StemElement.Methods = new Joose.Proto.Class('Joose.Managed.StemElement.Methods', {
-
- isa : Joose.Managed.PropertySet.Mutable,
-
- propertyMetaClass : Joose.Managed.Property.MethodModifier.Put,
-
-
- preApply : function () {
- },
-
-
- postUnApply : function () {
- }
-
-}).c;
-Joose.Managed.StemElement.Requirements = new Joose.Proto.Class('Joose.Managed.StemElement.Requirements', {
-
- isa : Joose.Managed.PropertySet.Mutable,
-
- propertyMetaClass : Joose.Managed.Property.Requirement,
-
-
-
- alias : function () {
- },
-
-
- exclude : function () {
- },
-
-
- flattenTo : function (target) {
- this.each(function (property, name) {
- if (!target.haveProperty(name)) target.addPropertyObject(property)
- })
- },
-
-
- composeTo : function (target) {
- this.flattenTo(target)
- },
-
-
- preApply : function (target) {
- },
-
-
- postUnApply : function () {
- }
-
-}).c;
-Joose.Managed.StemElement.MethodModifiers = new Joose.Proto.Class('Joose.Managed.StemElement.MethodModifiers', {
-
- isa : Joose.Managed.PropertySet.Mutable,
-
- propertyMetaClass : null,
-
-
- addProperty : function (name, props) {
- var metaClass = props.meta
- delete props.meta
-
- props.definedIn = this
- props.name = name
- var modifier = new metaClass(props)
-
- if (!this.properties[name]) this.properties[name] = []
- this.properties[name].push(modifier)
-
- return modifier
- },
-
-
- addPropertyObject : function (object) {
- var name = object.name
-
- if (!this.properties[name]) this.properties[name] = []
-
- this.properties[name].push(object)
-
- return object
- },
-
-
- //remove only the last modifier
- removeProperty : function (name) {
- if (!this.haveProperty(name)) return undefined
-
- var modifier = this.properties[name].pop()
-
- //if all modifiers were removed - clearing the properties
- if (!this.properties[name].length) Joose.Managed.StemElement.MethodModifiers.superClass.removeProperty.call(this, name)
-
- return modifier
- },
-
-
- alias : function () {
- },
-
-
- exclude : function () {
- },
-
-
- flattenTo : function (target) {
- var targetProps = target.properties
-
- this.each(function (modifiersArr, name) {
- var targetModifiersArr = targetProps[name]
-
- if (targetModifiersArr == null) targetModifiersArr = targetProps[name] = []
-
- Joose.A.each(modifiersArr, function (modifier) {
- if (!Joose.A.exists(targetModifiersArr, modifier)) targetModifiersArr.push(modifier)
- })
-
- }, this)
- },
-
-
- composeTo : function (target) {
- this.flattenTo(target)
- },
-
-
- deCompose : function () {
- this.each(function (modifiersArr, name) {
- var i = 0
- while (i < modifiersArr.length) if (modifiersArr[i].definedIn != this) modifiersArr.splice(i, 1); else i++
-
- }, this)
- },
-
-
- preApply : function (target) {
- },
-
-
- postUnApply : function (target) {
- },
-
-
- apply : function (target) {
- this.each(function (modifiersArr, name) {
- Joose.A.each(modifiersArr, function (modifier) {
- modifier.apply(target)
- })
- })
- },
-
-
- unapply : function (from) {
- this.each(function (modifiersArr, name) {
- for (var i = modifiersArr.length - 1; i >=0 ; i--) modifiersArr[i].unapply(from)
- })
- }
-
-
-
-}).c;
-Joose.Managed.PropertySet.Composition = new Joose.Proto.Class('Joose.Managed.PropertySet.Composition', {
-
- isa : Joose.Managed.PropertySet.Mutable,
-
- propertyMetaClass : Joose.Managed.PropertySet.Mutable,
-
- processOrder : null,
-
-
- each : function (func, scope) {
- var props = this.properties
-
- Joose.A.each(this.processOrder, function (name) {
- func.call(scope || this, props[name], name)
- }, this)
- },
-
-
- eachR : function (func, scope) {
- var props = this.properties
-
- for(var i = this.processOrder.length - 1; i >= 0; i--)
- func.call(scope || this, props[this.processOrder[i]], this.processOrder[i])
- },
-
-
- clone : function (name) {
- var clone = this.cleanClone(name)
-
- this.each(function (property) {
- clone.addPropertyObject(property.clone())
- })
-
- return clone
- },
-
-
- alias : function (what) {
- this.each(function (property) {
- property.alias(what)
- })
- },
-
-
- exclude : function (what) {
- this.each(function (property) {
- property.exclude(what)
- })
- },
-
-
- flattenTo : function (target) {
- var targetProps = target.properties
-
- this.each(function (property, name) {
- var subTarget = targetProps[name] || target.addProperty(name, {
- meta : property.constructor
- })
-
- property.flattenTo(subTarget)
- })
- },
-
-
- composeTo : function (target) {
- var targetProps = target.properties
-
- this.each(function (property, name) {
- var subTarget = targetProps[name] || target.addProperty(name, {
- meta : property.constructor
- })
-
- property.composeTo(subTarget)
- })
- },
-
-
-
- deCompose : function () {
- this.eachR(function (property) {
- property.open()
- })
-
- Joose.Managed.PropertySet.Composition.superClass.deCompose.call(this)
- },
-
-
- reCompose : function () {
- Joose.Managed.PropertySet.Composition.superClass.reCompose.call(this)
-
- this.each(function (property) {
- property.close()
- })
- },
-
-
- unapply : function (from) {
- this.eachR(function (property) {
- property.unapply(from)
- })
- }
-
-}).c
-;
-Joose.Managed.Stem = new Joose.Proto.Class('Joose.Managed.Stem', {
-
- isa : Joose.Managed.PropertySet.Composition,
-
- targetMeta : null,
-
- attributesMC : Joose.Managed.StemElement.Attributes,
- methodsMC : Joose.Managed.StemElement.Methods,
- requirementsMC : Joose.Managed.StemElement.Requirements,
- methodsModifiersMC : Joose.Managed.StemElement.MethodModifiers,
-
- processOrder : [ 'attributes', 'methods', 'requirements', 'methodsModifiers' ],
-
-
- initialize : function (props) {
- Joose.Managed.Stem.superClass.initialize.call(this, props)
-
- var targetMeta = this.targetMeta
-
- this.addProperty('attributes', {
- meta : this.attributesMC,
-
- //it can be no 'targetMeta' in clones
- properties : targetMeta ? targetMeta.attributes : {}
- })
-
-
- this.addProperty('methods', {
- meta : this.methodsMC,
-
- properties : targetMeta ? targetMeta.methods : {}
- })
-
-
- this.addProperty('requirements', {
- meta : this.requirementsMC
- })
-
-
- this.addProperty('methodsModifiers', {
- meta : this.methodsModifiersMC
- })
- },
-
-
- reCompose : function () {
- this.preApply(this.targetMeta.c)
-
- Joose.Managed.Stem.superClass.reCompose.call(this)
-
- this.apply(this.targetMeta.c)
- },
-
-
- deCompose : function () {
- this.unapply(this.targetMeta.c)
-
- Joose.Managed.Stem.superClass.deCompose.call(this)
-
- this.postUnApply(this.targetMeta.c)
- }
-
-
-}).c
-;
-Joose.Managed.Builder = new Joose.Proto.Class('Joose.Managed.Builder', {
-
- targetMeta : null,
-
-
- _buildStart : function (targetMeta, props) {
- targetMeta.stem.open()
-
- Joose.A.each([ 'trait', 'traits', 'removeTrait', 'removeTraits', 'does', 'doesnot', 'doesnt' ], function (builder) {
- if (props[builder]) {
- this[builder](targetMeta, props[builder])
- delete props[builder]
- }
- }, this)
- },
-
-
- _extend : function (props) {
- if (Joose.O.isEmpty(props)) return
-
- var targetMeta = this.targetMeta
-
- this._buildStart(targetMeta, props)
-
- Joose.O.eachOwn(props, function (value, name) {
- var handler = this[name]
-
- if (!handler) throw "Unknow builder [" + name + "] was used during extending of [" + targetMeta.c + "]"