Skip to content

Commit

Permalink
chore(*): switch to AngularJS 1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
pkozlowski-opensource committed Jan 24, 2013
1 parent 8c7f6c8 commit bf49453
Show file tree
Hide file tree
Showing 5 changed files with 213 additions and 156 deletions.
2 changes: 1 addition & 1 deletion grunt.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = function(grunt) {
grunt.initConfig({
modules: '', //to be filled in by find-modules task
tplModules: '', //to be filled in by find-templates task
ngversion: '1.0.3',
ngversion: '1.0.4',
pkg:'<json:package.json>',
meta: {
modules: 'angular.module("ui.bootstrap", [<%= modules %>]);',
Expand Down
8 changes: 4 additions & 4 deletions misc/demo-assets/plunker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ angular.module('plunker', [])

.factory('plunkGenerator', function ($document) {

return function (version, module, content) {
return function (ngVersion, version, module, content) {

var form = angular.element('<form style="display: none;" method="post" action="http://plnkr.co/edit/?p=preview" target="_blank"></form>');
var addField = function (name, value) {
Expand All @@ -15,7 +15,7 @@ angular.module('plunker', [])
return '<!doctype html>\n' +
'<html ng-app="plunker">\n' +
' <head>\n' +
' <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.3/angular.js"></script>\n' +
' <script src="http://ajax.googleapis.com/ajax/libs/angularjs/'+ngVersion+'/angular.js"></script>\n' +
' <script src="http://angular-ui.github.com/bootstrap/ui-bootstrap-tpls-'+version+'.js"></script>\n' +
' <script src="example.js"></script>\n' +
' <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet">\n' +
Expand Down Expand Up @@ -44,8 +44,8 @@ angular.module('plunker', [])

$scope.content = {};

$scope.edit = function (version, module, plunker) {
plunkGenerator(version, module, $scope.content);
$scope.edit = function (ngVersion, version, module) {
plunkGenerator(ngVersion, version, module, $scope.content);
};
})

Expand Down
2 changes: 1 addition & 1 deletion misc/demo-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ <h1><%= module.displayName %></h1>
<div class="row-fluid">
<div class="span12" ng-controller="PlunkerCtrl">
<div class="pull-right">
<button class="btn btn-info" id="plunk-btn" ng-click="edit('<%= version%>', '<%= module.name %>')"><i class="icon-edit icon-white"></i> Edit in plunker</button>
<button class="btn btn-info" id="plunk-btn" ng-click="edit('<%= ngversion%>', '<%= version%>', '<%= module.name %>')"><i class="icon-edit icon-white"></i> Edit in plunker</button>
</div>
<tabs>
<pane heading="Markup" plunker-content="markup"><pre ng-non-bindable><code data-language="html"><%- module.html %></code></pre></pane>
Expand Down
35 changes: 29 additions & 6 deletions misc/test-lib/angular-mocks.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/**
* @license AngularJS v1.0.3
* @license AngularJS v1.0.4
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*
Expand Down Expand Up @@ -203,6 +202,30 @@ angular.mock.$Browser.prototype = {
* Mock implementation of {@link ng.$exceptionHandler} that rethrows or logs errors passed
* into it. See {@link ngMock.$exceptionHandlerProvider $exceptionHandlerProvider} for configuration
* information.
*
*
* <pre>
* describe('$exceptionHandlerProvider', function() {
*
* it('should capture log messages and exceptions', function() {
*
* module(function($exceptionHandlerProvider) {
* $exceptionHandlerProvider.mode('log');
* });
*
* inject(function($log, $exceptionHandler, $timeout) {
* $timeout(function() { $log.log(1); });
* $timeout(function() { $log.log(2); throw 'banana peel'; });
* $timeout(function() { $log.log(3); });
* expect($exceptionHandler.errors).toEqual([]);
* expect($log.assertEmpty());
* $timeout.flush();
* expect($exceptionHandler.errors).toEqual(['banana peel']);
* expect($log.log.logs).toEqual([[1], [2], [3]]);
* });
* });
* });
* </pre>
*/

angular.mock.$ExceptionHandlerProvider = function() {
Expand All @@ -221,8 +244,8 @@ angular.mock.$ExceptionHandlerProvider = function() {
* - `rethrow`: If any errors are are passed into the handler in tests, it typically
* means that there is a bug in the application or test, so this mock will
* make these tests fail.
* - `log`: Sometimes it is desirable to test that an error is throw, for this case the `log` mode stores the
* error and allows later assertion of it.
* - `log`: Sometimes it is desirable to test that an error is throw, for this case the `log` mode stores an
* array of errors in `$exceptionHandler.errors`, to allow later assertion of them.
* See {@link ngMock.$log#assertEmpty assertEmpty()} and
* {@link ngMock.$log#reset reset()}
*/
Expand Down Expand Up @@ -562,7 +585,7 @@ angular.mock.$LogProvider = function() {

/**
* @ngdoc function
* @name angular.mock.debug
* @name angular.mock.dump
* @description
*
* *NOTE*: this is not an injectable instance, just a globally available function.
Expand Down Expand Up @@ -745,7 +768,7 @@ angular.mock.dump = function(object) {
}
// testing controller
var $http;
var $httpBackend;
beforeEach(inject(function($injector) {
$httpBackend = $injector.get('$httpBackend');
Expand Down
Loading

0 comments on commit bf49453

Please sign in to comment.