Skip to content
This repository was archived by the owner on Jan 5, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
29cccd8
Updates
RobertWalsh Sep 19, 2016
f8e1e01
Updates
RobertWalsh Sep 19, 2016
570f423
Fixing more tests and minor updates.
RobertWalsh Sep 19, 2016
c8039ff
Updates
RobertWalsh Sep 20, 2016
016861a
Fixed grunt-minified configuration
RobertWalsh Sep 21, 2016
bc65005
Implemented UsergridQuery and added tests for it.
RobertWalsh Sep 21, 2016
0a2a348
Updates
RobertWalsh Sep 27, 2016
15a315a
Lots of updates and fixes.
RobertWalsh Oct 4, 2016
7f2269f
Updates to tests and many other things.
RobertWalsh Oct 5, 2016
129221b
Update package.json and travis.yml
RobertWalsh Oct 5, 2016
a1c1b95
Fixing gruntfile and index.html for testing with travis.yml
RobertWalsh Oct 5, 2016
94614c0
Updates trying to get travis.yml working
RobertWalsh Oct 5, 2016
f3574d5
update
RobertWalsh Oct 5, 2016
40fbf62
Fixing grunt-mocha package
RobertWalsh Oct 5, 2016
d230e25
Adding travis ci build status to readme
RobertWalsh Oct 5, 2016
cb7668c
Connections are now working among other fixes
RobertWalsh Oct 7, 2016
48f34da
Added tests and fixed some issues relating to them
RobertWalsh Oct 7, 2016
193ef22
Added more tests and UsergridAsset upload/download now implemented.
RobertWalsh Oct 8, 2016
7c20755
Update to get grunt test to work on travis ci.
RobertWalsh Oct 9, 2016
b8eec8b
Update to get tests to work in travis ci again
RobertWalsh Oct 9, 2016
78105f6
Update UsergridAsset tests.
RobertWalsh Oct 9, 2016
19c51ef
Updates see commit details.
RobertWalsh Oct 9, 2016
29d4eee
Minor cleanup
RobertWalsh Oct 9, 2016
71d399f
More cleanup.
RobertWalsh Oct 9, 2016
16ca8e9
Updates. See commit details.
RobertWalsh Oct 10, 2016
b702fdf
Major updates.
RobertWalsh Oct 13, 2016
861f713
Mainly cleanup with some fixes.
RobertWalsh Oct 13, 2016
9d98daa
Strict mode enforced for all modules including lodash.
RobertWalsh Oct 13, 2016
729d064
Updated all callbacks.
RobertWalsh Oct 13, 2016
8a46f91
Initial update of README
RobertWalsh Oct 13, 2016
e129990
More updates to README
RobertWalsh Oct 13, 2016
011b8d0
Adding Apache 2.0 license to all files.
RobertWalsh Oct 14, 2016
72f3ada
Added ‘use strict’ to all test modules.
RobertWalsh Oct 14, 2016
f76fdbe
Update README with UsergridAsset information.
RobertWalsh Oct 14, 2016
8fea25e
More cleanup.
RobertWalsh Oct 14, 2016
c4e7d22
Fixed examples and minor cleanup.
RobertWalsh Oct 14, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.idea
/node_modules
.DS_Store
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: node_js
node_js:
- "6.1"
before_script:
- npm install grunt-cli -g

