Skip to content
This repository was archived by the owner on Sep 15, 2021. It is now read-only.

Commit ce58c66

Browse files
committed
building v0.1.24-alpha
1 parent d1f3bc6 commit ce58c66

File tree

8 files changed

+151
-20
lines changed

8 files changed

+151
-20
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngCordova",
3-
"version": "0.1.23-alpha",
3+
"version": "0.1.24-alpha",
44
"homepage": "http://ngCordova.com/",
55
"authors": [
66
"Max Lynch <[email protected]>",

demo/www/lib/ngCordova/dist/ng-cordova.js

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,24 @@ angular.module('ngCordova.plugins.appVersion', [])
229229
.factory('$cordovaAppVersion', ['$q', function ($q) {
230230

231231
return {
232+
getAppName: function () {
233+
var q = $q.defer();
234+
cordova.getAppVersion.getAppName(function (name) {
235+
q.resolve(name);
236+
});
237+
238+
return q.promise;
239+
},
240+
241+
getPackageName: function () {
242+
var q = $q.defer();
243+
cordova.getAppVersion.getPackageName(function (package) {
244+
q.resolve(package);
245+
});
246+
247+
return q.promise;
248+
},
249+
232250
getVersionNumber: function () {
233251
var q = $q.defer();
234252
cordova.getAppVersion.getVersionNumber(function (version) {
@@ -1572,11 +1590,11 @@ angular.module('ngCordova.plugins.cardIO', [])
15721590
* Configuring defaultRespFields using $cordovaNgCardIOProvider
15731591
*
15741592
*/
1575-
this.setCardIOResponseFields = function (filelds) {
1576-
if (!filelds || !angular.isArray(filelds)) {
1593+
this.setCardIOResponseFields = function (fields) {
1594+
if (!fields || !angular.isArray(fields)) {
15771595
return;
15781596
}
1579-
defaultRespFields = filelds;
1597+
defaultRespFields = fields;
15801598
};
15811599

15821600
/**
@@ -1766,12 +1784,13 @@ angular.module('ngCordova.plugins.datePicker', [])
17661784
options = options || {date: new Date(), mode: 'date'};
17671785
$window.datePicker.show(options, function (date) {
17681786
q.resolve(date);
1787+
}, function(error){
1788+
q.reject(error);
17691789
});
17701790
return q.promise;
17711791
}
17721792
};
17731793
}]);
1774-
17751794
// install : cordova plugin add cordova-plugin-device
17761795
// link : https://github.com/apache/cordova-plugin-device
17771796

@@ -6386,6 +6405,8 @@ angular.module('ngCordova.plugins.socialSharing', [])
63866405
q.reject();
63876406
}
63886407
});
6408+
6409+
return q.promise;
63896410
}
63906411
};
63916412
}]);
@@ -6665,7 +6686,6 @@ angular.module('ngCordova.plugins.toast', [])
66656686
return q.promise;
66666687
},
66676688

6668-
66696689
show: function (message, duration, position) {
66706690
var q = $q.defer();
66716691
$window.plugins.toast.show(message, duration, position, function (response) {
@@ -6674,6 +6694,17 @@ angular.module('ngCordova.plugins.toast', [])
66746694
q.reject(error);
66756695
});
66766696
return q.promise;
6697+
},
6698+
6699+
hide: function () {
6700+
var q = $q.defer();
6701+
try {
6702+
$window.plugins.toast.hide();
6703+
q.resolve();
6704+
} catch (error) {
6705+
q.reject(error && error.message);
6706+
}
6707+
return q.promise;
66776708
}
66786709
};
66796710

demo/www/lib/ngCordova/dist/ng-cordova.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ng-cordova-mocks.js

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1512,7 +1512,7 @@ ngCordovaMocks.factory('$cordovaFileTransfer', ['$q', function ($q) {
15121512
**/
15131513
throwsError: throwsError,
15141514

1515-
download: function (source, filePath, trust, options) {
1515+
download: function (source, filePath, options, trust) {
15161516
return mockIt.call(this, 'There was an error downloading the file.');
15171517
},
15181518

@@ -1521,6 +1521,7 @@ ngCordovaMocks.factory('$cordovaFileTransfer', ['$q', function ($q) {
15211521
}
15221522
};
15231523
}]);
1524+
15241525
/**
15251526
* @ngdoc service
15261527
* @name ngCordovaMocks.cordovaGeolocation
@@ -2931,6 +2932,65 @@ ngCordovaMocks.factory('$cordovaSplashscreen', function () {
29312932
};
29322933
});
29332934

2935+
/**
2936+
* @ngdoc service
2937+
* @name ngCordovaMocks.cordovaSQLite
2938+
*
2939+
* @description
2940+
* A service for testing SQLite
2941+
* in an app build with ngCordova.
2942+
*/
2943+
2944+
ngCordovaMocks.factory('$cordovaSQLite', ['$q', function ($q) {
2945+
2946+
return {
2947+
/**
2948+
* These properties are here for the purpose of automated testing only.
2949+
**/
2950+
openDBShouldSucceedWith: null,
2951+
executeShouldSucceedWith: null,
2952+
insertCollectionShouldSucceedWith: null,
2953+
nestedExecuteShouldSucceedWith: null,
2954+
deleteDBShouldSucceedWith : null,
2955+
2956+
openDB: function (options, background) {
2957+
if (this.openDBShouldSucceedWith !== null) {
2958+
$q.when(this.openDBShouldSucceedWith)
2959+
} else {
2960+
$q.reject()
2961+
}
2962+
},
2963+
execute: function (db, query, binding) {
2964+
if (this.executeShouldSucceedWith !== null) {
2965+
$q.when(this.executeShouldSucceedWith)
2966+
} else {
2967+
$q.reject()
2968+
}
2969+
},
2970+
insertCollection: function (db, query, bindings) {
2971+
if (this.insertCollectionShouldSucceedWith !== null) {
2972+
$q.when(this.insertCollectionShouldSucceedWith)
2973+
} else {
2974+
$q.reject()
2975+
}
2976+
},
2977+
nestedExecute: function (db, query1, query2, binding1, binding2) {
2978+
if (this.nestedExecuteShouldSucceedWith !== null) {
2979+
$q.when(this.nestedExecuteShouldSucceedWith)
2980+
} else {
2981+
$q.reject()
2982+
}
2983+
},
2984+
deleteDB: function (dbName) {
2985+
if (this.deleteDBShouldSucceedWith !== null) {
2986+
$q.when(this.deleteDBShouldSucceedWith)
2987+
} else {
2988+
$q.reject()
2989+
}
2990+
}
2991+
}
2992+
}]);
2993+
29342994
/**
29352995
* @ngdoc service
29362996
* @name ngCordovaMocks.cordovaStatusbar
@@ -3086,6 +3146,15 @@ ngCordovaMocks.factory('$cordovaToast', ['$q', function ($q) {
30863146
defer.resolve();
30873147
}
30883148
return defer.promise;
3149+
},
3150+
hide: function () {
3151+
var defer = $q.defer();
3152+
if (this.throwsError) {
3153+
defer.reject('There was an error hiding the toast.');
3154+
} else {
3155+
defer.resolve();
3156+
}
3157+
return defer.promise;
30893158
}
30903159
};
30913160
}]);

dist/ng-cordova-mocks.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ng-cordova.js

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,24 @@ angular.module('ngCordova.plugins.appVersion', [])
229229
.factory('$cordovaAppVersion', ['$q', function ($q) {
230230

231231
return {
232+
getAppName: function () {
233+
var q = $q.defer();
234+
cordova.getAppVersion.getAppName(function (name) {
235+
q.resolve(name);
236+
});
237+
238+
return q.promise;
239+
},
240+
241+
getPackageName: function () {
242+
var q = $q.defer();
243+
cordova.getAppVersion.getPackageName(function (package) {
244+
q.resolve(package);
245+
});
246+
247+
return q.promise;
248+
},
249+
232250
getVersionNumber: function () {
233251
var q = $q.defer();
234252
cordova.getAppVersion.getVersionNumber(function (version) {
@@ -1572,11 +1590,11 @@ angular.module('ngCordova.plugins.cardIO', [])
15721590
* Configuring defaultRespFields using $cordovaNgCardIOProvider
15731591
*
15741592
*/
1575-
this.setCardIOResponseFields = function (filelds) {
1576-
if (!filelds || !angular.isArray(filelds)) {
1593+
this.setCardIOResponseFields = function (fields) {
1594+
if (!fields || !angular.isArray(fields)) {
15771595
return;
15781596
}
1579-
defaultRespFields = filelds;
1597+
defaultRespFields = fields;
15801598
};
15811599

15821600
/**
@@ -1766,12 +1784,13 @@ angular.module('ngCordova.plugins.datePicker', [])
17661784
options = options || {date: new Date(), mode: 'date'};
17671785
$window.datePicker.show(options, function (date) {
17681786
q.resolve(date);
1787+
}, function(error){
1788+
q.reject(error);
17691789
});
17701790
return q.promise;
17711791
}
17721792
};
17731793
}]);
1774-
17751794
// install : cordova plugin add cordova-plugin-device
17761795
// link : https://github.com/apache/cordova-plugin-device
17771796

@@ -6386,6 +6405,8 @@ angular.module('ngCordova.plugins.socialSharing', [])
63866405
q.reject();
63876406
}
63886407
});
6408+
6409+
return q.promise;
63896410
}
63906411
};
63916412
}]);
@@ -6665,7 +6686,6 @@ angular.module('ngCordova.plugins.toast', [])
66656686
return q.promise;
66666687
},
66676688

6668-
66696689
show: function (message, duration, position) {
66706690
var q = $q.defer();
66716691
$window.plugins.toast.show(message, duration, position, function (response) {
@@ -6674,6 +6694,17 @@ angular.module('ngCordova.plugins.toast', [])
66746694
q.reject(error);
66756695
});
66766696
return q.promise;
6697+
},
6698+
6699+
hide: function () {
6700+
var q = $q.defer();
6701+
try {
6702+
$window.plugins.toast.hide();
6703+
q.resolve();
6704+
} catch (error) {
6705+
q.reject(error && error.message);
6706+
}
6707+
return q.promise;
66776708
}
66786709
};
66796710

dist/ng-cordova.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ng-cordova",
33
"private": false,
44
"main": "dist/ng-cordova",
5-
"version": "0.1.23-alpha",
5+
"version": "0.1.24-alpha",
66
"repository": {
77
"url": "git://github.com/driftyco/ng-cordova.git"
88
},

0 commit comments

Comments
 (0)