[OLINGO-541] Move the odatajs branch one directory up
Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/repo Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/commit/503b4417 Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/tree/503b4417 Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/diff/503b4417 Branch: refs/heads/master Commit: 503b44170c3c1c938fe7cc5ccb9bdb07b147e7b7 Parents: c8dd05d Author: Sven Kobler <[email protected]> Authored: Mon Feb 23 11:10:53 2015 +0100 Committer: Sven Kobler <[email protected]> Committed: Mon Feb 23 11:10:53 2015 +0100 ---------------------------------------------------------------------- .gitignore | 19 + DEPENDENCIES | 6 + Gruntfile.js | 161 ++ JSLib.csproj | 210 ++ JSLib.sln | 19 + LICENSE | 202 ++ NOTICE | 8 + README.md | 39 + Web.config | 53 + demo/scripts/.gitignore | 2 + demo/scripts/datajs_demo.js | 142 + demo/scripts/tools.js | 164 ++ demo/tester.html | 235 ++ grunt-config/banner.txt | 18 + grunt-config/custom-tasks/rat.js | 23 + grunt-config/custom-tasks/rat/.gitignore | 3 + .../custom-tasks/rat/extern-tools/info.md | 22 + grunt-config/custom-tasks/rat/package.json | 27 + grunt-config/custom-tasks/rat/readme.md | 23 + grunt-config/custom-tasks/rat/tasks/rat.js | 154 ++ grunt-config/custom-tasks/sign.js | 141 + grunt-config/custom-tasks/toBrowser.js | 23 + .../custom-tasks/toBrowser/toBrowser.js | 98 + .../custom-tasks/toBrowser/wrapper-tpl.js | 43 + grunt-config/nugetpack.nuspec | 27 + grunt-config/rat.js | 65 + grunt-config/release.js | 178 ++ grunt-config/sign.js | 61 + odatajs/.gitignore | 17 - odatajs/DEPENDENCIES | 6 - odatajs/Gruntfile.js | 161 -- odatajs/JSLib.csproj | 210 -- odatajs/JSLib.sln | 19 - odatajs/LICENSE | 202 -- odatajs/NOTICE | 8 - odatajs/README.md | 39 - odatajs/Web.config | 53 - odatajs/demo/scripts/.gitignore | 2 - odatajs/demo/scripts/datajs_demo.js | 142 - odatajs/demo/scripts/tools.js | 164 -- odatajs/demo/tester.html | 235 -- odatajs/grunt-config/banner.txt | 18 - odatajs/grunt-config/custom-tasks/rat.js | 23 - .../grunt-config/custom-tasks/rat/.gitignore | 3 - .../custom-tasks/rat/extern-tools/info.md | 22 - .../grunt-config/custom-tasks/rat/package.json | 27 - odatajs/grunt-config/custom-tasks/rat/readme.md | 23 - .../grunt-config/custom-tasks/rat/tasks/rat.js | 154 -- odatajs/grunt-config/custom-tasks/sign.js | 141 - odatajs/grunt-config/custom-tasks/toBrowser.js | 23 - .../custom-tasks/toBrowser/toBrowser.js | 98 - .../custom-tasks/toBrowser/wrapper-tpl.js | 43 - odatajs/grunt-config/nugetpack.nuspec | 27 - odatajs/grunt-config/rat.js | 65 - odatajs/grunt-config/release.js | 178 -- odatajs/grunt-config/sign.js | 61 - odatajs/package.json | 47 - odatajs/packages.config | 7 - odatajs/src/index-browser.js | 36 - odatajs/src/index-node.js | 47 - odatajs/src/index.js | 52 - odatajs/src/lib/cache.js | 1453 ---------- odatajs/src/lib/cache/source.js | 206 -- odatajs/src/lib/deferred.js | 189 -- odatajs/src/lib/odata.js | 178 -- odatajs/src/lib/odata/batch.js | 377 --- odatajs/src/lib/odata/handler.js | 284 -- odatajs/src/lib/odata/json.js | 917 ------- odatajs/src/lib/odata/metadata.js | 523 ---- odatajs/src/lib/odata/net-browser.js | 340 --- odatajs/src/lib/odata/net.js | 214 -- odatajs/src/lib/odata/odatautils.js | 1265 --------- odatajs/src/lib/store.js | 63 - odatajs/src/lib/store/dom.js | 330 --- odatajs/src/lib/store/indexeddb.js | 445 ---- odatajs/src/lib/store/memory.js | 246 -- odatajs/src/lib/utils.js | 582 ---- odatajs/src/lib/xml.js | 821 ------ odatajs/test/mocha.opts | 2 - odatajs/test/test-demo-scenario.js | 289 -- odatajs/test/test-odata-json.js | 435 --- odatajs/test/test-utils.js | 33 - odatajs/test/test.js | 36 - odatajs/tests/cache-tests.js | 1191 --------- odatajs/tests/code/ReflectionDataContext.cs | 743 ------ odatajs/tests/code/csdlreader.cs | 205 -- odatajs/tests/code/jsdate.cs | 59 - odatajs/tests/code/jsonobject.cs | 99 - odatajs/tests/code/readerutils.cs | 87 - odatajs/tests/common/CacheVerifier.js | 241 -- odatajs/tests/common/Instrument.js | 55 - odatajs/tests/common/Instrument.svc | 77 - odatajs/tests/common/ODataVerifyReader.svc | 114 - odatajs/tests/common/ObservableHttpClient.js | 84 - odatajs/tests/common/TestLogger.svc | 852 ------ odatajs/tests/common/TestSynchronizerClient.js | 229 -- odatajs/tests/common/common.js | 25 - odatajs/tests/common/djstest-browser.js | 150 -- odatajs/tests/common/djstest.js | 419 --- odatajs/tests/common/mockHttpClient.js | 137 - odatajs/tests/common/mockXMLHttpRequest.js | 213 -- odatajs/tests/common/odataVerifyReader.js | 201 -- odatajs/tests/common/rx.js | 26 - odatajs/tests/e2etest/Test.html | 66 - .../tests/endpoints/BasicAuthDataService.svc | 124 - odatajs/tests/endpoints/CustomAnnotations.xml | 121 - odatajs/tests/endpoints/CustomDataService.svc | 85 - odatajs/tests/endpoints/EpmDataService.svc | 336 --- odatajs/tests/endpoints/ErrorDataService.svc | 78 - .../tests/endpoints/FoodStoreDataServiceV4.svc | 590 ----- .../tests/endpoints/LargeCollectionService.svc | 113 - odatajs/tests/endpoints/web.config | 46 - odatajs/tests/node-test-setup.js | 30 - odatajs/tests/odata-batch-functional-tests.html | 49 - odatajs/tests/odata-batch-functional-tests.js | 291 -- odatajs/tests/odata-batch-tests.js | 559 ---- .../odata-cache-filter-functional-tests.html | 52 - .../odata-cache-filter-functional-tests.js | 431 --- odatajs/tests/odata-cache-fperf-tests.html | 50 - odatajs/tests/odata-cache-fperf-tests.js | 115 - odatajs/tests/odata-cache-functional-tests.html | 52 - odatajs/tests/odata-cache-functional-tests.js | 631 ----- .../tests/odata-cache-rx-functional-tests.html | 50 - .../tests/odata-cache-rx-functional-tests.js | 87 - odatajs/tests/odata-fuzz.html | 557 ---- odatajs/tests/odata-handler-tests.js | 364 --- odatajs/tests/odata-json-light-tests.js | 2492 ------------------ odatajs/tests/odata-json-parse-tests.html | 67 - odatajs/tests/odata-json-parse-tests.js | 110 - odatajs/tests/odata-json-tests.js | 986 ------- odatajs/tests/odata-links-functional-tests.html | 49 - odatajs/tests/odata-links-functional-tests.js | 274 -- ...ata-metadata-awareness-functional-tests.html | 48 - ...odata-metadata-awareness-functional-tests.js | 243 -- odatajs/tests/odata-metadata-tests.js | 499 ---- odatajs/tests/odata-net-tests.js | 301 --- odatajs/tests/odata-perf-tests.html | 50 - odatajs/tests/odata-perf-tests.js | 242 -- odatajs/tests/odata-qunit-tests.htm | 76 - ...odata-read-crossdomain-functional-tests.html | 49 - .../odata-read-crossdomain-functional-tests.js | 151 -- odatajs/tests/odata-read-functional-tests.html | 49 - odatajs/tests/odata-read-functional-tests.js | 594 ----- .../tests/odata-request-functional-tests.html | 49 - odatajs/tests/odata-request-functional-tests.js | 399 --- .../tests/odata-roundtrip-functional-tests.js | 389 --- odatajs/tests/odata-tests.js | 322 --- odatajs/tests/odata-xml-tests.js | 275 -- ...cache-large-collection-functional-tests.html | 53 - ...s-cache-large-collection-functional-tests.js | 187 -- .../tests/odatajs-cache-long-haul-tests.html | 194 -- odatajs/tests/odatajs-startup-perf-test.html | 109 - odatajs/tests/run-tests.wsf | 435 --- odatajs/tests/store-indexeddb-tests.js | 262 -- odatajs/tests/store-tests.js | 705 ----- odatajs/tests/test-list.js | 26 - odatajs/tests/test-manager.html | 108 - package.json | 47 + packages.config | 7 + src/index-browser.js | 36 + src/index-node.js | 47 + src/index.js | 52 + src/lib/cache.js | 1453 ++++++++++ src/lib/cache/source.js | 206 ++ src/lib/deferred.js | 189 ++ src/lib/odata.js | 178 ++ src/lib/odata/batch.js | 377 +++ src/lib/odata/handler.js | 284 ++ src/lib/odata/json.js | 917 +++++++ src/lib/odata/metadata.js | 523 ++++ src/lib/odata/net-browser.js | 340 +++ src/lib/odata/net.js | 214 ++ src/lib/odata/odatautils.js | 1265 +++++++++ src/lib/store.js | 63 + src/lib/store/dom.js | 330 +++ src/lib/store/indexeddb.js | 445 ++++ src/lib/store/memory.js | 246 ++ src/lib/utils.js | 582 ++++ src/lib/xml.js | 821 ++++++ test/mocha.opts | 2 + test/test-demo-scenario.js | 289 ++ test/test-odata-json.js | 435 +++ test/test-utils.js | 33 + test/test.js | 36 + tests/cache-tests.js | 1191 +++++++++ tests/code/ReflectionDataContext.cs | 743 ++++++ tests/code/csdlreader.cs | 205 ++ tests/code/jsdate.cs | 59 + tests/code/jsonobject.cs | 99 + tests/code/readerutils.cs | 87 + tests/common/CacheVerifier.js | 241 ++ tests/common/Instrument.js | 55 + tests/common/Instrument.svc | 77 + tests/common/ODataVerifyReader.svc | 114 + tests/common/ObservableHttpClient.js | 84 + tests/common/TestLogger.svc | 852 ++++++ tests/common/TestSynchronizerClient.js | 229 ++ tests/common/common.js | 25 + tests/common/djstest-browser.js | 150 ++ tests/common/djstest.js | 419 +++ tests/common/mockHttpClient.js | 137 + tests/common/mockXMLHttpRequest.js | 213 ++ tests/common/odataVerifyReader.js | 201 ++ tests/common/rx.js | 26 + tests/e2etest/Test.html | 66 + tests/endpoints/BasicAuthDataService.svc | 124 + tests/endpoints/CustomAnnotations.xml | 121 + tests/endpoints/CustomDataService.svc | 85 + tests/endpoints/EpmDataService.svc | 336 +++ tests/endpoints/ErrorDataService.svc | 78 + tests/endpoints/FoodStoreDataServiceV4.svc | 590 +++++ tests/endpoints/LargeCollectionService.svc | 113 + tests/endpoints/web.config | 46 + tests/node-test-setup.js | 30 + tests/odata-batch-functional-tests.html | 49 + tests/odata-batch-functional-tests.js | 291 ++ tests/odata-batch-tests.js | 559 ++++ tests/odata-cache-filter-functional-tests.html | 52 + tests/odata-cache-filter-functional-tests.js | 431 +++ tests/odata-cache-fperf-tests.html | 50 + tests/odata-cache-fperf-tests.js | 115 + tests/odata-cache-functional-tests.html | 52 + tests/odata-cache-functional-tests.js | 631 +++++ tests/odata-cache-rx-functional-tests.html | 50 + tests/odata-cache-rx-functional-tests.js | 87 + tests/odata-fuzz.html | 557 ++++ tests/odata-handler-tests.js | 364 +++ tests/odata-json-light-tests.js | 2492 ++++++++++++++++++ tests/odata-json-parse-tests.html | 67 + tests/odata-json-parse-tests.js | 110 + tests/odata-json-tests.js | 986 +++++++ tests/odata-links-functional-tests.html | 49 + tests/odata-links-functional-tests.js | 274 ++ ...ata-metadata-awareness-functional-tests.html | 48 + ...odata-metadata-awareness-functional-tests.js | 243 ++ tests/odata-metadata-tests.js | 499 ++++ tests/odata-net-tests.js | 301 +++ tests/odata-perf-tests.html | 50 + tests/odata-perf-tests.js | 242 ++ tests/odata-qunit-tests.htm | 76 + ...odata-read-crossdomain-functional-tests.html | 49 + .../odata-read-crossdomain-functional-tests.js | 151 ++ tests/odata-read-functional-tests.html | 49 + tests/odata-read-functional-tests.js | 594 +++++ tests/odata-request-functional-tests.html | 49 + tests/odata-request-functional-tests.js | 399 +++ tests/odata-roundtrip-functional-tests.js | 389 +++ tests/odata-tests.js | 322 +++ tests/odata-xml-tests.js | 275 ++ ...cache-large-collection-functional-tests.html | 53 + ...s-cache-large-collection-functional-tests.js | 187 ++ tests/odatajs-cache-long-haul-tests.html | 194 ++ tests/odatajs-startup-perf-test.html | 109 + tests/run-tests.wsf | 435 +++ tests/store-indexeddb-tests.js | 262 ++ tests/store-tests.js | 705 +++++ tests/test-list.js | 26 + tests/test-manager.html | 108 + 258 files changed, 31460 insertions(+), 31458 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/503b4417/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore index 1521c8b..703a43c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,20 @@ dist +.idea + +localgrunt.config + +# testing copies +../demo/scripts/odatajs-4.0.0-beta-01* + +# build artefacts +build/ + +# nodejs temporary objects +node_modules/ + +# C.net server temporary objects +bin/ +obj/ +packages/ +JSLib.suo +JSLib.csproj.user http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/503b4417/DEPENDENCIES ---------------------------------------------------------------------- diff --git a/DEPENDENCIES b/DEPENDENCIES new file mode 100644 index 0000000..a407380 --- /dev/null +++ b/DEPENDENCIES @@ -0,0 +1,6 @@ +// ------------------------------------------------------------------ +// Transitive dependencies of this project determined from the +// maven pom organized by organization. +// ------------------------------------------------------------------ + +Apache Olingo \ No newline at end of file http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/503b4417/Gruntfile.js ---------------------------------------------------------------------- diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..74a2a88 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,161 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +module.exports = function(grunt) { + 'use strict'; + var pkg = grunt.file.readJSON('package.json'); + + // Build artifact base name + //<%= pkg.name %>-<%= pkg.version %>-<%= pkg.postfix %>-<%= pkg.releaseCandidate %>' + var artifactname = pkg.name + '-' + pkg.version + + (pkg.postfix.length > 0 ? "-" : "") + pkg.postfix + + (pkg.releaseCandidate.length > 0 ? "-" : "") + pkg.releaseCandidate; + + //options + var init = { + pkg: pkg, + banner: grunt.file.read('grunt-config/banner.txt'), + artifactname : artifactname, + + "toBrowser" : { + "release" : { + options: { index : "src/index-browser.js" }, + src: ["src/lib/**/*.js", '!**/*-node.*'], + dest: "build/lib/<%= artifactname %>.js", + } + }, + "uglify": { // uglify and minify the lib + options: { + sourceMap : true, + sourceMapName : "build/lib/<%= artifactname %>.map", + sourceMapIncludeSources : true, + banner : "<%= banner %>", + }, + "browser": { + src: "build/lib/<%= artifactname %>.js", + dest: "build/lib/<%= artifactname %>.min.js" + } + }, + "jsdoc" : { + "src" : { + src: ["src/**/*.js"], + options: { destination: "build/doc-src", verbose : false } + }, + "test" : { + src: ["tests/**/*.js"], + options: { destination: "build/doc-test", verbose : false } + } + }, + "nugetpack" : { // create nuget pagckage + "dist": { + src: 'grunt-config/nugetpack.nuspec', + dest: 'build/' + } + }, + "copy" : { + "to-latest" : { + src :"build/lib/<%= artifactname %>.js", + dest: "build/lib/odatajs-latest.js" + } + }, + "npm-clean": { + options: {force: true}, + "build": { + src: [ "build"] + }, + }, + "curl": { + "license": { + src: { + url: "http://apache.org/licenses/LICENSE-2.0.txt", + proxy: "http://proxy:8080" + }, + dest: "LICENSE" + } + } + }; + + // Join local configuration for proxies and local test servers + if (grunt.file.exists('localgrunt.config')) { + console.log("merge localgrunt.config"); + var localGrundConfig = grunt.file.read('localgrunt.config'); + init.connect['test-browser'].proxies = init.connect['test-browser'].proxies.concat(JSON.parse(localGrundConfig).proxies); + } + + // Init config + grunt.initConfig(init); + + // Load tasks from npm modules ***/ + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks("grunt-contrib-copy"); + grunt.loadNpmTasks('grunt-contrib-compress'); + grunt.loadNpmTasks('grunt-curl'); + grunt.loadNpmTasks("grunt-jsdoc"); + grunt.loadNpmTasks("grunt-nuget"); + + // Load the custom-* tasks from the grunt-config directory + grunt.loadTasks('grunt-config/custom-tasks'); + + // Load the custom-* tasks from the grunt-config directory + grunt.loadTasks('grunt-config'); + + // rename some tasks to avoid name clashes with the user tasks + grunt.renameTask('clean','npm-clean'); + + grunt.registerTask('clearEnv', 'clear JAVA_TOOL_OPTIONS', function() { + process.env['JAVA_TOOL_OPTIONS'] = ''; + }); + + // E N D U S E R T A S K S + + grunt.registerTask('clean', ['npm-clean:build']); + + // Runs the license header check to verify the any source file contains a license header + grunt.registerTask('license-check', ['rat:manual']); + + // Create documentation in /build/doc + grunt.registerTask('doc', ['clearEnv', 'jsdoc:src']); + grunt.registerTask('doc-test', ['clearEnv', 'jsdoc:test']); + + //grunt.registerTask('test-browser', ['configureProxies:test-browser', 'connect:test-browser']); + //grunt.registerTask('test-node', ['node-qunit:default-tests']); + //grunt.registerTask('release', ['build','doc','compress']); + //grunt.registerTask('update-legal', ['curl:license']); + + // Build the odatajs library + grunt.registerTask('build', ['clean:lib','toBrowser:release', 'uglify:browser', 'copy:to-latest', 'nugetpack']); + + grunt.registerTask('get-licence', ['curl:license']); + + // R E L E A S E T A S K S + grunt.registerTask('release',[ + 'npm-clean:release-dist', + 'build', + 'doc', + 'copy:release-lib','copy:release-doc','copy:release-sources', + 'rat:dist', // check the license headers + 'compress:release-lib','compress:release-doc','compress:release-sources', + ]); + + + grunt.registerTask('release:sign',[ + 'sign:release','sign:asc','sign:asc-verify' + ]); + +}; + http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/503b4417/JSLib.csproj ---------------------------------------------------------------------- diff --git a/JSLib.csproj b/JSLib.csproj new file mode 100644 index 0000000..847691f --- /dev/null +++ b/JSLib.csproj @@ -0,0 +1,210 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */--> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion> + </ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{73ADF1A7-613B-4679-885B-2AE4AFAA9A6A}</ProjectGuid> + <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>JSLib</RootNamespace> + <AssemblyName>JSLib</AssemblyName> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <SccProjectName>SAK</SccProjectName> + <SccLocalPath>SAK</SccLocalPath> + <SccAuxPath>SAK</SccAuxPath> + <SccProvider>SAK</SccProvider> + <UseIISExpress>false</UseIISExpress> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Content Include="src\index.js" /> + <Content Include="src\banner.txt" /> + <Content Include="src\lib\cache.js" /> + <Content Include="src\lib\odatajs.js" /> + <Content Include="src\lib\odata.js" /> + <Content Include="src\lib\store.js" /> + <Content Include="src\lib\cache\source.js" /> + <Content Include="src\lib\odatajs\deferred.js" /> + <Content Include="src\lib\odatajs\utils.js" /> + <Content Include="src\lib\odatajs\xml.js" /> + <Content Include="src\lib\odata\batch.js" /> + <Content Include="src\lib\odata\handler.js" /> + <Content Include="src\lib\odata\json.js" /> + <Content Include="src\lib\odata\metadata.js" /> + <Content Include="src\lib\odata\net.js" /> + <Content Include="src\lib\odata\utils.js" /> + <Content Include="src\lib\store\dom.js" /> + <Content Include="src\lib\store\indexeddb.js" /> + <Content Include="src\lib\store\memory.js" /> + <Content Include="tests\cache-tests.js" /> + <Content Include="tests\common\CacheVerifier.js" /> + <Content Include="tests\common\common.js" /> + <Content Include="tests\common\Instrument.svc" /> + <Content Include="tests\common\Instrument.js" /> + <Content Include="tests\common\mockXMLHttpRequest.js" /> + <Content Include="tests\common\mockHttpClient.js" /> + <Content Include="tests\common\djstest.js" /> + <Content Include="tests\common\gpo-ie8-tour-disable.reg" /> + <Content Include="tests\common\ObservableHttpClient.js" /> + <Content Include="tests\common\ODataVerifyReader.js" /> + <Content Include="tests\common\ODataVerifyReader.svc" /> + <Content Include="tests\common\rx.js" /> + <Content Include="tests\common\TestLogger.svc" /> + <Content Include="tests\common\TestSynchronizerClient.js" /> + <Content Include="tests\e2etest\Test.html" /> + <Content Include="tests\odata-json-light-tests.js" /> + <Content Include="tests\odatajs-startup-perf-test.html" /> + <Content Include="tests\endpoints\BasicAuthDataService.svc" /> + <Content Include="tests\endpoints\FoodStoreDataServiceV4.svc" /> + <Content Include="tests\endpoints\CustomAnnotations.xml" /> + <Content Include="tests\endpoints\CustomDataService.svc" /> + <Content Include="tests\endpoints\EpmDataService.svc" /> + <Content Include="tests\endpoints\ErrorDataService.svc" /> + <Content Include="tests\endpoints\LargeCollectionService.svc" /> + <Content Include="tests\endpoints\web.config" /> + <Content Include="tests\odatajs-cache-large-collection-functional-tests.html" /> + <Content Include="tests\odatajs-cache-large-collection-functional-tests.js" /> + <Content Include="tests\odatajs-cache-long-haul-tests.html" /> + <Content Include="tests\odata-batch-functional-tests.html" /> + <Content Include="tests\odata-batch-functional-tests.js" /> + <Content Include="tests\odata-batch-tests.js" /> + <Content Include="tests\odata-cache-filter-functional-tests.html" /> + <Content Include="tests\odata-cache-filter-functional-tests.js" /> + <Content Include="tests\odata-cache-fperf-tests.html" /> + <Content Include="tests\odata-cache-fperf-tests.js" /> + <Content Include="tests\odata-cache-functional-tests.html" /> + <Content Include="tests\odata-cache-functional-tests.js" /> + <Content Include="tests\odata-cache-rx-functional-tests.html" /> + <Content Include="tests\odata-cache-rx-functional-tests.js" /> + <Content Include="tests\odata-fuzz.html" /> + <Content Include="tests\odata-metadata-tests.js" /> + <Content Include="tests\odata-handler-tests.js" /> + <Content Include="tests\odata-json-tests.js" /> + <Content Include="tests\odata-links-functional-tests.html" /> + <Content Include="tests\odata-links-functional-tests.js" /> + <Content Include="tests\odata-metadata-awareness-functional-tests.html" /> + <Content Include="tests\odata-metadata-awareness-functional-tests.js" /> + <Content Include="tests\odata-net-tests.js" /> + <Content Include="tests\odata-perf-tests.html" /> + <Content Include="tests\odata-perf-tests.js" /> + <Content Include="tests\odata-read-crossdomain-functional-tests.html" /> + <Content Include="tests\odata-read-crossdomain-functional-tests.js" /> + <Content Include="tests\odata-read-functional-tests.html" /> + <Content Include="tests\odata-request-functional-tests.html" /> + <Content Include="tests\odata-request-functional-tests.js" /> + <Content Include="tests\odata-read-functional-tests.js" /> + <Content Include="tests\odata-qunit-tests.htm" /> + <Content Include="tests\odata-tests.js" /> + <Content Include="tests\odata-xml-tests.js" /> + <Content Include="tests\run-tests.wsf" /> + <Content Include="tests\store-indexeddb-tests.js" /> + <Content Include="tests\store-tests.js" /> + <Content Include="tests\test-list.js" /> + <Content Include="tests\test-manager.html" /> + <!-- Configuration file for the web project. --> + <Content Include="Web.config"> + <SubType>Designer</SubType> + </Content> + </ItemGroup> + <ItemGroup> + <Compile Include="tests\code\CsdlReader.cs" /> + <Compile Include="tests\code\JsDate.cs" /> + <Compile Include="tests\code\JsonObject.cs" /> + <Compile Include="tests\code\ReaderUtils.cs" /> + <Compile Include="tests\code\ReflectionDataContext.cs" /> + </ItemGroup> + <ItemGroup> + <Content Include="packages.config" /> + </ItemGroup> + <ItemGroup> + <Reference Include="Microsoft.OData.Client, Version=6.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>packages\Microsoft.OData.Client.6.5.0\lib\net40\Microsoft.OData.Client.dll</HintPath> + </Reference> + <Reference Include="Microsoft.OData.Core, Version=6.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>packages\Microsoft.OData.Core.6.5.0\lib\portable-net40+sl5+wp8+win8+wpa\Microsoft.OData.Core.dll</HintPath> + </Reference> + <Reference Include="Microsoft.OData.Edm, Version=6.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>packages\Microsoft.OData.Edm.6.5.0\lib\portable-net40+sl5+wp8+win8+wpa\Microsoft.OData.Edm.dll</HintPath> + </Reference> + <Reference Include="Microsoft.OData.Service, Version=6.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>packages\Microsoft.OData.Service.6.5.0\lib\net40\Microsoft.OData.Service.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Spatial, Version=6.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>packages\Microsoft.Spatial.6.5.0\lib\portable-net40+sl5+wp8+win8+wpa\Microsoft.Spatial.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Net" /> + <Reference Include="System.Runtime.Serialization" /> + <Reference Include="System.ServiceModel" /> + <Reference Include="System.ServiceModel.Activation" /> + <Reference Include="System.ServiceModel.Web" /> + <Reference Include="System.Web.Extensions" /> + <Reference Include="System.Xml" /> + <Reference Include="System.Xml.Linq" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" /> + <ProjectExtensions> + <VisualStudio> + <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}"> + <WebProjectProperties> + <UseIIS>False</UseIIS> + <AutoAssignPort>True</AutoAssignPort> + <DevelopmentServerPort>4002</DevelopmentServerPort> + <DevelopmentServerVPath>/</DevelopmentServerVPath> + <IISUrl> + </IISUrl> + <NTLMAuthentication>False</NTLMAuthentication> + <UseCustomServer>False</UseCustomServer> + <CustomServerUrl> + </CustomServerUrl> + <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile> + </WebProjectProperties> + </FlavorProperties> + </VisualStudio> + </ProjectExtensions> +</Project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/503b4417/JSLib.sln ---------------------------------------------------------------------- diff --git a/JSLib.sln b/JSLib.sln new file mode 100644 index 0000000..61927d4 --- /dev/null +++ b/JSLib.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JSLib", "JSLib.csproj", "{73ADF1A7-613B-4679-885B-2AE4AFAA9A6A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {73ADF1A7-613B-4679-885B-2AE4AFAA9A6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {73ADF1A7-613B-4679-885B-2AE4AFAA9A6A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73ADF1A7-613B-4679-885B-2AE4AFAA9A6A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {73ADF1A7-613B-4679-885B-2AE4AFAA9A6A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/503b4417/LICENSE ---------------------------------------------------------------------- diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/503b4417/NOTICE ---------------------------------------------------------------------- diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..65d59ef --- /dev/null +++ b/NOTICE @@ -0,0 +1,8 @@ + +Apache Olingo +Copyright 2013-2014 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + + http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/503b4417/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md new file mode 100644 index 0000000..83d0f68 --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. + +------------------------- +## Olingo OData Client for JavaScript +The Olingo OData Client for JavaScript (odatajs) is a library written in JavaScript that enables browser based frontend applications to easily use the OData protocol for communication with application servers. + +This library "odatajs-4.0.0-beta-01.min.js" supports only the OData V4 protocol. + +For using the OData protocols V1-V3 please refer to the [datajs library](http://datajs.codeplex.com/) + +The odatajs library can be included in any html page with the script tag (for example) +``` +<script type="text/javascript" src="./sources/odatajs-4.0.0-beta-01.min.js"></script> +``` +and its features can be used through the `odatajs` namespace (or `window.odatajs`). The odatajs library can be used together with the datajs library which uses the `window.OData` namespace. + +For API documentation please see [ODatajs API documentation](http://olingo.apache.org/doc/javascript/apidoc/) + +You may also use the documentation and the samples from the [datajs library](http://datajs.codeplex.com/documentation) because the features and API are similar. + +## Contribute to Olingo OData Client for JavaScript +If you are interested to contribute to this library please have a look into [Project setup](http://olingo.apache.org/doc/javascript/project-setup.html) and [Build instructions](http://olingo.apache.org/doc/javascript/project-build.html) where you find a manual how you can download the source code and build the odatajs library. + +If you intend so please also join the [Olingo developers group](http://olingo.apache.org/support.html) for discussion. http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/503b4417/Web.config ---------------------------------------------------------------------- diff --git a/Web.config b/Web.config new file mode 100644 index 0000000..5441da1 --- /dev/null +++ b/Web.config @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */--> +<configuration> + <system.web> + <compilation debug="true" targetFramework="4.0"> + <assemblies> + <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> + <add assembly="System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> + <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> + <add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> + <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> + <add assembly="System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> + <add assembly="System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> + <add assembly="Microsoft.OData.Core, Version=6.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> + <add assembly="Microsoft.OData.Service, Version=6.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> + <add assembly="Microsoft.OData.Client, Version=6.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> + </assemblies> + </compilation> + </system.web> + <system.webServer> + <directoryBrowse enabled="true" /> + </system.webServer> + <system.codedom> + <compilers> + <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <providerOption name="CompilerVersion" value="v4.0" /> + </compiler> + </compilers> + </system.codedom> + <system.net> + <defaultProxy> + <proxy autoDetect="True" /> + </defaultProxy> + </system.net> +</configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/503b4417/demo/scripts/.gitignore ---------------------------------------------------------------------- diff --git a/demo/scripts/.gitignore b/demo/scripts/.gitignore new file mode 100644 index 0000000..f7f55d4 --- /dev/null +++ b/demo/scripts/.gitignore @@ -0,0 +1,2 @@ +datajs-2* +tmp/ http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/503b4417/demo/scripts/datajs_demo.js ---------------------------------------------------------------------- diff --git a/demo/scripts/datajs_demo.js b/demo/scripts/datajs_demo.js new file mode 100644 index 0000000..86e93ed --- /dev/null +++ b/demo/scripts/datajs_demo.js @@ -0,0 +1,142 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +var run = function() { + //testJQueryReadMetadata(); + runSimpleReadRequest(); + runSimpleReadRequestWithMetadata(); + // readWithJsonP(); + //alert(OData.odataRelatedLinksPrefix); + //OData.odataRelatedLinksPrefix = "dasfs"; + //alert(OData.odataRelatedLinksPrefix); + //var time = new Date("1992-08-06T00:00:00+01:00"); + //var jsonTime = {value : time}; + //var jsonstring = window.JSON.stringify(jsonTime); + //alert(jsonstring); + + //time.offset = 100; + //alert(time.offset); + //var offsite = time.getTimezoneOffset(); + //alert(offsite); +}; + +var runSimpleReadRequest = function() { + var oHeaders = { + 'Accept': 'application/json', + "Odata-Version": "4.0", + "OData-MaxVersion": "4.0" + }; + + var request = + { + headers: oHeaders, + // requestUri: "http://services.odata.org/OData/OData.svc/Categories", + requestUri: "http://odatasampleservices.azurewebsites.net/V4/OData/OData.svc/Categories", + data: null, + }; + var successFunction = function (data) { + document.getElementById("simpleRead").innerHTML = JSON.stringify(data, undefined, 2); + }; + var failFunction = function (err) { + alert("err"); + alert(JSON.stringify(err)); + }; + odatajs.oData.read(request, successFunction, failFunction); +}; + +var runSimpleReadRequestWithMetadata = function () { + var oHeaders = { + 'Accept': 'text/html,application/xhtml+xml,application/xml,application/json;odata.metadata=minimal', + "Odata-Version": "4.0", + "OData-MaxVersion": "4.0", + "Prefer": "odata.allow-entityreferences" + }; + + var readMetadataSuccess = function (metadata) { + document.getElementById("metadata").innerHTML = JSON.stringify(metadata, undefined, 2); + var request = + { + headers: oHeaders, + // requestUri: "http://services.odata.org/OData/OData.svc/Categories", + requestUri: "http://odatasampleservices.azurewebsites.net/V4/OData/OData.svc/Products", + data: null, + }; + var successFunction = function(data) { + document.getElementById("simpleReadWithMetadata").innerHTML = JSON.stringify(data, undefined, 2); + }; + var failFunction = function(err) { + alert("err"); + alert(JSON.stringify(err)); + }; + odatajs.oData.read(request, successFunction, failFunction, null, null, metadata); + }; + + var readMetadataFail = function (err) { + alert("err"); + alert(JSON.stringify(err)); + }; + + var metadataRequest = + { + headers: oHeaders, + // requestUri: "http://services.odata.org/OData/OData.svc/$metadata", + requestUri: "http://odatasampleservices.azurewebsites.net/V4/OData/OData.svc/$metadata", + // "http://localhost:6630/PrimitiveKeys.svc/$metadata", + data: null, + }; + + odatajs.oData.read(metadataRequest, readMetadataSuccess, readMetadataFail, odatajs.V4.oData.metadataHandler); +}; + +var readWithJsonP = function() { + var sUrl2 = "http://odatasampleservices.azurewebsites.net/V4/OData/OData.svc?$expand=Category"; + + var oRequest = { + requestUri: sUrl2, + enableJsonpCallback: true, + }; + + odatajs.oData.read(oRequest, function (data) { + document.getElementById("simpleReadWithJSONP").innerHTML = JSON.stringify(data, undefined, 2); + }, + function (oError) { + alert(oError.message); + }); +}; + +var testJQueryReadMetadata = function () { + $.ajax({ + url: "http://odatasampleservices.azurewebsites.net/V4/OData/OData.svc/$metadata", + headers: { + 'Accept': 'text/html,application/xhtml+xml,application/xml,application/json;odata.metadata=full', + "Odata-Version": "4.0", + "OData-MaxVersion": "4.0", + "Prefer": "odata.allow-entityreferences" + }, + type: "GET", + converters: { "text xml": OData.metadataParser }, + dataType: "xml", + success: function (xml, textStatus, jqXHR) { + var data = OData.metadataParser2(xml) || undefined; + document.getElementById("simpleReadWithMetadata").innerHTML = JSON.stringify(data, undefined, 2); + }, + error: function (jqXHR, textStatus, errorThrown) { + alert("err"); + } + }); +}; http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/503b4417/demo/scripts/tools.js ---------------------------------------------------------------------- diff --git a/demo/scripts/tools.js b/demo/scripts/tools.js new file mode 100644 index 0000000..3d3f395 --- /dev/null +++ b/demo/scripts/tools.js @@ -0,0 +1,164 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +(function($) { + $.fn.prettify = function(options) { + return this.each(function() { + try { + var $code = $(document.createElement('div')).addClass('code'); + $(this).before($code).remove(); + var content = $(this).text(); + var match = /(xml|json)/.exec($(this).attr('data-type')); + var format = (match) ? match[1] : null; + var html = null; + if (format == 'xml') { + var xmlDoc = $.parseXML(content); + html = (xmlDoc) ? formatXML(xmlDoc) : null; + } else if (format == 'json') { + var jsonObj = $.parseJSON(content); + html = (jsonObj) ? formatJSON(jsonObj) : null; + } + if (html) { + $code.addClass(format).html(html).find('.list').each(function() { + if (this.parentNode.nodeName == 'LI') { + $(document.createElement('div')).addClass("toggle").text("-").click(function() { + var target = $(this).siblings('.list:first'); + if (target.size() != 1) + return; + if (target.is(':hidden')) { + target.show().siblings('.deffered').remove(); + } else { + target.hide().before($(document.createElement('span')).attr("class", "deffered").html("...")); + } + $(this).text($(this).text() == '-' ? '+' : '-'); + }).insertBefore($(this.parentNode).children(':first')); + } + }); + } + } catch (e) { + console.log(e); + } + /* encode html */ + function encodeHtml(html) { + return (html != null) ? html.toString().replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">") : ''; + } + /* convert json to html */ + function formatJSON(value) { + var typeofValue = typeof value; + if (value == null) { + return '<span class="null">null</span>'; + } else if (typeofValue == 'number') { + return '<span class="numeric">' + encodeHtml(value) + '</span>'; + } else if (typeofValue == 'string') { + if (/^(http|https):\/\/[^\s]+$/.test(value)) { + var fragment = ''; + var fragmentIndex = value.indexOf('#'); + if (fragmentIndex != -1) { + fragment = value.substr(fragmentIndex); + value = value.substr(0, fragmentIndex); + } + var format = (value.length > 7) ? (value.substr(value.length - 7, 7) == '/$value' ? '' : '&$format=json' ) : ''; + format = (value.length > 10) ? (value.substr(value.length - 10, 10) == '/$metadata' ? '' : '&$format=json' ) : ''; + var separator = (value.indexOf('?') == -1) ? '?' : '&'; + return '<span class="string">"<a href="' + value + format + fragment + '">' + encodeHtml(value) + encodeHtml(fragment) + '</a>"</span>'; + } else { + return '<span class="string">"' + encodeHtml(value) + '"</span>' + } + } else if (typeofValue == 'boolean') { + return '<span class="boolean">' + encodeHtml(value) + '</span>' + } else if (value && value.constructor == Array) { + return formatArray(value); + } else if (typeofValue == 'object') { + return formatObject(value); + } else { + return ''; + } + function formatArray(json) { + var html = ''; + for ( var prop in json) + html += '<li>' + formatJSON(json[prop]) + '</li>'; + return (html) ? '<span class="array">[</span><ul class="array list">' + html + '</ul><span class="array">]</span>' : '<span class="array">[]</span>' + } + function formatObject(json) { + var html = ''; + for ( var prop in json) + html += '<li><span class="property">' + encodeHtml(prop) + '</span>: ' + formatJSON(json[prop]) + '</li>'; + return (html) ? '<span class="obj">{</span><ul class="obj list">' + html + '</ul><span class="obj">}</span>' : '<span class="obj">{}</span>'; + } + } + /* convert xml to html */ + function formatXML(document) { + return formatElement(document.documentElement); + function formatElement(element) { + var html = '<span><</span><span class="tag">' + encodeHtml(element.nodeName) + '</span>'; + if (element.attributes && element.attributes.length > 0) { + html += formatAttributes(element); + } + if (element.childNodes && element.childNodes.length > 0) { + html += '<span>></span>'; + if (element.childNodes.length == 1 && element.childNodes[0].nodeType == 3) { + html += '<span class="text">' + encodeHtml(element.childNodes[0].nodeValue) + '</span>'; + } else { + html += formatChildNodes(element.childNodes); + } + html += '<span></</span><span class="tag">' + encodeHtml(element.nodeName) + '</span><span>></span>'; + } else { + html += '<span>/></span>'; + } + return html; + } + function formatChildNodes(childNodes) { + html = '<ul class="list">'; + for ( var i = 0; i < childNodes.length; i++) { + var node = childNodes[i]; + if (node.nodeType == 1) { + html += '<li>' + formatElement(node) + '</li>'; + } else if (node.nodeType == 3 && !/^\s+$/.test(node.nodeValue)) { + html += '<li><span class="text">' + encodeHtml(node.nodeValue) + '</span></li>'; + } else if (node.nodeType == 4) { + html += '<li><span class="cdata"><![CDATA[' + encodeHtml(node.nodeValue) + ']]></span></li>'; + } else if (node.nodeType == 8) { + html += '<li><span class="comment"><!--' + encodeHtml(node.nodeValue) + '--></span></li>'; + } + } + html += '</ul>'; + return html; + } + function formatAttributes(element) { + var html = ''; + for (var i = 0; i < element.attributes.length; i++) { + var attribute = element.attributes[i]; + if (/^xmlns:[^\s]+$/.test(attribute.nodeName)) { + html += ' <span class="ns">' + encodeHtml(attribute.nodeName) + '="' + encodeHtml(attribute.nodeValue) + '"</span>'; + } else { + html += ' <span class="atn">' + encodeHtml(attribute.nodeName) + '</span>='; + if (attribute.nodeName == 'href' || attribute.nodeName == 'src') { + var separator = (attribute.nodeValue.indexOf('?') == -1) ? '?' : '&'; + var href = (element.baseURI && attribute.nodeValue[0] != '/') ? element.baseURI + attribute.nodeValue : attribute.nodeValue; + html += '"<a class="link" href="' + href + '">' + encodeHtml(attribute.nodeValue) + '</a>"'; + } else { + html += '"<span class="atv">' + encodeHtml(attribute.nodeValue) + '</span>"'; + } + } + } + return html; + } + } + }); + }; +})(jQuery); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/503b4417/demo/tester.html ---------------------------------------------------------------------- diff --git a/demo/tester.html b/demo/tester.html new file mode 100644 index 0000000..919810c --- /dev/null +++ b/demo/tester.html @@ -0,0 +1,235 @@ +<!-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + --> +<html> + <head> + <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> + <title>datajs startup perf test</title> + <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> + <script type="text/javascript" src="./../build/lib/odatajs-latest.js"></script> + <script type="text/javascript" src="scripts/tools.js" ></script> + <style type="text/css"> + .code{font-family:"Courier New",monospace;font-size:13px;line-height:18px;} + .code ul{list-style:none;margin:0 0 0 1.5em;padding:0;} + .code li{position:relative;} + .code.json li:after{content:',';} + .code.json li:last-child:after{content:'';} + .code span{white-space:nowrap;padding:2px 1px;} + .code .property{font-weight:bold;color:#000000;} + .code .null{color:#9d261d;} + .code .boolean{color:#760a85;} + .code .numeric{color:#0076cb;} + .code .string{color:#247230;} + .code .deffered{color:#666666;font-size:0.9em;} + .code .toggle{position:absolute;left:-1em;cursor:pointer;} + .code .tag{color:#003283;} + .code .atn{color:#760a85;} + .code .atv{color:#247230;} + .code .text{color:#000000;} + .code .cdata{color:#008080;} + .code .comment,.code .ns{color:#666666;} + + .left { + margin-left : 20px; + position:relative; + } + + </style> + </head> + <body> + <table><tr><td valign="top" width="150px"> + Metadata<br> + <input type="radio" id="inMetadata1" name="inMetadata" value="none"/> + <label for="inMetadata1">none</label><br> + + <input type="radio" id="inMetadata2" name="inMetadata" value="minimal" checked="checked"/> + <label for="inMetadata2">minimal<br> + <div class="left"> + <input type="checkbox" id="inMinimalToFull"> + <label for="inMinimalToFull" id="lblInMinimalToFull">minimal to full</label><br> + </div> + + <input type="radio" id="inMetadata3" name="inMetadata" value="full"><label for="inMetadata3">full</label> + <br> + Recognize Dates<br> + <input type="checkbox" id="inRecognizeDates"><label for="check1">yes/no</label><br> + + </td><td> + <div id="buttons"></div> + </td><td> + <button id="btnMetaData">MetaData</button><br/> + <button id="btnPOST_entry_food">POST food entry</button><br/> + <button id="btnPOST_entry_categorie">POST categorie entry</button><br/> + </td></tr></table> + <div id='resultsArea' data-type="json"> + </div> + <script> + // Config + var config = [ + { name: 'Feed', url: 'http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods'}, + { name: 'Entry', url: 'http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)'}, + { name: 'Collection of Complex', url: 'http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)/Providers'}, + { name: 'Collection of Simple', url: 'http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)/AlternativeNames'}, + { name: 'Complex property', url: 'http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)/Packaging'}, + { name: 'Simple property', url: 'http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)/Name'}, + ]; + + // UI Stuff + var createButtonClickHandler = function(nr) { + return function() { buttonClick(nr);}; + }; + + var buttonRoot = $('#buttons'); + $("input[name*='inMetadata'").click( function() { + var metadata = $("input[name*='inMetadata']:checked").val(); + if (metadata === "minimal") { + $("#lblInMinimalToFull").css('color', '#000000'); + $("#inMinimalToFull").removeAttr('disabled'); + } else { + $("#lblInMinimalToFull").css('color', '#999999'); + $("#inMinimalToFull").attr('disabled','disabled'); + } + }); + + for (var i = 0; i < config.length; i++) { + var button = $('<button id="btnArray">'+config[i].name+'</button><br/>"'); + button.click( createButtonClickHandler(i)); + buttonRoot.append(button); + } + + // Testing + function buttonClick(configNr) { + var metadata = $("input[name*='inMetadata']:checked").val(); + var recognizeDates = $("#inRecognizeDates").is(":checked") ? true : false; + var inMinimalToFull = $("#inMinimalToFull").is(":checked") ? true : false; + + var requestUri = { + requestUri : config[configNr].url + }; + + requestUri.recognizeDates = recognizeDates; + + var metaDatasuccess = function(metadata){ + odatajs.oData.read(requestUri, success, errorFunc, null, null, metadata); + }; + + if ( metadata === 'full') { + requestUri.headers = { Accept : 'application/json;odata.metadata=full' }; + odatajs.oData.read(requestUri, success, errorFunc); + } else if ( metadata === 'minimal') { + requestUri.headers = { Accept : 'application/json;odata.metadata=minimal' }; + if (inMinimalToFull) { + getMetaData(metaDatasuccess); + } else { + odatajs.oData.read(requestUri, success, errorFunc); + } + } else { + requestUri.headers = { Accept : 'application/json;odata.metadata=none' }; + odatajs.oData.read(requestUri, success, errorFunc); + } + } + + function show(data) { + $('#resultsArea').empty(); + var code = $('<code data-type="json"></code>').text(JSON.stringify(data)); + $('#resultsArea').append(code); + $('code[data-type]').prettify(); + } + function success(data) { + show(data); + } + + function errorFunc(err) { + $('#resultsArea').empty(); + $("#resultsArea").text(JSON.stringify(err)); + } + + function getMetaData(metaDatasuccess) { + var oHeaders = { + 'Accept': 'text/html,application/xhtml+xml,application/xml,application/json;odata.metadata=full', + "Odata-Version": "4.0", + "OData-MaxVersion": "4.0", + "Prefer": "odata.allow-entityreferences" + }; + var metadataRequest = + { + headers: oHeaders, + requestUri: "http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata", + data: null, + }; + odatajs.oData.read(metadataRequest, metaDatasuccess, errorFunc,odatajs.oData.metadataHandler); + } + + /*******Special buttons***********/ + + $('#btnMetaData').on("click", function(){ + var oHeaders = { + 'Accept': 'text/html,application/xhtml+xml,application/xml,application/json;odata.metadata=full', + "Odata-Version": "4.0", + "OData-MaxVersion": "4.0", + "Prefer": "odata.allow-entityreferences" + }; + var metadataRequest = + { + headers: oHeaders, + requestUri: "http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata", + data: null, + }; + + odatajs.oData.read(metadataRequest, success, errorFunc,odatajs.oData.metadataHandler); + }); + + $('#btnPOST_entry_food').on("click", function(){ + var requestUri = { + requestUri : 'http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods', + method: 'POST', + headers : { Accept : 'application/json' }, + recognizeDates : true, + data : { + "@odata.type": "#DataJS.Tests.V4.Food", + "@odata.context": "http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods/$entity", + FoodID: 111, + Name: "flour1" + } + }; + odatajs.oData.read(requestUri, success, errorFunc); + }); + $('#btnPOST_entry_categorie').on("click", function(){ + + var requestUri = { + requestUri : 'http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Categories', + method: 'POST', + headers : { Accept : 'application/json' }, + recognizeDates : true, + data : { + "@odata.type": "#DataJS.Tests.V4.Category", + "@odata.context": "http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Categories/$entity", + CategoryID: 111, + Name: "cat111" + } + }; + odatajs.oData.read(requestUri, success, errorFunc); + }); + + + + </script> + </body> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/503b4417/grunt-config/banner.txt ---------------------------------------------------------------------- diff --git a/grunt-config/banner.txt b/grunt-config/banner.txt new file mode 100644 index 0000000..042f3ce --- /dev/null +++ b/grunt-config/banner.txt @@ -0,0 +1,18 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/503b4417/grunt-config/custom-tasks/rat.js ---------------------------------------------------------------------- diff --git a/grunt-config/custom-tasks/rat.js b/grunt-config/custom-tasks/rat.js new file mode 100644 index 0000000..5c758af --- /dev/null +++ b/grunt-config/custom-tasks/rat.js @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//rat is written as like a npm module so include the /rat/tasks folder +module.exports = function(grunt) { + require('./rat/tasks/rat.js')(grunt); +}; http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/503b4417/grunt-config/custom-tasks/rat/.gitignore ---------------------------------------------------------------------- diff --git a/grunt-config/custom-tasks/rat/.gitignore b/grunt-config/custom-tasks/rat/.gitignore new file mode 100644 index 0000000..74c07ca --- /dev/null +++ b/grunt-config/custom-tasks/rat/.gitignore @@ -0,0 +1,3 @@ +node_modules +extern-tools/info.md +!extern-tools/info.md \ No newline at end of file http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/503b4417/grunt-config/custom-tasks/rat/extern-tools/info.md ---------------------------------------------------------------------- diff --git a/grunt-config/custom-tasks/rat/extern-tools/info.md b/grunt-config/custom-tasks/rat/extern-tools/info.md new file mode 100644 index 0000000..f48049e --- /dev/null +++ b/grunt-config/custom-tasks/rat/extern-tools/info.md @@ -0,0 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +Place apache-rat-0.11.jar from http://creadur.apache.org/rat/download_rat.cgi +in ./apache-rat-0.11/apache-rat-0.11.jar. + +See ./../readme.md for details \ No newline at end of file http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/503b4417/grunt-config/custom-tasks/rat/package.json ---------------------------------------------------------------------- diff --git a/grunt-config/custom-tasks/rat/package.json b/grunt-config/custom-tasks/rat/package.json new file mode 100644 index 0000000..0c374c7 --- /dev/null +++ b/grunt-config/custom-tasks/rat/package.json @@ -0,0 +1,27 @@ +{ + "name": "grunt-rat", + "version": "0.0.1", + "description": "Run Apache Rat(release audit tool)", + "license": "Apache", + "author": { + "name": "Sven Kobler-Morris", + "email": "[email protected]" + }, + "files": [ + "tasks" + ], + "dependencies": { + "chalk": "~0.4.0" + }, + "devDependencies": { + "async": "^0.9.0", + "grunt": "~0.4.0", + "xml2js": "^0.4.4" + }, + "peerDependencies": { + "grunt": "~0.4.0" + }, + "engines": { + "node": ">=0.8.0" + } +} http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/503b4417/grunt-config/custom-tasks/rat/readme.md ---------------------------------------------------------------------- diff --git a/grunt-config/custom-tasks/rat/readme.md b/grunt-config/custom-tasks/rat/readme.md new file mode 100644 index 0000000..fd2795c --- /dev/null +++ b/grunt-config/custom-tasks/rat/readme.md @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +Download "apache-rat-0.11-bin.zip" from http://creadur.apache.org/rat/download_rat.cgi and unpack it to +"extern-tools/apache-rat-0.11" + +"apache-rat-0.11.jar" must be located in ./extern-tools/apache-rat-0.11/apache-rat-0.11.jar +( full path from git root /odatajs/grunt-config/custom-tasks/rat/extern-tools/apache-rat-0.11/apache-rat-0.11.jar) \ No newline at end of file
