22 changes: 15 additions & 7 deletions app/lib/angular/angular-resource.js
@@ -1,5 +1,5 @@
/**
* @license AngularJS v1.2.0-rc.2
* @license AngularJS v1.2.0-rc.3
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
Expand All @@ -16,7 +16,7 @@ var $resourceMinErr = angular.$$minErr('$resource');
*
* `ngResource` is the name of the optional Angular module that adds support for interacting with
* [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources.
* `ngReource` provides the {@link ngResource.$resource `$resource`} serivce.
* `ngResource` provides the {@link ngResource.$resource `$resource`} service.
*
* {@installModule resource}
*
Expand Down Expand Up @@ -94,7 +94,7 @@ var $resourceMinErr = angular.$$minErr('$resource');
* caching.
* - **`timeout`** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} that
* should abort the request when resolved.
* - **`withCredentials`** - `{boolean}` - whether to to set the `withCredentials` flag on the
* - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the
* XHR object. See {@link https://developer.mozilla.org/en/http_access_control#section_5
* requests with credentials} for more information.
* - **`responseType`** - `{string}` - see {@link
Expand Down Expand Up @@ -352,6 +352,9 @@ angular.module('ngResource', ['ng']).

var urlParams = self.urlParams = {};
forEach(url.split(/\W/), function(param){
if (param === 'hasOwnProperty') {
throw $resourceMinErr('badname', "hasOwnProperty is not a valid parameter name.");
}
if (!(new RegExp("^\\d+$").test(param)) && param && (new RegExp("(^|[^\\\\]):" + param + "(\\W|$)").test(url))) {
urlParams[param] = true;
}
Expand Down Expand Up @@ -471,7 +474,7 @@ angular.module('ngResource', ['ng']).
}
});

httpConfig.data = data;
if (hasBody) httpConfig.data = data;
route.setUrlParams(httpConfig, extend({}, extractParams(data, action.params || {}), params), action.url);

var promise = $http(httpConfig).then(function(response) {
Expand All @@ -497,8 +500,6 @@ angular.module('ngResource', ['ng']).

value.$resolved = true;

(success||noop)(value, response.headers);

response.resource = value;

return response;
Expand All @@ -508,8 +509,15 @@ angular.module('ngResource', ['ng']).
(error||noop)(response);

return $q.reject(response);
}).then(responseInterceptor, responseErrorInterceptor);
});

promise = promise.then(
function(response) {
var value = responseInterceptor(response);
(success||noop)(value, response.headers);
return value;
},
responseErrorInterceptor);

if (!isInstanceCall) {
// we are creating instance / collection
Expand Down
18 changes: 8 additions & 10 deletions app/lib/angular/angular-resource.min.js
4 changes: 2 additions & 2 deletions app/lib/angular/angular-resource.min.js.map
73 changes: 33 additions & 40 deletions app/lib/angular/angular-route.js
@@ -1,26 +1,10 @@
/**
* @license AngularJS v1.2.0-rc.2
* @license AngularJS v1.2.0-rc.3
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {'use strict';

var copy = angular.copy,
equals = angular.equals,
extend = angular.extend,
forEach = angular.forEach,
isDefined = angular.isDefined,
isFunction = angular.isFunction,
isString = angular.isString,
jqLite = angular.element,
noop = angular.noop,
toJson = angular.toJson;


function inherit(parent, extra) {
return extend(new (extend(function() {}, {prototype:parent}))(), extra);
}

/**
* @ngdoc overview
* @name ngRoute
Expand Down Expand Up @@ -49,6 +33,10 @@ var ngRouteModule = angular.module('ngRoute', ['ng']).
* Requires the {@link ngRoute `ngRoute`} module to be installed.
*/
function $RouteProvider(){
function inherit(parent, extra) {
return angular.extend(new (angular.extend(function() {}, {prototype:parent}))(), extra);
}

var routes = {};

/**
Expand Down Expand Up @@ -130,8 +118,8 @@ function $RouteProvider(){
* The custom `redirectTo` function is expected to return a string which will be used
* to update `$location.path()` and `$location.search()`.
*
* - `[reloadOnSearch=true]` - {boolean=} - reload route when only $location.search()
* changes.
* - `[reloadOnSearch=true]` - {boolean=} - reload route when only `$location.search()`
* or `$location.hash()` changes.
*
* If the option is set to `false` and url in the browser changes, then
* `$routeUpdate` event is broadcasted on the root scope.
Expand All @@ -147,7 +135,7 @@ function $RouteProvider(){
* Adds a new route definition to the `$route` service.
*/
this.when = function(path, route) {
routes[path] = extend(
routes[path] = angular.extend(
{reloadOnSearch: true},
route,
path && pathRegExp(path, route)
Expand All @@ -159,7 +147,7 @@ function $RouteProvider(){
? path.substr(0, path.length-1)
: path +'/';

routes[redirectPath] = extend(
routes[redirectPath] = angular.extend(
{redirectTo: path},
pathRegExp(redirectPath, route)
);
Expand Down Expand Up @@ -198,7 +186,9 @@ function $RouteProvider(){
+ (optional ? '' : slash)
+ '(?:'
+ (optional ? slash : '')
+ (star && '(.+)?' || '([^/]+)?') + ')'
+ (star && '(.+?)' || '([^/]+)')
+ (optional || '')
+ ')'
+ (optional || '');
})
.replace(/([\/$\*])/g, '\\$1');
Expand Down Expand Up @@ -367,6 +357,7 @@ function $RouteProvider(){
* defined in `resolve` route property. Once all of the dependencies are resolved
* `$routeChangeSuccess` is fired.
*
* @param {Object} angularEvent Synthetic event object.
* @param {Route} next Future route information.
* @param {Route} current Current route information.
*/
Expand Down Expand Up @@ -394,6 +385,7 @@ function $RouteProvider(){
* @description
* Broadcasted if any of the resolve promises are rejected.
*
* @param {Object} angularEvent Synthetic event object
* @param {Route} current Current route information.
* @param {Route} previous Previous route information.
* @param {Route} rejection Rejection of the promise. Usually the error of the failed promise.
Expand Down Expand Up @@ -477,17 +469,17 @@ function $RouteProvider(){
last = $route.current;

if (next && last && next.$$route === last.$$route
&& equals(next.pathParams, last.pathParams) && !next.reloadOnSearch && !forceReload) {
&& angular.equals(next.pathParams, last.pathParams) && !next.reloadOnSearch && !forceReload) {
last.params = next.params;
copy(last.params, $routeParams);
angular.copy(last.params, $routeParams);
$rootScope.$broadcast('$routeUpdate', last);
} else if (next || last) {
forceReload = false;
$rootScope.$broadcast('$routeChangeStart', next, last);
$route.current = next;
if (next) {
if (next.redirectTo) {
if (isString(next.redirectTo)) {
if (angular.isString(next.redirectTo)) {
$location.path(interpolate(next.redirectTo, next.params)).search(next.params)
.replace();
} else {
Expand All @@ -500,29 +492,29 @@ function $RouteProvider(){
$q.when(next).
then(function() {
if (next) {
var locals = extend({}, next.resolve),
var locals = angular.extend({}, next.resolve),
template, templateUrl;

forEach(locals, function(value, key) {
locals[key] = isString(value) ? $injector.get(value) : $injector.invoke(value);
angular.forEach(locals, function(value, key) {
locals[key] = angular.isString(value) ? $injector.get(value) : $injector.invoke(value);
});

if (isDefined(template = next.template)) {
if (isFunction(template)) {
if (angular.isDefined(template = next.template)) {
if (angular.isFunction(template)) {
template = template(next.params);
}
} else if (isDefined(templateUrl = next.templateUrl)) {
if (isFunction(templateUrl)) {
} else if (angular.isDefined(templateUrl = next.templateUrl)) {
if (angular.isFunction(templateUrl)) {
templateUrl = templateUrl(next.params);
}
templateUrl = $sce.getTrustedResourceUrl(templateUrl);
if (isDefined(templateUrl)) {
if (angular.isDefined(templateUrl)) {
next.loadedTemplateUrl = templateUrl;
template = $http.get(templateUrl, {cache: $templateCache}).
then(function(response) { return response.data; });
}
}
if (isDefined(template)) {
if (angular.isDefined(template)) {
locals['$template'] = template;
}
return $q.all(locals);
Expand All @@ -533,7 +525,7 @@ function $RouteProvider(){
if (next == $route.current) {
if (next) {
next.locals = locals;
copy(next.params, $routeParams);
angular.copy(next.params, $routeParams);
}
$rootScope.$broadcast('$routeChangeSuccess', next, last);
}
Expand All @@ -552,10 +544,10 @@ function $RouteProvider(){
function parseRoute() {
// Match a route
var params, match;
forEach(routes, function(route, path) {
angular.forEach(routes, function(route, path) {
if (!match && (params = switchRouteMatcher($location.path(), route))) {
match = inherit(route, {
params: extend({}, $location.search(), params),
params: angular.extend({}, $location.search(), params),
pathParams: params});
match.$$route = route;
}
Expand All @@ -569,7 +561,7 @@ function $RouteProvider(){
*/
function interpolate(string, params) {
var result = [];
forEach((string||'').split(':'), function(segment, i) {
angular.forEach((string||'').split(':'), function(segment, i) {
if (i === 0) {
result.push(segment);
} else {
Expand Down Expand Up @@ -648,6 +640,7 @@ ngRouteModule.directive('ngView', ngViewFactory);
* The enter and leave animation occur concurrently.
*
* @scope
* @priority 400
* @example
<example module="ngViewExample" deps="angular-route.js" animations="true">
<file name="index.html">
Expand Down Expand Up @@ -801,7 +794,7 @@ function ngViewFactory( $route, $anchorScroll, $compile, $controller,
return {
restrict: 'ECA',
terminal: true,
priority: 1000,
priority: 400,
transclude: 'element',
compile: function(element, attr, linker) {
return function(scope, $element, attr) {
Expand Down Expand Up @@ -848,7 +841,7 @@ function ngViewFactory( $route, $anchorScroll, $compile, $controller,
currentScope[current.controllerAs] = controller;
}
clone.data('$ngControllerController', controller);
clone.contents().data('$ngControllerController', controller);
clone.children().data('$ngControllerController', controller);
}

link(currentScope);
Expand Down
21 changes: 10 additions & 11 deletions app/lib/angular/angular-route.min.js
6 changes: 3 additions & 3 deletions app/lib/angular/angular-route.min.js.map

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions app/lib/angular/angular-sanitize.js
@@ -1,5 +1,5 @@
/**
* @license AngularJS v1.2.0-rc.2
* @license AngularJS v1.2.0-rc.3
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
Expand Down Expand Up @@ -140,6 +140,7 @@ var START_TAG_REGEXP = /^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:
BEGIN_TAG_REGEXP = /^</,
BEGING_END_TAGE_REGEXP = /^<\s*\//,
COMMENT_REGEXP = /<!--(.*?)-->/g,
DOCTYPE_REGEXP = /<!DOCTYPE([^>]*?)>/i,
CDATA_REGEXP = /<!\[CDATA\[(.*?)]]>/g,
URI_REGEXP = /^((ftp|https?):\/\/|mailto:|tel:|#)/i,
NON_ALPHANUMERIC_REGEXP = /([^\#-~| |!])/g; // Match everything outside of normal chars and " (quote character)
Expand Down Expand Up @@ -215,14 +216,22 @@ function htmlParser( html, handler ) {

// Comment
if ( html.indexOf("<!--") === 0 ) {
index = html.indexOf("-->");
// comments containing -- are not allowed unless they terminate the comment
index = html.indexOf("--", 4);

if ( index >= 0 ) {
if ( index >= 0 && html.lastIndexOf("-->", index) === index) {
if (handler.comment) handler.comment( html.substring( 4, index ) );
html = html.substring( index + 3 );
chars = false;
}
// DOCTYPE
} else if ( DOCTYPE_REGEXP.test(html) ) {
match = html.match( DOCTYPE_REGEXP );

if ( match ) {
html = html.replace( match[0] , '');
chars = false;
}
// end tag
} else if ( BEGING_END_TAGE_REGEXP.test(html) ) {
match = html.match( END_TAG_REGEXP );
Expand Down
21 changes: 10 additions & 11 deletions app/lib/angular/angular-sanitize.min.js
6 changes: 3 additions & 3 deletions app/lib/angular/angular-sanitize.min.js.map

Large diffs are not rendered by default.

27 changes: 13 additions & 14 deletions app/lib/angular/angular-touch.js
@@ -1,5 +1,5 @@
/**
* @license AngularJS v1.2.0-rc.2
* @license AngularJS v1.2.0-rc.3
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
Expand Down Expand Up @@ -108,12 +108,12 @@ ngTouch.factory('$swipe', [function() {
totalX = 0;
totalY = 0;
lastPos = startCoords;
eventHandlers['start'] && eventHandlers['start'](startCoords);
eventHandlers['start'] && eventHandlers['start'](startCoords, event);
});

element.on('touchcancel', function(event) {
active = false;
eventHandlers['cancel'] && eventHandlers['cancel']();
eventHandlers['cancel'] && eventHandlers['cancel'](event);
});

element.on('touchmove mousemove', function(event) {
Expand Down Expand Up @@ -141,20 +141,19 @@ ngTouch.factory('$swipe', [function() {
if (totalY > totalX) {
// Allow native scrolling to take over.
active = false;
eventHandlers['cancel'] && eventHandlers['cancel']();
eventHandlers['cancel'] && eventHandlers['cancel'](event);
return;
} else {
// Prevent the browser from scrolling.
event.preventDefault();

eventHandlers['move'] && eventHandlers['move'](coords);
eventHandlers['move'] && eventHandlers['move'](coords, event);
}
});

element.on('touchend mouseup', function(event) {
if (!active) return;
active = false;
eventHandlers['end'] && eventHandlers['end'](getCoordinates(event));
eventHandlers['end'] && eventHandlers['end'](getCoordinates(event), event);
});
}
};
Expand Down Expand Up @@ -398,7 +397,7 @@ ngTouch.directive('ngClick', ['$parse', '$timeout', '$rootElement',
}

if (!angular.isDefined(attr.disabled) || attr.disabled === false) {
element.triggerHandler('click', event);
element.triggerHandler('click', [event]);
}
}

Expand All @@ -415,9 +414,9 @@ ngTouch.directive('ngClick', ['$parse', '$timeout', '$rootElement',
// - On mobile browsers, the simulated "fast" click will call this.
// - But the browser's follow-up slow click will be "busted" before it reaches this handler.
// Therefore it's safe to use this directive on both mobile and desktop.
element.on('click', function(event) {
element.on('click', function(event, touchend) {
scope.$apply(function() {
clickHandler(scope, {$event: event});
clickHandler(scope, {$event: (touchend || event)});
});
});

Expand Down Expand Up @@ -524,18 +523,18 @@ function makeSwipeDirective(directiveName, direction, eventName) {
}

$swipe.bind(element, {
'start': function(coords) {
'start': function(coords, event) {
startCoords = coords;
valid = true;
},
'cancel': function() {
'cancel': function(event) {
valid = false;
},
'end': function(coords) {
'end': function(coords, event) {
if (validSwipe(coords)) {
scope.$apply(function() {
element.triggerHandler(eventName);
swipeHandler(scope);
swipeHandler(scope, {$event: event});
});
}
}
Expand Down
19 changes: 9 additions & 10 deletions app/lib/angular/angular-touch.min.js
6 changes: 3 additions & 3 deletions app/lib/angular/angular-touch.min.js.map

Large diffs are not rendered by default.

3,535 changes: 2,328 additions & 1,207 deletions app/lib/angular/angular.js

Large diffs are not rendered by default.

375 changes: 193 additions & 182 deletions app/lib/angular/angular.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions app/lib/angular/angular.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/lib/angular/errors.json
@@ -1 +1 @@
{"id":"ng","generated":"Wed Sep 04 2013 14:51:13 GMT+0200 (CEST)","errors":{"$cacheFactory":{"iid":"CacheId '{0}' is already taken!"},"ngModel":{"nonassign":"Expression '{0}' is non-assignable. Element: {1}"},"$sce":{"iequirks":"Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.","insecurl":"Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}","icontext":"Attempted to trust a value in invalid context. Context: {0}; Value: {1}","itype":"Attempted to trust a non-string value in a content requiring a string: Context: {0}","unsafe":"Attempting to use an unsafe value in a safe context."},"$controller":{"noscp":"Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`."},"$compile":{"nodomevents":"Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.","multidir":"Multiple directives [{0}, {1}] asking for {2} on: {3}","nonassign":"Expression '{0}' used with directive '{1}' is non-assignable!","tplrt":"Template for directive '{0}' must have exactly one root element. {1}","selmulti":"Binding to the 'multiple' attribute is not supported. Element: {0}","tpload":"Failed to load template: {0}","iscp":"Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}","ctreq":"Controller '{0}', required by directive '{1}', can't be found!","uterdir":"Unterminated attribute, found '{0}' but no matching '{1}' found."},"$injector":{"modulerr":"Failed to instantiate module {0} due to:\n{1}","unpr":"Unknown provider: {0}","itkn":"Incorrect injection token! Expected service name as string, got {0}","cdep":"Circular dependency found: {0}","nomod":"Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.","pget":"Provider '{0}' must define $get factory method."},"$rootScope":{"inprog":"{0} already in progress","infdig":"{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}"},"ngPattern":{"noregexp":"Expected {0} to be a RegExp but was {1}. Element: {2}"},"$interpolate":{"noconcat":"Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce","interr":"Can't interpolate: {0}\n{1}"},"jqLite":{"offargs":"jqLite#off() does not support the `selector` argument","onargs":"jqLite#on() does not support the `selector` or `eventData` parameters","nosel":"Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element"},"ngOptions":{"iexp":"Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}"},"ngRepeat":{"iidexp":"'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.","dupes":"Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}","iexp":"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'."},"ng":{"areq":"Argument '{0}' is {1}","cpws":"Can't copy! Making copies of Window or Scope instances is not supported.","btstrpd":"App Already Bootstrapped with this Element '{0}'","cpi":"Can't copy! Source and destination are identical."},"$animate":{"notcsel":"Expecting class selector starting with '.' got '{0}'."},"$parse":{"isecfld":"Referencing \"constructor\" field in Angular expressions is disallowed! Expression: {0}","syntax":"Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].","lexerr":"Lexer Error: {0} at column{1} in expression [{2}].","ueoe":"Unexpected end of expression: {0}","isecfn":"Referencing Function in Angular expressions is disallowed! Expression: {0}"},"$httpBackend":{"noxhr":"This browser does not support XMLHttpRequest."},"$location":{"ipthprfx":"Invalid url \"{0}\", missing path prefix \"{1}\".","isrcharg":"The first argument of the `$location#search()` call must be a string or an object.","ihshprfx":"Invalid url \"{0}\", missing hash prefix \"{1}\"."},"$resource":{"badargs":"Expected up to 4 arguments [params, data, success, error], got {0} arguments","badcfg":"Error in resource configuration. Expected response to contain an {0} but got an {1}"},"$sanitize":{"badparse":"The sanitizer was unable to parse the following block of html: {0}"}}}
{"id":"ng","generated":"Mon Oct 14 2013 10:37:34 GMT-0700 (PDT)","errors":{"$cacheFactory":{"iid":"CacheId '{0}' is already taken!"},"ngModel":{"nonassign":"Expression '{0}' is non-assignable. Element: {1}"},"$sce":{"iequirks":"Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.","insecurl":"Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}","icontext":"Attempted to trust a value in invalid context. Context: {0}; Value: {1}","imatcher":"Matchers may only be \"self\", string patterns or RegExp objects","iwcard":"Illegal sequence *** in string matcher. String: {0}","itype":"Attempted to trust a non-string value in a content requiring a string: Context: {0}","unsafe":"Attempting to use an unsafe value in a safe context."},"$controller":{"noscp":"Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`."},"$compile":{"nodomevents":"Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.","multidir":"Multiple directives [{0}, {1}] asking for {2} on: {3}","nonassign":"Expression '{0}' used with directive '{1}' is non-assignable!","tplrt":"Template for directive '{0}' must have exactly one root element. {1}","selmulti":"Binding to the 'multiple' attribute is not supported. Element: {0}","tpload":"Failed to load template: {0}","iscp":"Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}","ctreq":"Controller '{0}', required by directive '{1}', can't be found!","uterdir":"Unterminated attribute, found '{0}' but no matching '{1}' found."},"$injector":{"modulerr":"Failed to instantiate module {0} due to:\n{1}","unpr":"Unknown provider: {0}","itkn":"Incorrect injection token! Expected service name as string, got {0}","cdep":"Circular dependency found: {0}","nomod":"Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.","pget":"Provider '{0}' must define $get factory method."},"$rootScope":{"inprog":"{0} already in progress","infdig":"{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}"},"ngPattern":{"noregexp":"Expected {0} to be a RegExp but was {1}. Element: {2}"},"$interpolate":{"noconcat":"Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce","interr":"Can't interpolate: {0}\n{1}"},"jqLite":{"offargs":"jqLite#off() does not support the `selector` argument","onargs":"jqLite#on() does not support the `selector` or `eventData` parameters","nosel":"Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element"},"ngOptions":{"iexp":"Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}"},"ngRepeat":{"iidexp":"'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.","dupes":"Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}","iexp":"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'."},"ng":{"areq":"Argument '{0}' is {1}","cpws":"Can't copy! Making copies of Window or Scope instances is not supported.","badname":"hasOwnProperty is not a valid {0} name","btstrpd":"App Already Bootstrapped with this Element '{0}'","cpi":"Can't copy! Source and destination are identical."},"$animate":{"notcsel":"Expecting class selector starting with '.' got '{0}'."},"ngTransclude":{"orphan":"Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}"},"$parse":{"isecfld":"Referencing \"constructor\" field in Angular expressions is disallowed! Expression: {0}","syntax":"Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].","isecdom":"Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}","lexerr":"Lexer Error: {0} at column{1} in expression [{2}].","ueoe":"Unexpected end of expression: {0}","isecwindow":"Referencing the Window in Angular expressions is disallowed! Expression: {0}","isecfn":"Referencing Function in Angular expressions is disallowed! Expression: {0}"},"$httpBackend":{"noxhr":"This browser does not support XMLHttpRequest."},"$location":{"ipthprfx":"Invalid url \"{0}\", missing path prefix \"{1}\".","isrcharg":"The first argument of the `$location#search()` call must be a string or an object.","ihshprfx":"Invalid url \"{0}\", missing hash prefix \"{1}\"."},"$resource":{"badargs":"Expected up to 4 arguments [params, data, success, error], got {0} arguments","badcfg":"Error in resource configuration. Expected response to contain an {0} but got an {1}","badname":"hasOwnProperty is not a valid parameter name."},"$sanitize":{"badparse":"The sanitizer was unable to parse the following block of html: {0}"}}}
2 changes: 1 addition & 1 deletion app/lib/angular/version.json
@@ -1 +1 @@
{"full":"1.2.0-rc.2","major":"1","minor":"2","dot":"0","codename":"barehand-atomsplitting","cdn":"1.2.0rc1"}
{"full":"1.2.0-rc.3","major":"1","minor":"2","dot":"0","codename":"ferocious-twitch","cdn":"1.2.0-rc.2"}
2 changes: 1 addition & 1 deletion app/lib/angular/version.txt
@@ -1 +1 @@
1.2.0-rc.2
1.2.0-rc.3
190 changes: 160 additions & 30 deletions test/lib/angular/angular-mocks.js
@@ -1,5 +1,5 @@
/**
* @license AngularJS v1.2.0-rc.2
* @license AngularJS v1.2.0-rc.3
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*
Expand Down Expand Up @@ -75,6 +75,13 @@ angular.mock.$Browser = function() {
};


/**
* @name ngMock.$browser#defer.now
* @propertyOf ngMock.$browser
*
* @description
* Current milliseconds mock time.
*/
self.defer.now = 0;


Expand Down Expand Up @@ -119,29 +126,6 @@ angular.mock.$Browser = function() {
}
};

/**
* @name ngMock.$browser#defer.flushNext
* @methodOf ngMock.$browser
*
* @description
* Flushes next pending request and compares it to the provided delay
*
* @param {number=} expectedDelay the delay value that will be asserted against the delay of the next timeout function
*/
self.defer.flushNext = function(expectedDelay) {
var tick = self.deferredFns.shift();
expect(tick.time).toEqual(expectedDelay);
tick.fn();
};

/**
* @name ngMock.$browser#defer.now
* @propertyOf ngMock.$browser
*
* @description
* Current milliseconds mock time.
*/

self.$$baseHref = '';
self.baseHref = function() {
return this.$$baseHref;
Expand Down Expand Up @@ -454,6 +438,119 @@ angular.mock.$LogProvider = function() {
};


/**
* @ngdoc service
* @name ngMock.$interval
*
* @description
* Mock implementation of the $interval service.
*
* Use {@link ngMock.$interval#flush `$interval.flush(millis)`} to
* move forward by `millis` milliseconds and trigger any functions scheduled to run in that
* time.
*
* @param {function()} fn A function that should be called repeatedly.
* @param {number} delay Number of milliseconds between each function call.
* @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat
* indefinitely.
* @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise
* will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.
* @returns {promise} A promise which will be notified on each iteration.
*/
angular.mock.$IntervalProvider = function() {
this.$get = ['$rootScope', '$q',
function($rootScope, $q) {
var repeatFns = [],
nextRepeatId = 0,
now = 0;

var $interval = function(fn, delay, count, invokeApply) {
var deferred = $q.defer(),
promise = deferred.promise,
count = (angular.isDefined(count)) ? count : 0,
iteration = 0,
skipApply = (angular.isDefined(invokeApply) && !invokeApply);

promise.then(null, null, fn);

promise.$$intervalId = nextRepeatId;

function tick() {
deferred.notify(iteration++);

if (count > 0 && iteration >= count) {
var fnIndex;
deferred.resolve(iteration);

angular.forEach(repeatFns, function(fn, index) {
if (fn.id === promise.$$intervalId) fnIndex = index;
});

if (fnIndex !== undefined) {
repeatFns.splice(fnIndex, 1);
}
}

if (!skipApply) $rootScope.$apply();
};

repeatFns.push({
nextTime:(now + delay),
delay: delay,
fn: tick,
id: nextRepeatId,
deferred: deferred
});
repeatFns.sort(function(a,b){ return a.nextTime - b.nextTime;});

nextRepeatId++;
return promise;
};

$interval.cancel = function(promise) {
var fnIndex;

angular.forEach(repeatFns, function(fn, index) {
if (fn.id === promise.$$intervalId) fnIndex = index;
});

if (fnIndex !== undefined) {
repeatFns[fnIndex].deferred.reject('canceled');
repeatFns.splice(fnIndex, 1);
return true;
}

return false;
};

/**
* @ngdoc method
* @name ngMock.$interval#flush
* @methodOf ngMock.$interval
* @description
*
* Runs interval tasks scheduled to be run in the next `millis` milliseconds.
*
* @param {number=} millis maximum timeout amount to flush up until.
*
* @return {number} The amount of time moved forward.
*/
$interval.flush = function(millis) {
now += millis;
while (repeatFns.length && repeatFns[0].nextTime <= now) {
var task = repeatFns[0];
task.fn();
task.nextTime += task.delay;
repeatFns.sort(function(a,b){ return a.nextTime - b.nextTime;});
}
return millis;
};

return $interval;
}];
};


(function() {
var R_ISO8061_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;

Expand Down Expand Up @@ -672,7 +769,7 @@ angular.mock.animate = angular.module('mock.animate', ['ng'])
}
};

forEach(['enter','leave','move','addClass','removeClass'], function(method) {
angular.forEach(['enter','leave','move','addClass','removeClass'], function(method) {
animate[method] = function() {
var params = arguments;
animate.queue.push({
Expand Down Expand Up @@ -747,7 +844,7 @@ angular.mock.dump = function(object) {
offset = offset || ' ';
var log = [offset + 'Scope(' + scope.$id + '): {'];
for ( var key in scope ) {
if (scope.hasOwnProperty(key) && !key.match(/^(\$|this)/)) {
if (Object.prototype.hasOwnProperty.call(scope, key) && !key.match(/^(\$|this)/)) {
log.push(' ' + key + ': ' + angular.toJson(scope[key]));
}
}
Expand Down Expand Up @@ -1597,6 +1694,7 @@ angular.module('ngMock', ['ng']).provider({
$browser: angular.mock.$BrowserProvider,
$exceptionHandler: angular.mock.$ExceptionHandlerProvider,
$log: angular.mock.$LogProvider,
$interval: angular.mock.$IntervalProvider,
$httpBackend: angular.mock.$HttpBackendProvider,
$rootElement: angular.mock.$RootElementProvider
}).config(function($provide) {
Expand Down Expand Up @@ -1789,7 +1887,7 @@ angular.mock.clearDataCache = function() {
cache = angular.element.cache;

for(key in cache) {
if (cache.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(cache,key)) {
var handle = cache[key].handle;

handle && angular.element(handle.elem).off();
Expand Down Expand Up @@ -1892,8 +1990,40 @@ angular.mock.clearDataCache = function() {
* instance of {@link AUTO.$injector $injector} per test, which is then used for
* resolving references.
*
* See also {@link angular.mock.module module}
*
* ## Resolving References (Underscore Wrapping)
* Often, we would like to inject a reference once, in a `beforeEach()` block and reuse this
* in multiple `it()` clauses. To be able to do this we must assign the reference to a variable
* that is declared in the scope of the `describe()` block. Since we would, most likely, want
* the variable to have the same name of the reference we have a problem, since the parameter
* to the `inject()` function would hide the outer variable.
*
* To help with this, the injected parameters can, optionally, be enclosed with underscores.
* These are ignored by the injector when the reference name is resolved.
*
* For example, the parameter `_myService_` would be resolved as the reference `myService`.
* Since it is available in the function body as _myService_, we can then assign it to a variable
* defined in an outer scope.
*
* ```
* // Defined out reference variable outside
* var myService;
*
* // Wrap the parameter in underscores
* beforeEach( inject( function(_myService_){
* myService = _myService_;
* }));
*
* // Use myService in a series of tests.
* it('makes use of myService', function() {
* myService.doStuff();
* });
*
* ```
*
* See also {@link angular.mock.module angular.mock.module}
*
* ## Example
* Example of what a typical jasmine tests looks like with the inject method.
* <pre>
*
Expand Down Expand Up @@ -1926,11 +2056,11 @@ angular.mock.clearDataCache = function() {
* inject(function(version) {
* expect(version).toEqual('overridden');
* });
* ));
* });
* });
*
* </pre>
*
*
* @param {...Function} fns any number of functions which will be injected using the injector.
*/
window.inject = angular.mock.inject = function() {
Expand Down
22,091 changes: 11,786 additions & 10,305 deletions test/lib/angular/angular-scenario.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test/lib/angular/version.txt
@@ -1 +1 @@
1.2.0-rc.2
1.2.0-rc.3