Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Update vendors.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Aug 16, 2012
1 parent b504b9f commit 8811f88
Show file tree
Hide file tree
Showing 7 changed files with 226 additions and 130 deletions.
2 changes: 1 addition & 1 deletion vendor/docdown/src/DocDown/Entry.php
Expand Up @@ -196,7 +196,7 @@ public function getName() {
* @returns {Array} The entry `param` data.
*/
public function getParams( $index = null ) {
preg_match_all('#\*\s*@param\s+\{([^}]+)\}\s+(\[[^]]+\]|[$\w]+)\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#i', $this->entry, $result);
preg_match_all('#\*\s*@param\s+\{([^}]+)\}\s+(\[.+\]|[$\w]+)\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#i', $this->entry, $result);
if (count($result = array_filter(array_slice($result, 1)))) {
// repurpose array
foreach ($result as $param) {
Expand Down
10 changes: 8 additions & 2 deletions vendor/docdown/src/DocDown/Generator.php
Expand Up @@ -208,6 +208,7 @@ public function generate() {
$openTag = "\n<!-- div -->\n";
$closeTag = "\n<!-- /div -->\n";
$result = array('# ' . $this->options['title']);
$toc = 'toc';

// initialize $api array
foreach ($this->entries as $entry) {
Expand Down Expand Up @@ -304,10 +305,15 @@ function sortCompare($a, $b) {

$compiling = $compiling ? ($result[] = $closeTag) : true;

// assign TOC hash
if (count($result) == 2) {
$toc = $member;
}

// add root entry
array_push(
$result,
$openTag, '## ' . (count($result) == 2 ? '<a id="toc"></a>' : '') . '`' . $member . '`',
$openTag, '## ' . (count($result) == 2 ? '<a id="' . $toc . '"></a>' : '') . '`' . $member . '`',
Generator::interpolate('* [`' . $member . '`](##{hash})', $entry)
);

Expand Down Expand Up @@ -401,7 +407,7 @@ function sortCompare($a, $b) {
}

// close tags add TOC link reference
array_push($result, $closeTag, $closeTag, '', ' [1]: #toc "Jump back to the TOC."');
array_push($result, $closeTag, $closeTag, '', ' [1]: #' . $toc . ' "Jump back to the TOC."');

// cleanup whitespace
return trim(preg_replace('/ +\n/', "\n", join($result, "\n")));
Expand Down
11 changes: 5 additions & 6 deletions vendor/platform.js/README.md
@@ -1,4 +1,4 @@
# Platform.js <sup>v1.0.0-pre</sup>
# Platform.js <sup>v1.0.0</sup>

A platform detection library that works on nearly all JavaScript platforms<sup><a name="fnref1" href="#fn1">1</a></sup>.

Expand All @@ -16,6 +16,10 @@ The documentation for Platform.js can be viewed here: [/doc/README.md](https://g

For a list of upcoming features, check out our [roadmap](https://github.com/bestiejs/platform.js/wiki/Roadmap).

## Support

Platform.js has been tested in at least Adobe AIR 3.1, Chrome 5-21, Firefox 1.5-13, IE 6-9, Opera 9.25-12.01, Safari 3-6, Node.js 0.8.6, Narwhal 0.3.2, RingoJS 0.8, and Rhino 1.7RC5.

## Installation and usage

In a browser or Adobe AIR:
Expand Down Expand Up @@ -83,11 +87,6 @@ info.os; // 'Mac OS X 10.7.2'
info.description; // 'Opera 11.52 (identifying as Firefox 4.0) on Mac OS X 10.7.2'
~~~

## Footnotes

1. Platform.js has been tested in at least Adobe AIR 2.6, Chrome 5-15, Firefox 1.5-8, IE 6-10, Opera 9.25-11.52, Safari 2-5.1.1, Node.js 0.4.8-0.6.1, Narwhal 0.3.2, RingoJS 0.7-0.8, and Rhino 1.7RC3.
<a name="fn1" title="Jump back to footnote 1 in the text." href="#fnref1">&#8617;</a>

## Author

* [John-David Dalton](http://allyoucanleet.com/)
Expand Down
104 changes: 89 additions & 15 deletions vendor/platform.js/platform.js
@@ -1,5 +1,5 @@
/*!
* Platform.js v1.0.0-pre <http://mths.be/platform>
* Platform.js v1.0.0 <http://mths.be/platform>
* Copyright 2010-2012 John-David Dalton <http://allyoucanleet.com/>
* Available under MIT license <http://mths.be/mit>
*/
Expand Down Expand Up @@ -297,7 +297,7 @@
'Opera Mini',
'Opera',
'Chrome',
{ 'label': 'Chrome Mobile', 'pattern': 'CrMo' },
{ 'label': 'Chrome Mobile', 'pattern': '(?:CriOS|CrMo)' },
{ 'label': 'Firefox', 'pattern': '(?:Firefox|Minefield)' },
{ 'label': 'IE', 'pattern': 'MSIE' },
'Safari'
Expand Down Expand Up @@ -512,12 +512,11 @@
/*------------------------------------------------------------------------*/

/**
* Return platform description when the platform object is coerced to a string.
* Returns `platform.description` when the platform object is coerced to a string.
*
* @name toString
* @memberOf platform
* @type Function
* @returns {String} The platform description.
* @returns {String} Returns `platform.description` if available, else an empty string.
*/
function toStringPlatform() {
return this.description || '';
Expand Down Expand Up @@ -573,7 +572,7 @@
// detect non-Opera versions (order is important)
if (!version) {
version = getVersion([
'(?:Cloud9|CrMo|Opera ?Mini|Raven|Silk(?!/[\\d.]+$))',
'(?:Cloud9|CriOS|CrMo|Opera ?Mini|Raven|Silk(?!/[\\d.]+$))',
'Version',
qualify(name),
'(?:Firefox|Minefield|NetFront)'
Expand Down Expand Up @@ -708,15 +707,15 @@
))
) && !reOpera.test(data = parse.call(forOwn, ua.replace(reOpera, '') + ';')) && data.name) {

// when "indentifying" the UA contains both Opera and the other browser's name
// when "indentifying", the UA contains both Opera and the other browser's name
data = 'ing as ' + data.name + ((data = data.version) ? ' ' + data : '');
if (reOpera.test(name)) {
if (/IE/.test(data) && os == 'Mac OS') {
os = null;
}
data = 'identify' + data;
}
// when "masking" the UA contains only the other browser's name
// when "masking", the UA contains only the other browser's name
else {
data = 'mask' + data;
if (operaClass) {
Expand Down Expand Up @@ -760,7 +759,7 @@
data = (data = data[0], data < 400 ? 1 : data < 500 ? 2 : data < 526 ? 3 : data < 533 ? 4 : data < 534 ? '4+' : data < 535 ? 5 : '5');
} else {
layout[1] = 'like Chrome';
data = data[1] || (data = data[0], data < 530 ? 1 : data < 532 ? 2 : data < 532.05 ? 3 : data < 533 ? 4 : data < 534.03 ? 5 : data < 534.07 ? 6 : data < 534.10 ? 7 : data < 534.13 ? 8 : data < 534.16 ? 9 : data < 534.24 ? 10 : data < 534.30 ? 11 : data < 535.01 ? 12 : data < 535.02 ? '13+' : data < 535.07 ? 15 : data < 535.11 ? 16 : data < 535.19 ? 17 : data < 535.21 ? 18 : '19');
data = data[1] || (data = data[0], data < 530 ? 1 : data < 532 ? 2 : data < 532.05 ? 3 : data < 533 ? 4 : data < 534.03 ? 5 : data < 534.07 ? 6 : data < 534.10 ? 7 : data < 534.13 ? 8 : data < 534.16 ? 9 : data < 534.24 ? 10 : data < 534.30 ? 11 : data < 535.01 ? 12 : data < 535.02 ? '13+' : data < 535.07 ? 15 : data < 535.11 ? 16 : data < 535.19 ? 17 : data < 536.05 ? 18 : data < 536.10 ? 19 : data < 537.01 ? 20 : '21');
}
// add the postfix of ".x" or "+" for approximate versions
layout[1] += ' ' + (data += typeof data == 'number' ? '.x' : /[.+]/.test(data) ? '' : '+');
Expand All @@ -769,6 +768,30 @@
version = data;
}
}
// detect Opera desktop modes
if (name == 'Opera' && (data = /(?:zbov|zvav)$/.exec(os))) {
name += ' ';
description.unshift('desktop mode');
if (data == 'zvav') {
name += 'Mini';
version = null;
} else {
name += 'Mobile';
}
}
// detect Chrome desktop mode
else if (name == 'Safari' && /Chrome/.exec(layout[1])) {
description.unshift('desktop mode');
name = 'Chrome Mobile';
version = null;

if (/Mac OS X/.test(os)) {
manufacturer = 'Apple';
os = 'iOS 4.3+';
} else {
os = null;
}
}
// strip incorrect OS versions
if (version && version.indexOf(data = /[\d.]+$/.exec(os)) == 0 &&
ua.indexOf('/' + data + '-') > -1) {
Expand All @@ -793,9 +816,25 @@
if (product) {
description.push((/^on /.test(description[description.length -1]) ? '' : 'on ') + product);
}
// parse OS into an object
if (os) {
data = / ([\d.+]+)$/.exec(os);
os = {
'architecture': 32,
'family': data ? os.replace(data[0], '') : os,
'version': data ? data[1] : null,
'toString': function() {
var version = this.version;
return this.family + (version ? ' ' + version : '') + (this.architecture == 64 ? ' 64-bit' : '');
}
};
}
// add browser/OS architecture
if ((data = /\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i).test(arch) && !/\bi686\b/i.test(arch)) {
os = os && os + (data.test(os) ? '' : ' 64-bit');
if ((data = / (?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(arch)) && !/\bi686\b/i.test(arch)) {
if (os) {
os.architecture = 64;
os.family = os.family.replace(data, '');
}
if (name && (/WOW64/i.test(ua) ||
(useFeatures && /\w(?:86|32)$/.test(nav.cpuClass || nav.platform)))) {
description.unshift('32-bit');
Expand Down Expand Up @@ -834,11 +873,46 @@
* The name of the operating system.
*
* @memberOf platform
* @type String|Null
* @type Object
*/
'os': os && (name &&
!(os == os.split(' ')[0] && (os == name.split(' ')[0] || product)) &&
description.push(product ? '(' + os + ')' : 'on ' + os), os),
'os': os
? (name &&
!(os == String(os).split(' ')[0] && (os == name.split(' ')[0] || product)) &&
description.push(product ? '(' + os + ')' : 'on ' + os), os)
: {

/**
* The CPU architecture the OS is built for.
*
* @memberOf platform.os
* @type String|Null
*/
'architecture': null,

/**
* The family of the OS.
*
* @memberOf platform.os
* @type String|Null
*/
'family': null,

/**
* The version of the OS.
*
* @memberOf platform.os
* @type String|Null
*/
'version': null,

/**
* Returns the OS string.
*
* @memberOf platform.os
* @returns {String} The OS string.
*/
'toString': function() { return 'null'; }
},

/**
* The platform description.
Expand Down
24 changes: 8 additions & 16 deletions vendor/qunit-clib/README.md
@@ -1,12 +1,16 @@
# QUnit CLIB <sup>v1.0.0-pre</sup>
# QUnit CLIB <sup>v1.0.0</sup>
## command-line interface boilerplate

QUnit CLIB helps extend QUnit's CLI support to many common CLI environments<sup><a name="fnref1" href="#fn1">1</a></sup>.
QUnit CLIB helps extend QUnit's CLI support to many common CLI environments.

## Screenshot

![QUnit CLIB brings QUnit to your favorite shell.](http://i.imgur.com/jpu9l.png)

## Support

QUnit CLIB has been tested in at least Node.js 0.4.8-0.8.6, Narwhal v0.3.2, RingoJS v0.8.0, and Rhino v1.7RC3-RC5.

## Usage

~~~ js
Expand Down Expand Up @@ -41,23 +45,11 @@ QUnit CLIB helps extend QUnit's CLI support to many common CLI environments<sup>
}(typeof global == 'object' && global || this));
~~~

## Cloning this repo

To clone this repository just use:

~~~ bash
git clone https://github.com/jdalton/qunit-clib.git
cd qunit-clib
~~~

Feel free to fork and send pull requests if you see improvements!

## Footnotes

1. QUnit CLIB has been tested in at least Node.js v0.4.8-0.6.1, Narwhal v0.3.2, RingoJS v0.7.0-0.8.0, and Rhino v1.7RC3.
<a name="fn1" title="Jump back to footnote 1 in the text." href="#fnref1">&#8617;</a>
1. QUnit v1.3.0 does not work with Narwhal or Ringo < v0.8.0

2. QUnit v1.3.0 does not work with Narwhal or Ringo < v0.8.0
2. Rhino v1.7RC4 does not support timeout fallbacks `clearTimeout` and `setTimeout`

## Author

Expand Down
4 changes: 3 additions & 1 deletion vendor/qunit-clib/qunit-clib.js
@@ -1,5 +1,5 @@
/*!
* QUnit CLI Boilerplate v1.0.0-pre
* QUnit CLI Boilerplate v1.0.0
* Copyright 2011-2012 John-David Dalton <http://allyoucanleet.com/>
* Based on a gist by Jörn Zaefferer <https://gist.github.com/722381>
* Available under MIT license <http://mths.be/mit>
Expand Down Expand Up @@ -92,6 +92,8 @@
* @returns {Number} The the ID of the timeout.
*/
function schedule(fn, delay, args, repeated) {
// Rhino 1.7RC4 will error assigning `task` below
// https://bugzilla.mozilla.org/show_bug.cgi?id=775566
var task = ids[++counter] = new JavaAdapter(java.util.TimerTask, {
'run': function() {
fn.apply(global, args);
Expand Down

0 comments on commit 8811f88

Please sign in to comment.