Skip to content

Commit

Permalink
chore: updated bundled angularjs lib from angular-1.2.0-rc.2 to
Browse files Browse the repository at this point in the history
angular-1.2.32 (latest of the 1.2 release series) + updated and fixed
dependencies on karma + jasmine modules so that tests would run and pass
again
  • Loading branch information
atufkas committed Feb 19, 2018
1 parent bff2943 commit ff6d5a9
Show file tree
Hide file tree
Showing 2,288 changed files with 215,229 additions and 67,607 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

Date: February 19, 2018

- chore: updated bundled angularjs lib from angular-1.2.0-rc.2 to
angular-1.2.32 (latest of the 1.2 release series) + updated and fixed
dependencies on karma + jasmine modules so that tests would run and pass again
- chore: Reformatted this changelog to move towards compatibility with
[Conventional Commits Specification](https://conventionalcommits.org/) and [progress-keeper](https://github.com/atufkas/progress-keeper) :-)

Expand Down
6 changes: 3 additions & 3 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
This app uses the great api of the <a href="http://openweathermap.org/">Open Weather Map</a> project.</span>
</small>
</nav>
<script src="lib/angular/angular.js"></script>
<script src="lib/angular/angular-route.js"></script>
<script src="lib/angular/angular-resource.js"></script>
<script src="lib/angular-1.2.32/angular.js"></script>
<script src="lib/angular-1.2.32/angular-route.js"></script>
<script src="lib/angular-1.2.32/angular-resource.js"></script>
<script src="lib/iso-3166-country-codes-angular/iso-3166-country-codes-angular.js"></script>
<script src="js/app.js"></script>
<script src="js/services.js"></script>
Expand Down
1,704 changes: 1,704 additions & 0 deletions app/lib/angular-1.2.32/angular-animate.js

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions app/lib/angular-1.2.32/angular-animate.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions app/lib/angular-1.2.32/angular-animate.min.js.map

Large diffs are not rendered by default.

206 changes: 206 additions & 0 deletions app/lib/angular-1.2.32/angular-cookies.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
/**
* @license AngularJS v1.2.32
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {'use strict';

/**
* @ngdoc module
* @name ngCookies
* @description
*
* # ngCookies
*
* The `ngCookies` module provides a convenient wrapper for reading and writing browser cookies.
*
*
* <div doc-module-components="ngCookies"></div>
*
* See {@link ngCookies.$cookies `$cookies`} and
* {@link ngCookies.$cookieStore `$cookieStore`} for usage.
*/


angular.module('ngCookies', ['ng']).
/**
* @ngdoc service
* @name $cookies
*
* @description
* Provides read/write access to browser's cookies.
*
* Only a simple Object is exposed and by adding or removing properties to/from this object, new
* cookies are created/deleted at the end of current $eval.
* The object's properties can only be strings.
*
* Requires the {@link ngCookies `ngCookies`} module to be installed.
*
* @example
*
* ```js
* angular.module('cookiesExample', ['ngCookies'])
* .controller('ExampleController', ['$cookies', function($cookies) {
* // Retrieving a cookie
* var favoriteCookie = $cookies.myFavorite;
* // Setting a cookie
* $cookies.myFavorite = 'oatmeal';
* }]);
* ```
*/
factory('$cookies', ['$rootScope', '$browser', function ($rootScope, $browser) {
var cookies = {},
lastCookies = {},
lastBrowserCookies,
runEval = false,
copy = angular.copy,
isUndefined = angular.isUndefined;

//creates a poller fn that copies all cookies from the $browser to service & inits the service
$browser.addPollFn(function() {
var currentCookies = $browser.cookies();
if (lastBrowserCookies != currentCookies) { //relies on browser.cookies() impl
lastBrowserCookies = currentCookies;
copy(currentCookies, lastCookies);
copy(currentCookies, cookies);
if (runEval) $rootScope.$apply();
}
})();

runEval = true;

//at the end of each eval, push cookies
//TODO: this should happen before the "delayed" watches fire, because if some cookies are not
// strings or browser refuses to store some cookies, we update the model in the push fn.
$rootScope.$watch(push);

return cookies;


/**
* Pushes all the cookies from the service to the browser and verifies if all cookies were
* stored.
*/
function push() {
var name,
value,
browserCookies,
updated;

//delete any cookies deleted in $cookies
for (name in lastCookies) {
if (isUndefined(cookies[name])) {
$browser.cookies(name, undefined);
}
}

//update all cookies updated in $cookies
for(name in cookies) {
value = cookies[name];
if (!angular.isString(value)) {
value = '' + value;
cookies[name] = value;
}
if (value !== lastCookies[name]) {
$browser.cookies(name, value);
updated = true;
}
}

//verify what was actually stored
if (updated){
updated = false;
browserCookies = $browser.cookies();

for (name in cookies) {
if (cookies[name] !== browserCookies[name]) {
//delete or reset all cookies that the browser dropped from $cookies
if (isUndefined(browserCookies[name])) {
delete cookies[name];
} else {
cookies[name] = browserCookies[name];
}
updated = true;
}
}
}
}
}]).


/**
* @ngdoc service
* @name $cookieStore
* @requires $cookies
*
* @description
* Provides a key-value (string-object) storage, that is backed by session cookies.
* Objects put or retrieved from this storage are automatically serialized or
* deserialized by angular's toJson/fromJson.
*
* Requires the {@link ngCookies `ngCookies`} module to be installed.
*
* @example
*
* ```js
* angular.module('cookieStoreExample', ['ngCookies'])
* .controller('ExampleController', ['$cookieStore', function($cookieStore) {
* // Put cookie
* $cookieStore.put('myFavorite','oatmeal');
* // Get cookie
* var favoriteCookie = $cookieStore.get('myFavorite');
* // Removing a cookie
* $cookieStore.remove('myFavorite');
* }]);
* ```
*/
factory('$cookieStore', ['$cookies', function($cookies) {

return {
/**
* @ngdoc method
* @name $cookieStore#get
*
* @description
* Returns the value of given cookie key
*
* @param {string} key Id to use for lookup.
* @returns {Object} Deserialized cookie value.
*/
get: function(key) {
var value = $cookies[key];
return value ? angular.fromJson(value) : value;
},

/**
* @ngdoc method
* @name $cookieStore#put
*
* @description
* Sets a value for given cookie key
*
* @param {string} key Id for the `value`.
* @param {Object} value Value to be stored.
*/
put: function(key, value) {
$cookies[key] = angular.toJson(value);
},

/**
* @ngdoc method
* @name $cookieStore#remove
*
* @description
* Remove given cookie
*
* @param {string} key Id of the key-value pair to delete.
*/
remove: function(key) {
delete $cookies[key];
}
};

}]);


})(window, window.angular);
8 changes: 8 additions & 0 deletions app/lib/angular-1.2.32/angular-cookies.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ff6d5a9

Please sign in to comment.