Skip to content

Commit

Permalink
Build 0.33.0
Browse files Browse the repository at this point in the history
  • Loading branch information
brianjmiller committed Mar 3, 2015
1 parent 19b1396 commit b9af37e
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 40 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tincan",
"version": "0.32.0",
"version": "0.33.0",
"homepage": "http://rusticisoftware.github.com/TinCanJS/",
"authors": [
"Brian J. Miller <brian.miller@scorm.com>"
Expand Down
2 changes: 1 addition & 1 deletion build/tincan-min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/tincan-min.map

Large diffs are not rendered by default.

60 changes: 42 additions & 18 deletions build/tincan-node.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"0.32.0";
"0.33.0";
/*
CryptoJS v3.0.2
code.google.com/p/crypto-js
Expand Down Expand Up @@ -1640,26 +1640,50 @@ TinCan client library
@private
*/
parseURL: function (url) {
var parts = String(url).split("?"),
pairs,
pair,
i,
params = {}
;
if (parts.length === 2) {
pairs = parts[1].split("&");
for (i = 0; i < pairs.length; i += 1) {
pair = pairs[i].split("=");
if (pair.length === 2 && pair[0]) {
params[pair[0]] = decodeURIComponent(pair[1]);
}
//
// see http://stackoverflow.com/a/21553982
// and http://stackoverflow.com/a/2880929
//
var reURLInformation,
match,
result,
paramMatch,
pl = /\+/g, // Regex for replacing addition symbol with a space
search = /([^&=]+)=?([^&]*)/g,
decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); };

reURLInformation = new RegExp(
[
"^(https?:)//", // protocol
"(([^:/?#]*)(?::([0-9]+))?)", // host (hostname and port)
"(/[^?#]*)", // pathname
"(\\?[^#]*|)", // search
"(#.*|)$" // hash
].join("")
);
match = url.match(reURLInformation);
result = {
protocol: match[1],
host: match[2],
hostname: match[3],
port: match[4],
pathname: match[5],
search: match[6],
hash: match[7],
params: {}
};

// 'path' is for backwards compatibility
result.path = result.protocol + "//" + result.host + result.pathname;

if (result.search !== "") {
// extra parens to let jshint know this is an expression
while ((paramMatch = search.exec(result.search.substring(1)))) {
result.params[decode(paramMatch[1])] = decode(paramMatch[2]);
}
}

return {
path: parts[0],
params: params
};
return result;
},

/**
Expand Down
60 changes: 42 additions & 18 deletions build/tincan.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"0.32.0";
"0.33.0";
/*
CryptoJS v3.0.2
code.google.com/p/crypto-js
Expand Down Expand Up @@ -1640,26 +1640,50 @@ TinCan client library
@private
*/
parseURL: function (url) {
var parts = String(url).split("?"),
pairs,
pair,
i,
params = {}
;
if (parts.length === 2) {
pairs = parts[1].split("&");
for (i = 0; i < pairs.length; i += 1) {
pair = pairs[i].split("=");
if (pair.length === 2 && pair[0]) {
params[pair[0]] = decodeURIComponent(pair[1]);
}
//
// see http://stackoverflow.com/a/21553982
// and http://stackoverflow.com/a/2880929
//
var reURLInformation,
match,
result,
paramMatch,
pl = /\+/g, // Regex for replacing addition symbol with a space
search = /([^&=]+)=?([^&]*)/g,
decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); };

reURLInformation = new RegExp(
[
"^(https?:)//", // protocol
"(([^:/?#]*)(?::([0-9]+))?)", // host (hostname and port)
"(/[^?#]*)", // pathname
"(\\?[^#]*|)", // search
"(#.*|)$" // hash
].join("")
);
match = url.match(reURLInformation);
result = {
protocol: match[1],
host: match[2],
hostname: match[3],
port: match[4],
pathname: match[5],
search: match[6],
hash: match[7],
params: {}
};

// 'path' is for backwards compatibility
result.path = result.protocol + "//" + result.host + result.pathname;

if (result.search !== "") {
// extra parens to let jshint know this is an expression
while ((paramMatch = search.exec(result.search.substring(1)))) {
result.params[decode(paramMatch[1])] = decode(paramMatch[2]);
}
}

return {
path: parts[0],
params: params
};
return result;
},

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tincanjs",
"description": "Tin Can API Library",
"version": "0.32.0",
"version": "0.33.0",
"private": false,
"main": "build/tincan-node.js",
"directories": {
Expand Down

0 comments on commit b9af37e

Please sign in to comment.