Skip to content

Commit

Permalink
fixed a pct-error for multibyte utf8 chars
Browse files Browse the repository at this point in the history
  • Loading branch information
fxa committed Jan 19, 2013
1 parent 378dcb6 commit e952a6d
Show file tree
Hide file tree
Showing 13 changed files with 362 additions and 89 deletions.
23 changes: 16 additions & 7 deletions Jakefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
"bold_suffix": "",
"assertion_prefix": "",
"assertion_suffix": ""
};
},
NODEUNIT_REPORTER = 'default';
// NODEUNIT_REPORTER = 'minimal';

var
SRC_HOME = 'src',
Expand Down Expand Up @@ -58,7 +60,7 @@
ASYNC = {async: true};

var all = new jake.FileList();
all.include('./*');
all.include('./Jakefile.js', 'own-testcases.json');
all.include('src/**');
all.include('test/**');
all.exclude(TARGET_COMPRESSED);
Expand Down Expand Up @@ -91,7 +93,7 @@
},
function (callback) {
jake.logger.log('unit testing ...');
nodeunit.reporters['default'].run(UNIT_TESTS, NODEUNIT_OPTIONS, callback);
nodeunit.reporters[NODEUNIT_REPORTER].run(UNIT_TESTS, NODEUNIT_OPTIONS, callback);
},
function (callback) {
jake.logger.log('build concatenated version ...');
Expand All @@ -107,7 +109,7 @@
},
function (callback) {
jake.logger.log('integration tests ...');
nodeunit.reporters['default'].run(INTEGRATION_TESTS, NODEUNIT_OPTIONS, callback);
nodeunit.reporters[NODEUNIT_REPORTER].run(INTEGRATION_TESTS, NODEUNIT_OPTIONS, callback);
},
function (callback) {
jake.logger.log('move uncompressed version to target directory');
Expand All @@ -126,7 +128,7 @@
},
function (callback) {
jake.logger.log('integration tests with minified version ... ');
nodeunit.reporters['default'].run(INTEGRATION_TESTS, NODEUNIT_OPTIONS, callback);
nodeunit.reporters[NODEUNIT_REPORTER].run(INTEGRATION_TESTS, NODEUNIT_OPTIONS, callback);
},
function (callback) {
jake.logger.log('move compressed version to target ... ');
Expand All @@ -135,8 +137,15 @@
], closeTask);
}, ASYNC);

desc('release');
task('release', [TARGET_COMPRESSED], function () {
// for short test only
desc('unit tests');
task('unit', [], function () {
// here we want the default reporter and not the configured one
nodeunit.reporters['default'].run(UNIT_TESTS, NODEUNIT_OPTIONS, complete);
}, ASYNC);

desc('build');
task('build', [TARGET_COMPRESSED], function () {
jake.logger.log('done.');
});
task('default', ['clean', 'release']);
Expand Down
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ But you can also use it with node:

**npm install uritemplate**

and then:
and then in a node application:

var
UriTemplate = require('uritemplate'),
Expand All @@ -26,6 +26,15 @@ and then:
template.expand({query: {first: 1, second: 2}});
--> "?first=1&second=2"

or within a html document (see also demo.html):

<script type="text/javascript" src="bin/uritemplate.js"></script>
<script type="text/javascript">
var template = UriTemplate.parse('{?query*}');
alert(template.expand({query: {first: 1, second: 2}}));
</script>


If you want to clone the git project, be aware of the submodule uritemplate-test.
So you have to to:

Expand All @@ -35,7 +44,7 @@ So you have to to:

Build
-----
jake clean release
jake clean build

Tests
-----
Expand All @@ -51,8 +60,9 @@ MIT License, see http://mit-license.org/

Release Notes
-------------
0.2.0 heavy project refactoring, splitting source files, introducing jshint (preparation of next steps)
0.2.1 fixed a bug in package.json
* 0.2.2 fixed pct encoding bug with multibyte utf8 chars
* 0.2.1 fixed a bug in package.json
* 0.2.0 heavy project refactoring, splitting source files, introducing jshint (preparation of next steps)

Next Steps
----------
Expand Down
2 changes: 1 addition & 1 deletion bin/uritemplate-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e952a6d

Please sign in to comment.