Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[doc dist] Added CHANGELOG.md, updated README.md, and added formal LI…

…CENSE file
  • Loading branch information...
commit dfcfc6f1472c27223d20d16b5b9b85b5824f825e 1 parent 33d16e2
@indexzero indexzero authored
View
3  .gitignore
@@ -1,2 +1,3 @@
.cache/
-.cache/*
+.cache/*
+test/data/test-config.json
View
0  CHANGELOG.md
No changes.
View
22 LICENSE
@@ -0,0 +1,22 @@
+node-cloudfiles
+
+Copyright (c) 2010 Nodejitsu Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
12 README.md
@@ -72,7 +72,17 @@ Each Container has a set of 'StorageObjects' (or files) which can be retrieved v
1. Implement Storage Object metadata APIs.
## Run Tests
-All of the node-cloudfiles tests are written in [vows][2], and cover all of the use cases described above.
+All of the node-cloudservers tests are written in [vows][2], and cover all of the use cases described above. You will need to add your Rackspace API username and API key to test/data/test-config.json before running tests:
+<pre>
+ {
+ "auth": {
+ "username": "your-username",
+ "apiKey": "your-apikey"
+ }
+ }
+</pre>
+
+Once you have valid Rackspace credentials you can run tests with [vows][2]:
<pre>
vows test/*-test.js --spec
</pre>
View
6 test/data/test-config.json
@@ -1,6 +0,0 @@
-{
- "auth": {
- "username": "test-username",
- "apiKey": "test-apiKey"
- }
-}
View
26 test/helpers.js
@@ -18,15 +18,25 @@ var util = require('util'),
var testConfig, client, helpers = exports;
helpers.loadConfig = function () {
- var config = JSON.parse(fs.readFileSync(path.join(__dirname, 'data', 'test-config.json')).toString());
- if (config.auth.username === 'test-username'
- || config.auth.apiKey === 'test-apiKey') {
- util.puts('Config file test-config.json must be updated with valid data before running tests');
- process.exit(0);
+ try {
+ var configFile = path.join(__dirname, 'data', 'test-config.json'),
+ stats = fs.statSync(configFile),
+ config = JSON.parse(fs.readFileSync(configFile).toString());
+
+ if (config.auth.username === 'test-username'
+ || config.auth.apiKey === 'test-apiKey') {
+ util.puts('Config file test-config.json must be updated with valid data before running tests.');
+ process.exit(0);
+ }
+
+ testConfig = config;
+ return config;
+
}
-
- testConfig = config;
- return config;
+ catch (ex) {
+ util.puts('Config file test/data/test-config.json must be created with valid data before running tests.');
+ process.exit(0);
+ }
};
helpers.createClient = function () {
Please sign in to comment.
Something went wrong with that request. Please try again.