mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-04-24 11:22:48 +00:00

This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # HTTP URLs that Could Not Be Fixed These URLs were unable to be fixed. Please review them to see if they can be manually resolved. * [ ] http://erik.eae.net/archives/2007/07/27/18.54.15/ (200) with 1 occurrences could not be migrated: ([https](https://erik.eae.net/archives/2007/07/27/18.54.15/) result SSLHandshakeException). * [ ] http://javascript.nwbox.com/IEContentLoaded/ (200) with 1 occurrences could not be migrated: ([https](https://javascript.nwbox.com/IEContentLoaded/) result SSLHandshakeException). * [ ] http://blindsignals.com/index.php/2009/07/jquery-delay/ (301) with 1 occurrences could not be migrated: ([https](https://blindsignals.com/index.php/2009/07/jquery-delay/) result SSLHandshakeException). # Fixed URLs ## Fixed But Review Recommended These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended. * [ ] http://fontawesome.io (301) with 4 occurrences migrated to: https://fontawesome.com?from=io ([https](https://fontawesome.io) result AnnotatedConnectException). * [ ] http://jsperf.com/getall-vs-sizzle/2 (301) with 1 occurrences migrated to: https://jsperf.com/getall-vs-sizzle/2 ([https](https://jsperf.com/getall-vs-sizzle/2) result ReadTimeoutException). * [ ] http://wiki.ecmascript.org/doku.php?id=harmony:egal (ConnectTimeoutException) with 1 occurrences migrated to: https://wiki.ecmascript.org/doku.php?id=harmony:egal ([https](https://wiki.ecmascript.org/doku.php?id=harmony:egal) result ConnectTimeoutException). * [ ] http://www.w3.org/TR/html4/loose.dtd (ReadTimeoutException) with 1 occurrences migrated to: https://www.w3.org/TR/html4/loose.dtd ([https](https://www.w3.org/TR/html4/loose.dtd) result ReadTimeoutException). * [ ] http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ (301) with 1 occurrences migrated to: https://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ ([https](https://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/) result 404). * [ ] http://github.com/sprinframework (301) with 4 occurrences migrated to: https://github.com/sprinframework ([https](https://github.com/sprinframework) result 404). * [ ] http://github.com/spring_hadoop (301) with 4 occurrences migrated to: https://github.com/spring_hadoop ([https](https://github.com/spring_hadoop) result 404). * [ ] http://json.org/json2.js (404) with 1 occurrences migrated to: https://json.org/json2.js ([https](https://json.org/json2.js) result 404). * [ ] http://pivotal.github.com/jasmine (404) with 1 occurrences migrated to: https://pivotal.github.com/jasmine ([https](https://pivotal.github.com/jasmine) result 404). * [ ] http://springframework.org/docs/petclinic.html (404) with 1 occurrences migrated to: https://springframework.org/docs/petclinic.html ([https](https://springframework.org/docs/petclinic.html) result 404). ## Fixed Success These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended. * [ ] http://backbonejs.org with 1 occurrences migrated to: https://backbonejs.org ([https](https://backbonejs.org) result 200). * [ ] http://bugs.jquery.com/ticket/12282 with 1 occurrences migrated to: https://bugs.jquery.com/ticket/12282 ([https](https://bugs.jquery.com/ticket/12282) result 200). * [ ] http://bugs.jquery.com/ticket/12359 with 1 occurrences migrated to: https://bugs.jquery.com/ticket/12359 ([https](https://bugs.jquery.com/ticket/12359) result 200). * [ ] http://bugs.jquery.com/ticket/13378 with 1 occurrences migrated to: https://bugs.jquery.com/ticket/13378 ([https](https://bugs.jquery.com/ticket/13378) result 200). * [ ] http://creativecommons.org/licenses/by/3.0/ with 2 occurrences migrated to: https://creativecommons.org/licenses/by/3.0/ ([https](https://creativecommons.org/licenses/by/3.0/) result 200). * [ ] http://diveintohtml5.info/history.html with 1 occurrences migrated to: https://diveintohtml5.info/history.html ([https](https://diveintohtml5.info/history.html) result 200). * [ ] http://docs.spring.io/spring-data/jpa/docs/1.3.4.RELEASE/api/ with 1 occurrences migrated to: https://docs.spring.io/spring-data/jpa/docs/1.3.4.RELEASE/api/ ([https](https://docs.spring.io/spring-data/jpa/docs/1.3.4.RELEASE/api/) result 200). * [ ] http://docs.spring.io/spring-data/jpa/docs/1.3.4.RELEASE/reference/html/ with 1 occurrences migrated to: https://docs.spring.io/spring-data/jpa/docs/1.3.4.RELEASE/reference/html/ ([https](https://docs.spring.io/spring-data/jpa/docs/1.3.4.RELEASE/reference/html/) result 200). * [ ] http://docs.spring.io/spring-data/jpa/docs/1.4.0.RC1/api/ with 1 occurrences migrated to: https://docs.spring.io/spring-data/jpa/docs/1.4.0.RC1/api/ ([https](https://docs.spring.io/spring-data/jpa/docs/1.4.0.RC1/api/) result 200). * [ ] http://docs.spring.io/spring-data/jpa/docs/1.4.0.RC1/reference/html/ with 1 occurrences migrated to: https://docs.spring.io/spring-data/jpa/docs/1.4.0.RC1/reference/html/ ([https](https://docs.spring.io/spring-data/jpa/docs/1.4.0.RC1/reference/html/) result 200). * [ ] http://github.com/spring-projects/gh-pages with 1 occurrences migrated to: https://github.com/spring-projects/gh-pages ([https](https://github.com/spring-projects/gh-pages) result 200). * [ ] http://github.com/spring-projects/spring-petclinic with 1 occurrences migrated to: https://github.com/spring-projects/spring-petclinic ([https](https://github.com/spring-projects/spring-petclinic) result 200). * [ ] http://imgs.mi9.com/uploads/landscape/2101/beautiful-leaf-wallpapers_1280x960_28083.jpg with 1 occurrences migrated to: https://imgs.mi9.com/uploads/landscape/2101/beautiful-leaf-wallpapers_1280x960_28083.jpg ([https](https://imgs.mi9.com/uploads/landscape/2101/beautiful-leaf-wallpapers_1280x960_28083.jpg) result 200). * [ ] http://jekyllrb.com with 1 occurrences migrated to: https://jekyllrb.com ([https](https://jekyllrb.com) result 200). * [ ] http://jquery.com/ with 1 occurrences migrated to: https://jquery.com/ ([https](https://jquery.com/) result 200). * [ ] http://opensource.org/licenses/mit-license.html with 2 occurrences migrated to: https://opensource.org/licenses/mit-license.html ([https](https://opensource.org/licenses/mit-license.html) result 200). * [ ] http://pages.github.com/ with 1 occurrences migrated to: https://pages.github.com/ ([https](https://pages.github.com/) result 200). * [ ] http://rubygems.org with 1 occurrences migrated to: https://rubygems.org ([https](https://rubygems.org) result 200). * [ ] http://rubygems.org/ with 1 occurrences migrated to: https://rubygems.org/ ([https](https://rubygems.org/) result 200). * [ ] http://silviomoreto.github.io/bootstrap-select/ with 2 occurrences migrated to: https://silviomoreto.github.io/bootstrap-select/ ([https](https://silviomoreto.github.io/bootstrap-select/) result 200). * [ ] http://sizzlejs.com/ with 2 occurrences migrated to: https://sizzlejs.com/ ([https](https://sizzlejs.com/) result 200). * [ ] http://spring.io/guides/gs/gradle/ with 1 occurrences migrated to: https://spring.io/guides/gs/gradle/ ([https](https://spring.io/guides/gs/gradle/) result 200). * [ ] http://spring.io/guides/gs/maven/ with 1 occurrences migrated to: https://spring.io/guides/gs/maven/ ([https](https://spring.io/guides/gs/maven/) result 200). * [ ] http://stackoverflow.com/questions/tagged/spring-data-jpa with 1 occurrences migrated to: https://stackoverflow.com/questions/tagged/spring-data-jpa ([https](https://stackoverflow.com/questions/tagged/spring-data-jpa) result 200). * [ ] http://twitter.com/byscuits with 2 occurrences migrated to: https://twitter.com/byscuits ([https](https://twitter.com/byscuits) result 200). * [ ] http://twitter.com/fontawesome with 2 occurrences migrated to: https://twitter.com/fontawesome ([https](https://twitter.com/fontawesome) result 200). * [ ] http://underscorejs.org with 1 occurrences migrated to: https://underscorejs.org ([https](https://underscorejs.org) result 200). * [ ] http://kyruus.com (301) with 2 occurrences migrated to: https://www.kyruus.com/ ([https](https://kyruus.com) result 200). * [ ] http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html with 1 occurrences migrated to: https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html ([https](https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html) result 200). * [ ] http://www.w3.org/TR/2011/REC-css3-selectors-20110929/ with 2 occurrences migrated to: https://www.w3.org/TR/2011/REC-css3-selectors-20110929/ ([https](https://www.w3.org/TR/2011/REC-css3-selectors-20110929/) result 200). * [ ] http://www.w3.org/TR/CSS21/syndata.html with 2 occurrences migrated to: https://www.w3.org/TR/CSS21/syndata.html ([https](https://www.w3.org/TR/CSS21/syndata.html) result 200). * [ ] http://www.w3.org/TR/selectors/ with 4 occurrences migrated to: https://www.w3.org/TR/selectors/ ([https](https://www.w3.org/TR/selectors/) result 200). * [ ] http://dev.w3.org/csswg/cssom/ with 1 occurrences migrated to: https://dev.w3.org/csswg/cssom/ ([https](https://dev.w3.org/csswg/cssom/) result 301). * [ ] http://docs.python.org/library/functions.html with 1 occurrences migrated to: https://docs.python.org/library/functions.html ([https](https://docs.python.org/library/functions.html) result 301). * [ ] http://forum.spring.io/forum/spring-projects/data with 1 occurrences migrated to: https://forum.spring.io/forum/spring-projects/data ([https](https://forum.spring.io/forum/spring-projects/data) result 301). * [ ] http://github.com/SpringSource/spring-data-jpa with 1 occurrences migrated to: https://github.com/SpringSource/spring-data-jpa ([https](https://github.com/SpringSource/spring-data-jpa) result 301). * [ ] http://github.com/pivotal/jasmine-ajax with 1 occurrences migrated to: https://github.com/pivotal/jasmine-ajax ([https](https://github.com/pivotal/jasmine-ajax) result 301). * [ ] http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_ with 1 occurrences migrated to: https://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_ ([https](https://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_) result 301). * [ ] http://jira.springsource.org/browse/DATAJPA with 1 occurrences migrated to: https://jira.springsource.org/browse/DATAJPA ([https](https://jira.springsource.org/browse/DATAJPA) result 301). * [ ] http://jquery.org/license with 2 occurrences migrated to: https://jquery.org/license ([https](https://jquery.org/license) result 301). * [ ] http://projects.spring.io/spring-data-jpa with 1 occurrences migrated to: https://projects.spring.io/spring-data-jpa ([https](https://projects.spring.io/spring-data-jpa) result 301). * [ ] http://spring-projects.github.io/ with 1 occurrences migrated to: https://spring-projects.github.io/ ([https](https://spring-projects.github.io/) result 301). * [ ] http://twitter.github.com/bootstrap/javascript.html with 13 occurrences migrated to: https://twitter.github.com/bootstrap/javascript.html ([https](https://twitter.github.com/bootstrap/javascript.html) result 301). * [ ] http://www.modernizr.com/ with 1 occurrences migrated to: https://www.modernizr.com/ ([https](https://www.modernizr.com/) result 301). * [ ] http://www.spring.io with 8 occurrences migrated to: https://www.spring.io ([https](https://www.spring.io) result 301). * [ ] http://www.w3.org/TR/css3-selectors/ with 2 occurrences migrated to: https://www.w3.org/TR/css3-selectors/ ([https](https://www.w3.org/TR/css3-selectors/) result 301). * [ ] http://www.w3.org/TR/css3-syntax/ with 1 occurrences migrated to: https://www.w3.org/TR/css3-syntax/ ([https](https://www.w3.org/TR/css3-syntax/) result 301). * [ ] http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx with 2 occurrences migrated to: https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx ([https](https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx) result 302). * [ ] http://repo.spring.io/milestone with 4 occurrences migrated to: https://repo.spring.io/milestone ([https](https://repo.spring.io/milestone) result 302). * [ ] http://scripts.sil.org/OFL with 2 occurrences migrated to: https://scripts.sil.org/OFL ([https](https://scripts.sil.org/OFL) result 302). * [ ] http://stackoverflow.com/questions/tagged/spring-framework with 2 occurrences migrated to: https://stackoverflow.com/questions/tagged/spring-framework ([https](https://stackoverflow.com/questions/tagged/spring-framework) result 302). * [ ] http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context with 1 occurrences migrated to: https://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context ([https](https://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context) result 302). # Ignored These URLs were intentionally ignored. * http://localhost:4000/spring-xyz/ with 1 occurrences * http://localhost:8080/ with 1 occurrences * http://localhost:8080/petclinic with 1 occurrences * http://www with 1 occurrences
207 lines
5.3 KiB
JavaScript
207 lines
5.3 KiB
JavaScript
/*
|
|
Jasmine-Ajax : a set of helpers for testing AJAX requests under the Jasmine
|
|
BDD framework for JavaScript.
|
|
|
|
Supports both Prototype.js and jQuery.
|
|
|
|
https://github.com/pivotal/jasmine-ajax
|
|
|
|
Jasmine Home page: https://pivotal.github.com/jasmine
|
|
|
|
Copyright (c) 2008-2010 Pivotal Labs
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
a copy of this software and associated documentation files (the
|
|
"Software"), to deal in the Software without restriction, including
|
|
without limitation the rights to use, copy, modify, merge, publish,
|
|
distribute, sublicense, and/or sell copies of the Software, and to
|
|
permit persons to whom the Software is furnished to do so, subject to
|
|
the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be
|
|
included in all copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
// Jasmine-Ajax interface
|
|
var ajaxRequests = [];
|
|
|
|
function mostRecentAjaxRequest() {
|
|
if (ajaxRequests.length > 0) {
|
|
return ajaxRequests[ajaxRequests.length - 1];
|
|
} else {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
function clearAjaxRequests() {
|
|
ajaxRequests = [];
|
|
}
|
|
|
|
// Fake XHR for mocking Ajax Requests & Responses
|
|
function FakeXMLHttpRequest() {
|
|
var extend = Object.extend || $.extend;
|
|
extend(this, {
|
|
requestHeaders: {},
|
|
|
|
open: function() {
|
|
this.method = arguments[0];
|
|
this.url = arguments[1];
|
|
this.readyState = 1;
|
|
},
|
|
|
|
setRequestHeader: function(header, value) {
|
|
this.requestHeaders[header] = value;
|
|
},
|
|
|
|
abort: function() {
|
|
this.readyState = 0;
|
|
},
|
|
|
|
readyState: 0,
|
|
|
|
onreadystatechange: function(isTimeout) {
|
|
},
|
|
|
|
status: null,
|
|
|
|
send: function(data) {
|
|
this.params = data;
|
|
this.readyState = 2;
|
|
},
|
|
|
|
getResponseHeader: function(name) {
|
|
return this.responseHeaders[name];
|
|
},
|
|
|
|
getAllResponseHeaders: function() {
|
|
var responseHeaders = [];
|
|
for (var i in this.responseHeaders) {
|
|
if (this.responseHeaders.hasOwnProperty(i)) {
|
|
responseHeaders.push(i + ': ' + this.responseHeaders[i]);
|
|
}
|
|
}
|
|
return responseHeaders.join('\r\n');
|
|
},
|
|
|
|
responseText: null,
|
|
|
|
response: function(response) {
|
|
this.status = response.status;
|
|
this.responseText = response.responseText || "";
|
|
this.readyState = 4;
|
|
this.responseHeaders = response.responseHeaders ||
|
|
{"Content-type": response.contentType || "application/json" };
|
|
// uncomment for jquery 1.3.x support
|
|
// jasmine.Clock.tick(20);
|
|
|
|
this.onreadystatechange();
|
|
},
|
|
responseTimeout: function() {
|
|
this.readyState = 4;
|
|
jasmine.Clock.tick(jQuery.ajaxSettings.timeout || 30000);
|
|
this.onreadystatechange('timeout');
|
|
}
|
|
});
|
|
|
|
return this;
|
|
}
|
|
|
|
|
|
jasmine.Ajax = {
|
|
|
|
isInstalled: function() {
|
|
return jasmine.Ajax.installed == true;
|
|
},
|
|
|
|
assertInstalled: function() {
|
|
if (!jasmine.Ajax.isInstalled()) {
|
|
throw new Error("Mock ajax is not installed, use jasmine.Ajax.useMock()")
|
|
}
|
|
},
|
|
|
|
useMock: function() {
|
|
if (!jasmine.Ajax.isInstalled()) {
|
|
var spec = jasmine.getEnv().currentSpec;
|
|
spec.after(jasmine.Ajax.uninstallMock);
|
|
|
|
jasmine.Ajax.installMock();
|
|
}
|
|
},
|
|
|
|
installMock: function() {
|
|
if (typeof jQuery != 'undefined') {
|
|
jasmine.Ajax.installJquery();
|
|
} else if (typeof Prototype != 'undefined') {
|
|
jasmine.Ajax.installPrototype();
|
|
} else {
|
|
throw new Error("jasmine.Ajax currently only supports jQuery and Prototype");
|
|
}
|
|
jasmine.Ajax.installed = true;
|
|
},
|
|
|
|
installJquery: function() {
|
|
jasmine.Ajax.mode = 'jQuery';
|
|
jasmine.Ajax.real = jQuery.ajaxSettings.xhr;
|
|
jQuery.ajaxSettings.xhr = jasmine.Ajax.jQueryMock;
|
|
|
|
},
|
|
|
|
installPrototype: function() {
|
|
jasmine.Ajax.mode = 'Prototype';
|
|
jasmine.Ajax.real = Ajax.getTransport;
|
|
|
|
Ajax.getTransport = jasmine.Ajax.prototypeMock;
|
|
},
|
|
|
|
uninstallMock: function() {
|
|
jasmine.Ajax.assertInstalled();
|
|
if (jasmine.Ajax.mode == 'jQuery') {
|
|
jQuery.ajaxSettings.xhr = jasmine.Ajax.real;
|
|
} else if (jasmine.Ajax.mode == 'Prototype') {
|
|
Ajax.getTransport = jasmine.Ajax.real;
|
|
}
|
|
jasmine.Ajax.reset();
|
|
},
|
|
|
|
reset: function() {
|
|
jasmine.Ajax.installed = false;
|
|
jasmine.Ajax.mode = null;
|
|
jasmine.Ajax.real = null;
|
|
},
|
|
|
|
jQueryMock: function() {
|
|
var newXhr = new FakeXMLHttpRequest();
|
|
ajaxRequests.push(newXhr);
|
|
return newXhr;
|
|
},
|
|
|
|
prototypeMock: function() {
|
|
return new FakeXMLHttpRequest();
|
|
},
|
|
|
|
installed: false,
|
|
mode: null
|
|
}
|
|
|
|
|
|
// Jasmine-Ajax Glue code for Prototype.js
|
|
if (typeof Prototype != 'undefined' && Ajax && Ajax.Request) {
|
|
Ajax.Request.prototype.originalRequest = Ajax.Request.prototype.request;
|
|
Ajax.Request.prototype.request = function(url) {
|
|
this.originalRequest(url);
|
|
ajaxRequests.push(this);
|
|
};
|
|
|
|
Ajax.Request.prototype.response = function(responseOptions) {
|
|
return this.transport.response(responseOptions);
|
|
};
|
|
}
|