Skip to content
Browse files

moved config.ajax to config.request

  • Loading branch information...
1 parent c607fad commit 96c1405ea5c7f83798e15009bd6c73834886c855 @johnbender committed
Showing with 7 additions and 7 deletions.
  1. +2 −2 Readme.md
  2. +3 −3 lib/jquery.flawed.js
  3. +2 −2 spec/unit/spec.js
View
4 Readme.md
@@ -19,11 +19,11 @@ Server side, with flawed's default configuration, simply handle POST requests at
Changing the default path is recommended:
- $.flawed.config.ajax.path = '/your/path/here' // default '/'
+ $.flawed.config.request.path = '/your/path/here' // default '/'
Other settings include:
- $.flawed.config.ajax.type // 'POST', 'GET', etc
+ $.flawed.config.request.type // 'POST', 'GET', etc
$.flawed.config.header // default: 'x-jquery-flawed-stack'
## javascript-stacktrace
View
6 lib/jquery.flawed.js
@@ -14,7 +14,7 @@ jQuery.flawed = function (scope){
else
stack = error;
- request_params = jQuery.extend(jQuery.flawed.config.ajax, {
+ request_params = jQuery.extend(jQuery.flawed.config.request, {
data: {
url: $(location).attr('href'),
message: error.message,
@@ -33,9 +33,9 @@ jQuery.flawed = function (scope){
};
};
-// Default settings
+// Default config
jQuery.flawed.config = {
- ajax: {
+ request: {
type: "POST",
path: "/"
},
View
4 spec/unit/spec.js
@@ -50,13 +50,13 @@ describe('jQuery.flawed', function(){
});
it('should post the path set on the flawed object', function(){
- jQuery.flawed.config.ajax.path = '/foo';
+ jQuery.flawed.config.request.path = '/foo';
expect_raise();
expect(proxy.path).to(be, '/foo');
});
it('should use the header defined on the settings object', function(){
- jQuery.flawed.config.ajax.type = 'POST';
+ jQuery.flawed.config.request.type = 'POST';
expect_raise();
expect(proxy.type).to(be, 'POST');
});

0 comments on commit 96c1405

Please sign in to comment.
Something went wrong with that request. Please try again.