107 changes: 40 additions & 67 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,20 @@
module.exports = function(grunt) {
var files = [
"lib/modules/util/Event.js",
"lib/modules/util/Logger.js",
"lib/modules/util/Promise.js",
"lib/modules/util/Ajax.js",
"lib/modules/util/lodash.js",
"lib/modules/UsergridEnums.js",
"lib/modules/util/UsergridHelpers.js",
"lib/modules/UsergridClient.js",
"lib/Usergrid.js",
"lib/modules/Client.js",
"lib/modules/Entity.js",
"lib/modules/Collection.js",
"lib/modules/Group.js",
"lib/modules/Counter.js",
"lib/modules/Folder.js",
"lib/modules/Asset.js",
"lib/modules/Error.js"
];
var tests = ["tests/mocha/index.html", "tests/mocha/test_*.html"];
// Project configuration.
grunt.initConfig({
//pkg: grunt.file.readJSON('package.json'),
"meta": {
"package": grunt.file.readJSON("package.json")
},
"clean": ["usergrid.js", "usergrid.min.js"],
"uglify": {
"unminified": {
"options": {
"banner": "/*! \n\
"lib/modules/UsergridQuery.js",
"lib/modules/UsergridRequest.js",
"lib/modules/UsergridAuth.js",
"lib/modules/UsergridEntity.js",
"lib/modules/UsergridUser.js",
"lib/modules/UsergridResponse.js",
"lib/modules/UsergridAsset.js"
];
var banner = "/*! \n\
*Licensed to the Apache Software Foundation (ASF) under one\n\
*or more contributor license agreements. See the NOTICE file\n\
*distributed with this work for additional information\n\
Expand All @@ -45,50 +34,32 @@ module.exports = function(grunt) {
* \n\
* \n\
* <%= meta.package.name %>@<%= meta.package.version %> <%= grunt.template.today('yyyy-mm-dd') %> \n\
*/\n",
*/\n";

// Project configuration.
grunt.initConfig({
"meta": { "package": grunt.file.readJSON("package.json") },
"clean": ["usergrid.js", "usergrid.min.js"],
"uglify": {
"unminified": {
"options": {
"banner": banner,
"mangle": false,
"compress": false,
"beautify": true,
"preserveComments": function(node, comment){
//console.log((node.parent_scope!==undefined&&comment.value.indexOf('*Licensed to the Apache Software Foundation')===-1)?"has parent":comment.value);
return comment.type==='comment2'&&comment.value.indexOf('*Licensed to the Apache Software Foundation')===-1;
}
"compress": false,
"preserveComments": "some"
},
"files": {
"usergrid.js": files
}
"files": { "usergrid.js": files }
},
"minified": {
"options": {
"banner": "/*! \n\
*Licensed to the Apache Software Foundation (ASF) under one\n\
*or more contributor license agreements. See the NOTICE file\n\
*distributed with this work for additional information\n\
*regarding copyright ownership. The ASF licenses this file\n\
*to you under the Apache License, Version 2.0 (the\n\
*\"License\"); you may not use this file except in compliance\n\
*with the License. You may obtain a copy of the License at\n\
*\n\
* http://www.apache.org/licenses/LICENSE-2.0\n\
* \n\
*Unless required by applicable law or agreed to in writing,\n\
*software distributed under the License is distributed on an\n\
*\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n\
*KIND, either express or implied. See the License for the\n\
*specific language governing permissions and limitations\n\
*under the License.\n\
* \n\
* \n\
* <%= meta.package.name %>@<%= meta.package.version %> <%= grunt.template.today('yyyy-mm-dd') %> \n\
*/\n",
"banner": banner,
"mangle": false,
"compress": true,
"beautify": false,
"compress": {},
"preserveComments": "some"
},
"files": {
"usergrid.min.js": files
}
"files": { "usergrid.min.js": files }
}
},
"connect": {
Expand All @@ -109,21 +80,23 @@ module.exports = function(grunt) {
"files": [files, 'Gruntfile.js'],
"tasks": ["default"]
},
"blanket_mocha": {
//"all": tests,
urls: [ 'http://localhost:8000/tests/mocha/index.html' ],
"options": {
"dest": "report/coverage.html",
"reporter": "Spec",
"threshold": 70
"mocha": {
"test": {
"options": {
"urls": [ 'http://localhost:<%= connect.test.options.port %>/tests/mocha/index.html' ],
"reporter": "Spec",
"threshold": 70,
"run":true
}
}
}
});
grunt.loadNpmTasks("grunt-mocha");
grunt.loadNpmTasks("grunt-contrib-clean");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-contrib-connect");
grunt.loadNpmTasks("grunt-blanket-mocha");
grunt.loadNpmTasks("should");
grunt.registerTask("default", [
"clean",
"uglify"
Expand All @@ -134,6 +107,6 @@ module.exports = function(grunt) {
]);
grunt.registerTask("test", [
"connect:test",
"blanket_mocha"
"mocha:test"
]);
};
Loading