From 682eff7f518ec9568d079165709483df4267d4b7 Mon Sep 17 00:00:00 2001 From: ZitRo Date: Fri, 15 May 2015 10:55:06 +0300 Subject: [PATCH 1/2] fixed weird bug with rendering some packages, probably this bug live in %CSP.REST --- cache/projectTemplate.xml | 17 +++++++++-------- package.json | 2 +- web/js/Source.js | 6 +++--- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/cache/projectTemplate.xml b/cache/projectTemplate.xml index 1875c87..5b9b97f 100644 --- a/cache/projectTemplate.xml +++ b/cache/projectTemplate.xml @@ -302,7 +302,7 @@ Returns structured package data - + @@ -315,7 +315,7 @@ Returns structured package data REST interface for UMLExplorer %CSP.REST -63685,85586.177035 +63687,39024.811955 63648,30450.187229 @@ -327,9 +327,9 @@ REST interface for UMLExplorer - - - + + + ]]> @@ -349,9 +349,9 @@ Method returns whole class tree visible in the current namespace. Returns classTree by given class name 1 -className:%String %Status Returns all package class trees by given package name 1 -packageName:%String %Status Returns method description and code 1 -className:%String,methodName:%String %Status Date: Sun, 24 May 2015 18:25:23 +0300 Subject: [PATCH 2/2] simplified installation - just import & use! --- README.md | 26 +++++++++------ cache/projectTemplate.xml | 68 +++++++++++++++++++++++++++++++++++++-- gulpfile.js | 14 +++++--- package.json | 2 +- 4 files changed, 92 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 5f35adb..c21788c 100644 --- a/README.md +++ b/README.md @@ -15,19 +15,25 @@ An UML Class explorer for InterSystems Caché. ## Installation -To install Caché UML Explorer, you need to import UMLExplorer package to Caché and then set up a WEB-application. +To install latests Caché UML Explorer, you just need to import UMLExplorer package. Download the +archive from [latest releases](https://github.com/ZitRos/CacheUMLExplorer/releases), and then import +Cache/CacheUMLExplorer-vX.X.X.xml file. -###### Import classes to Caché -To install Caché UML class explorer, download the [latest release](https://github.com/ZitRos/CacheUMLExplorer/releases) or build project by yourself. Then import XML file inside Cache directory of archive or directory. +###### Web application +Note that importing UMLExplorer.WebAppInstaller class will also create a /UMLExplorer application. +If you want to create WEB application manually, please, do not import this class. Anyway, +importing this class requires %SYS permission. -###### Set up WEB application -When you have imported and compiled UMLExplorer package in Caché, make sure the namespace is the same you have imported classes to. Then go to system management portal -> administering -> security -> applications -> web applications and create there a new web application. Fill the name field of it with /UMLExplorer (slash is required) and set the value of dispatch class to UMLExplorer.Router. Click save. Now your WEB application is ready. - -###### Use it -Visit [server domain and port]/UMLExplorer/ (with slash at end) to enter application. +## Usage +Visit [server domain and port]/UMLExplorer/ (slash at end required) to enter +application. ## Build -To build project, you need [NodeJS](https://nodejs.org) platform to be installed. Then, clone source code and run npm install from the root of the project. This will install all necessary modules from NPM. Also run npm install -g gulp if you have no gulp builder in your modules. +To build project, you need [NodeJS](https://nodejs.org) platform to be installed. Then, clone source +code and run npm install from the root of the project. This will install all necessary +modules from NPM. Also run npm install -g gulp if you have no gulp builder in your +modules. -After that and each next time just run gulp command from the project root. This will generate build directory, where you will found all what you need. +After that and each next time just run gulp command from the project root. This will +generate build directory, where you will found all what you need. diff --git a/cache/projectTemplate.xml b/cache/projectTemplate.xml index 5b9b97f..32ca9fb 100644 --- a/cache/projectTemplate.xml +++ b/cache/projectTemplate.xml @@ -2,8 +2,9 @@ +Cache UML Explorer vX.X.X/*build.replace:pkg.version*/ Class contains methods that return structured classes/packages data. -63686,85630.818189 +63690,48954.853237 63653,67019.989197 @@ -302,11 +303,74 @@ Returns structured package data - + +%Projection.AbstractProjection +63696,65168.289869 +63696,64041.85537 + + +WebAppInstaller + + + + +This method is invoked when a class is compiled. +1 + +%Status + + + + + +This method is invoked when a class is 'uncompiled'. +1 + +%Status + + + + + + + diff --git a/gulpfile.js b/gulpfile.js index 0db6fbd..b2b3a26 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -28,6 +28,13 @@ var banner = [ "" ].join("\n"); +var specialReplace = function () { + return replace(/[^\s]+\/\*build\.replace:(.*)\*\//g, function (part, match) { + var s = match.toString(); + return s.replace(/pkg\.([a-zA-Z]+)/g, function (p,a) { return pkg[a]; }); + }); +}; + gulp.task("clean", function () { return gulp.src("build", {read: false}) .pipe(clean()); @@ -60,10 +67,7 @@ gulp.task("gatherLibs", ["clean"], function () { gulp.task("gatherScripts", ["clean", "gatherLibs"], function () { return gulp.src("web/js/*.js") .pipe(concat("CacheUMLExplorer.js")) - .pipe(replace(/[^\s]+\/\*build\.replace:(.*)\*\//g, function (part, match) { - var s = match.toString(); - return s.replace(/pkg\.([a-zA-Z]+)/g, function (p,a) { return pkg[a]; }); - })) + .pipe(specialReplace()) .pipe(wrap("CacheUMLExplorer = (function(){<%= contents %> return CacheUMLExplorer;}());")) .pipe(uglify({ output: { @@ -111,7 +115,7 @@ gulp.task("exportCacheXML", [ "clean", "gatherCSS", "gatherScripts", "addHTMLFile", "copyLICENSE", "copyREADME" ], function () { return gulp.src("cache/projectTemplate.xml") - .pipe(replace(/\{\{replace:HTML}}/, fs.readFileSync("build/web/index.html", "utf-8"))) + .pipe(specialReplace()) .pipe(replace( /\{\{replace:css}}/, function () { return fs.readFileSync("build/web/css/CacheUMLExplorer.css", "utf-8"); } diff --git a/package.json b/package.json index 3cdeb1d..e34c48d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "CacheUMLExplorer", - "version": "0.9.3", + "version": "0.9.4", "description": "An UML Class explorer for InterSystems Caché", "directories": { "test": "test"