Skip to content

Commit

Permalink
Bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Xotic750 committed Jan 5, 2014
1 parent 2e5b29d commit 01ad0ca
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 173 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -12,5 +12,5 @@ Master

[![browser support](https://ci.testling.com/Xotic750/assert-x.png)](https://ci.testling.com/Xotic750/assert-x 'Browser support on Testling CI')

#[assert-x 0.0.15](http://xotic750.github.io/assert-x/)
#[assert-x 0.0.16](http://xotic750.github.io/assert-x/)
###### Graham Fairweather <xotic750@gmail.com>
53 changes: 4 additions & 49 deletions docs/assert-x.js.html
Expand Up @@ -27,7 +27,7 @@ <h1 class="page-title">Source: /home/graham/source_projects/assert-x/lib/assert-
<article>
<pre class="prettyprint source linenums"><code>/**
* @file {@link http://xotic750.github.io/assert-x/ assert-x}. A Javascript assertion library..
* @version 0.0.15
* @version 0.0.16
* @author Graham Fairweather &lt;xotic750@gmail.com>
* @copyright Copyright (c) 2013 Graham Fairweather
* @license {@link &lt;http://www.gnu.org/licenses/gpl-3.0.html> GPL3}
Expand All @@ -50,7 +50,7 @@ <h1 class="page-title">Source: /home/graham/source_projects/assert-x/lib/assert-
* along with this program. If not, see &lt;http://www.gnu.org/licenses/>.
*/

/*global module, define, require, console */
/*global module, define, require */

(function (globalThis) {
'use strict';
Expand All @@ -61,8 +61,7 @@ <h1 class="page-title">Source: /home/graham/source_projects/assert-x/lib/assert-
*/
var assertx = {},
maxMessageLength = 128,
CustomError = utilx.customError('AssertionError', maxMessageLength),
cachedToString;
CustomError = utilx.customError('AssertionError', maxMessageLength);

utilx.objectDefineProperty(assertx, 'AssertionError', {
/**
Expand Down Expand Up @@ -101,55 +100,11 @@ <h1 class="page-title">Source: /home/graham/source_projects/assert-x/lib/assert-
configurable: true
});

/*
if (CustomError.prototype.isPatched) {
console.log('# IS PATCHED');
cachedToString = CustomError.prototype.toString;
utilx.objectDefineProperties(CustomError.prototype, {
toString: {
value: function () {
var theString;

if (utilx.objectInstanceOf(this, assertx.AssertionError)) {
console.log('# IS ASSERTIONERROR');
if (utilx.isString(this.message) &amp;&amp; !utilx.isEmptyString(this.message)) {
theString = this.name + ': ' + utilx.stringTruncate(this.message, maxMessageLength);
} else if (utilx.objectInstanceOf(this, assertx.AssertionError)) {
theString = this.name + ': ';
theString += utilx.stringTruncate(utilx.jsonStringify(this.actual,
utilx.customErrorReplacer), maxMessageLength) + ' ';
theString += this.operator + ' ';
theString += utilx.stringTruncate(utilx.jsonStringify(this.expected,
utilx.customErrorReplacer), maxMessageLength);
}
} else {
console.log('# IS OTHERERROR');
theString = cachedToString.call(this);
}

return theString;
},
enumerable: false,
writable: true,
configurable: true
},

isPatched: {
value: true,
enumerable: false,
writable: true,
configurable: true
}
});
}
*/

utilx.inherits(assertx.AssertionError, CustomError);

utilx.objectDefineProperties(assertx.AssertionError.prototype, {
toString: {
value: function () {
console.log('# CALLED ASSERTION TOSTRING');
var theString;

if (utilx.isString(this.message) &amp;&amp; !utilx.isEmptyString(this.message)) {
Expand Down Expand Up @@ -661,7 +616,7 @@ <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-a
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha3</a> on Sun Jan 05 2014 23:47:36 GMT+0100 (CET)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha3</a> on Sun Jan 05 2014 23:54:05 GMT+0100 (CET)
</footer>

<script> prettyPrint(); </script>
Expand Down
4 changes: 2 additions & 2 deletions docs/assertx.AssertionError.html
Expand Up @@ -130,7 +130,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line41">line 41</a>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line40">line 40</a>
</li></ul></dd>


Expand Down Expand Up @@ -215,7 +215,7 @@ <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-a
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha3</a> on Sun Jan 05 2014 23:47:36 GMT+0100 (CET)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha3</a> on Sun Jan 05 2014 23:54:05 GMT+0100 (CET)
</footer>

<script> prettyPrint(); </script>
Expand Down
30 changes: 15 additions & 15 deletions docs/assertx.html
Expand Up @@ -297,7 +297,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line373">line 373</a>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line328">line 328</a>
</li></ul></dd>


Expand Down Expand Up @@ -538,7 +538,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line416">line 416</a>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line371">line 371</a>
</li></ul></dd>


Expand Down Expand Up @@ -747,7 +747,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line519">line 519</a>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line474">line 474</a>
</li></ul></dd>


Expand Down Expand Up @@ -987,7 +987,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line331">line 331</a>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line286">line 286</a>
</li></ul></dd>


Expand Down Expand Up @@ -1227,7 +1227,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line268">line 268</a>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line223">line 223</a>
</li></ul></dd>


Expand Down Expand Up @@ -1363,7 +1363,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line536">line 536</a>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line491">line 491</a>
</li></ul></dd>


Expand Down Expand Up @@ -1603,7 +1603,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line394">line 394</a>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line349">line 349</a>
</li></ul></dd>


Expand Down Expand Up @@ -1843,7 +1843,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line437">line 437</a>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line392">line 392</a>
</li></ul></dd>


Expand Down Expand Up @@ -2083,7 +2083,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line352">line 352</a>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line307">line 307</a>
</li></ul></dd>


Expand Down Expand Up @@ -2292,7 +2292,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line308">line 308</a>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line263">line 263</a>
</li></ul></dd>


Expand Down Expand Up @@ -2563,7 +2563,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line480">line 480</a>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line435">line 435</a>
</li></ul></dd>


Expand Down Expand Up @@ -2772,7 +2772,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line286">line 286</a>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line241">line 241</a>
</li></ul></dd>


Expand Down Expand Up @@ -3012,7 +3012,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line458">line 458</a>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line413">line 413</a>
</li></ul></dd>


Expand Down Expand Up @@ -3258,7 +3258,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line501">line 501</a>
<a href="assert-x.js.html">/home/graham/source_projects/assert-x/lib/assert-x.js</a>, <a href="assert-x.js.html#line456">line 456</a>
</li></ul></dd>


Expand Down Expand Up @@ -3323,7 +3323,7 @@ <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-a
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha3</a> on Sun Jan 05 2014 23:47:36 GMT+0100 (CET)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha3</a> on Sun Jan 05 2014 23:54:05 GMT+0100 (CET)
</footer>

<script> prettyPrint(); </script>
Expand Down
6 changes: 3 additions & 3 deletions docs/index.html
Expand Up @@ -48,8 +48,8 @@ <h3> </h3>
<p><a href="https://coveralls.io/r/Xotic750/assert-x?branch=master" title="Coverage status on Coveralls"><img src="https://coveralls.io/repos/Xotic750/assert-x/badge.png?branch=master" alt="Coverage Status"></a></p>
<p><a href="http://badge.fury.io/js/assert-x" title="Current NPM release"><img src="https://badge.fury.io/js/assert-x.png" alt="NPM version"></a></p>
<p><a href="https://ci.testling.com/Xotic750/assert-x" title="Browser support on Testling CI"><img src="https://ci.testling.com/Xotic750/assert-x.png" alt="browser support"></a></p>
<h1 id="-assert-x-0-0-15-http-xotic750-github-io-assert-x-"><a href="http://xotic750.github.io/assert-x/">assert-x 0.0.15</a></h1>
<h6 id="graham-fairweather-xotic750-gmail-com-">Graham Fairweather <a href="&#109;&#97;&#x69;&#x6c;&#116;&#111;&#58;&#120;&#x6f;&#x74;&#x69;&#x63;&#55;&#53;&#x30;&#x40;&#103;&#109;&#x61;&#x69;&#108;&#x2e;&#x63;&#111;&#x6d;">&#120;&#x6f;&#x74;&#x69;&#x63;&#55;&#53;&#x30;&#x40;&#103;&#109;&#x61;&#x69;&#108;&#x2e;&#x63;&#111;&#x6d;</a></h6></article>
<h1 id="-assert-x-0-0-16-http-xotic750-github-io-assert-x-"><a href="http://xotic750.github.io/assert-x/">assert-x 0.0.16</a></h1>
<h6 id="graham-fairweather-xotic750-gmail-com-">Graham Fairweather <a href="&#x6d;&#97;&#x69;&#108;&#116;&#x6f;&#58;&#x78;&#x6f;&#x74;&#105;&#99;&#55;&#x35;&#x30;&#64;&#103;&#x6d;&#97;&#105;&#x6c;&#46;&#x63;&#111;&#109;">&#x78;&#x6f;&#x74;&#105;&#99;&#55;&#x35;&#x30;&#64;&#103;&#x6d;&#97;&#105;&#x6c;&#46;&#x63;&#111;&#109;</a></h6></article>
</section>


Expand All @@ -66,7 +66,7 @@ <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-a
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha3</a> on Sun Jan 05 2014 23:47:36 GMT+0100 (CET)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha3</a> on Sun Jan 05 2014 23:54:05 GMT+0100 (CET)
</footer>

<script> prettyPrint(); </script>
Expand Down
4 changes: 2 additions & 2 deletions docs/module-assert-x.html
Expand Up @@ -47,7 +47,7 @@ <h2>


<dt class="tag-version">Version:</dt>
<dd class="tag-version"><ul class="dummy"><li>0.0.15</li></ul></dd>
<dd class="tag-version"><ul class="dummy"><li>0.0.16</li></ul></dd>



Expand Down Expand Up @@ -135,7 +135,7 @@ <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-a
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha3</a> on Sun Jan 05 2014 23:47:36 GMT+0100 (CET)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha3</a> on Sun Jan 05 2014 23:54:05 GMT+0100 (CET)
</footer>

<script> prettyPrint(); </script>
Expand Down
51 changes: 3 additions & 48 deletions lib/assert-x.js
@@ -1,6 +1,6 @@
/**
* @file {@link http://xotic750.github.io/assert-x/ assert-x}. A Javascript assertion library..
* @version 0.0.15
* @version 0.0.16
* @author Graham Fairweather <xotic750@gmail.com>
* @copyright Copyright (c) 2013 Graham Fairweather
* @license {@link <http://www.gnu.org/licenses/gpl-3.0.html> GPL3}
Expand All @@ -23,7 +23,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

/*global module, define, require, console */
/*global module, define, require */

(function (globalThis) {
'use strict';
Expand All @@ -34,8 +34,7 @@
*/
var assertx = {},
maxMessageLength = 128,
CustomError = utilx.customError('AssertionError', maxMessageLength),
cachedToString;
CustomError = utilx.customError('AssertionError', maxMessageLength);

utilx.objectDefineProperty(assertx, 'AssertionError', {
/**
Expand Down Expand Up @@ -74,55 +73,11 @@
configurable: true
});

/*
if (CustomError.prototype.isPatched) {
console.log('# IS PATCHED');
cachedToString = CustomError.prototype.toString;
utilx.objectDefineProperties(CustomError.prototype, {
toString: {
value: function () {
var theString;
if (utilx.objectInstanceOf(this, assertx.AssertionError)) {
console.log('# IS ASSERTIONERROR');
if (utilx.isString(this.message) && !utilx.isEmptyString(this.message)) {
theString = this.name + ': ' + utilx.stringTruncate(this.message, maxMessageLength);
} else if (utilx.objectInstanceOf(this, assertx.AssertionError)) {
theString = this.name + ': ';
theString += utilx.stringTruncate(utilx.jsonStringify(this.actual,
utilx.customErrorReplacer), maxMessageLength) + ' ';
theString += this.operator + ' ';
theString += utilx.stringTruncate(utilx.jsonStringify(this.expected,
utilx.customErrorReplacer), maxMessageLength);
}
} else {
console.log('# IS OTHERERROR');
theString = cachedToString.call(this);
}
return theString;
},
enumerable: false,
writable: true,
configurable: true
},
isPatched: {
value: true,
enumerable: false,
writable: true,
configurable: true
}
});
}
*/

utilx.inherits(assertx.AssertionError, CustomError);

utilx.objectDefineProperties(assertx.AssertionError.prototype, {
toString: {
value: function () {
console.log('# CALLED ASSERTION TOSTRING');
var theString;

if (utilx.isString(this.message) && !utilx.isEmptyString(this.message)) {
Expand Down

0 comments on commit 01ad0ca

Please sign in to comment.