linkedin/venus.js — pull request #294 by roelrz (2013-10-03 02:43:17+00:00)
Title: Added support @venus-resource annotation

The **@venus-resource** annotation can be used to make external files available within the sandbox. This makes it possible to do such things as fetching files via AJAX in your unit test.

Here is an example:

```javascript
/**
* @venus-library qunit
* @venus-include jquery.js
* @venus-resource data1.txt
* @venus-resource foo/data2.txt
* @venus-resource foo/bar/data3.txt
* @venus-resource ../../data4.txt
*/
$.get(location.href + '/data1.txt')
.success(function() {
ok(true, 'pass');
});
```

If the test is running on [http://localhost:2013/venus-core/1](http://localhost:2013/venus-core/1), the resources will be available at the following URLs:
- [http://localhost:2013/venus-core/sandbox/1/data1.txt](http://localhost:2013/venus-core/sandbox/1/data1.txt)
- [http://localhost:2013/venus-core/sandbox/1/data2.txt](http://localhost:2013/venus-core/sandbox/1/data2.txt)
- [http://localhost:2013/venus-core/sandbox/1/data3.txt](http://localhost:2013/venus-core/sandbox/1/data3.txt)
- [http://localhost:2013/venus-core/sandbox/1/data4.txt](http://localhost:2013/venus-core/sandbox/1/data4.txt)

I decided to put all resources in the same http directory (without any subdirectories) so they can be accessed in a lightweight fashion.