From 18b01848c5f705db795645b6e448adbab90bc904 Mon Sep 17 00:00:00 2001 From: James Daily Date: Tue, 20 Aug 2013 12:12:31 -0400 Subject: [PATCH 1/5] Updated sourceLinkSpec.js to use gruntUtil.getVersion().cdnVersion Updated sourceLinkSpec.js to use gruntUtil.getVersion().cdnVersion instead of the undefined gruntUtil.getVersion().number. https://github.com/angular/angular.js/issues/3616 --- docs/spec/sourceLinkSpec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/spec/sourceLinkSpec.js b/docs/spec/sourceLinkSpec.js index 3dc73cc85c37..4b7716bf0f81 100644 --- a/docs/spec/sourceLinkSpec.js +++ b/docs/spec/sourceLinkSpec.js @@ -21,7 +21,7 @@ describe('Docs Links', function() { it('should have an "view source" button', function() { expect(doc.html()). - toContain(' View source'); + toContain(' View source'); }); }); From 1c3fe51255baf9c7534e90a2411d7be9b64d6f43 Mon Sep 17 00:00:00 2001 From: James Daily Date: Tue, 20 Aug 2013 12:16:42 -0400 Subject: [PATCH 2/5] Update "View source" api documentation link to use gruntUtil.getVersion().cdnVersion Update "View source" api documentation link to use gruntUtil.getVersion().cdnVersion, since gruntUtil.getVersion().number is undefined https://github.com/angular/angular.js/issues/3616 --- docs/src/ngdoc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/ngdoc.js b/docs/src/ngdoc.js index 88d595af9824..c1c5d1c8f809 100644 --- a/docs/src/ngdoc.js +++ b/docs/src/ngdoc.js @@ -437,7 +437,7 @@ Doc.prototype = { if (this.section === 'api') { dom.tag('a', { href: 'http://github.com/angular/angular.js/tree/v' + - gruntUtil.getVersion().number + '/' + self.file + '#L' + self.line, + gruntUtil.getVersion().cdnVersion + '/' + self.file + '#L' + self.line, class: 'view-source btn btn-action' }, function(dom) { dom.tag('i', {class:'icon-zoom-in'}, ' '); dom.text(' View source'); From 95ae39bc22dd0e6ab31089f14cbedf2aa1132944 Mon Sep 17 00:00:00 2001 From: James Daily Date: Tue, 20 Aug 2013 13:49:41 -0400 Subject: [PATCH 3/5] Included test to check that gruntUtil.getVersion().cdnVersion is defined In reaction to Issue 3616, I've added a check that the version code embedded in the View Source link is in fact a defined value. Previously, it referenced gruntUtil.getVersion().number which was an undefined value. --- docs/spec/sourceLinkSpec.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/spec/sourceLinkSpec.js b/docs/spec/sourceLinkSpec.js index 4b7716bf0f81..09083c1dc3ef 100644 --- a/docs/spec/sourceLinkSpec.js +++ b/docs/spec/sourceLinkSpec.js @@ -18,6 +18,10 @@ describe('Docs Links', function() { expect(doc.html()). toContain(' Improve this doc'); }); + + it("should have a defined gruntUtil cdnVersion", function () { + expect(gruntUtil.getVersion().cdnVersion).toBeDefined(); + }); it('should have an "view source" button', function() { expect(doc.html()). From 9c20631d376bfb3ccda2d4a53d42d24146f50de1 Mon Sep 17 00:00:00 2001 From: James Daily Date: Tue, 20 Aug 2013 15:00:15 -0400 Subject: [PATCH 4/5] Replaced cdnVersion with just cdn in View Source link Replaced cdnVersion with just cdn in View Source link --- docs/src/ngdoc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/ngdoc.js b/docs/src/ngdoc.js index c1c5d1c8f809..e752b44709d1 100644 --- a/docs/src/ngdoc.js +++ b/docs/src/ngdoc.js @@ -437,7 +437,7 @@ Doc.prototype = { if (this.section === 'api') { dom.tag('a', { href: 'http://github.com/angular/angular.js/tree/v' + - gruntUtil.getVersion().cdnVersion + '/' + self.file + '#L' + self.line, + gruntUtil.getVersion().cdn + '/' + self.file + '#L' + self.line, class: 'view-source btn btn-action' }, function(dom) { dom.tag('i', {class:'icon-zoom-in'}, ' '); dom.text(' View source'); From 6e86c76f94130fb52f69b98e0862211fbc09e9e6 Mon Sep 17 00:00:00 2001 From: James Daily Date: Tue, 20 Aug 2013 15:01:07 -0400 Subject: [PATCH 5/5] Replaced cdnVersion with just cdn in View Source link test --- docs/spec/sourceLinkSpec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/spec/sourceLinkSpec.js b/docs/spec/sourceLinkSpec.js index 09083c1dc3ef..c17d3cccfbce 100644 --- a/docs/spec/sourceLinkSpec.js +++ b/docs/spec/sourceLinkSpec.js @@ -19,13 +19,13 @@ describe('Docs Links', function() { toContain(' Improve this doc'); }); - it("should have a defined gruntUtil cdnVersion", function () { - expect(gruntUtil.getVersion().cdnVersion).toBeDefined(); + it("should have a defined gruntUtil.getVersion().cdn property", function () { + expect(gruntUtil.getVersion().cdn).toBeDefined(); }); it('should have an "view source" button', function() { expect(doc.html()). - toContain(' View source'); + toContain(' View source'); }); });