brinydeep
Advanced tools
Comparing version 0.0.5 to 0.0.51
@@ -94,2 +94,9 @@ var request = require('request'); | ||
// droplet_id(s) Required, Integer, this is the id of your droplet | ||
brinydeep.get_ips = function (droplet_ids, callback) { | ||
var ip_provider = require('./lib/ip_provider.js'); | ||
ip_provider(droplet_ids,requestor,callback); | ||
}; | ||
// droplet_id(s) Required, Integer, this is the id of your droplet | ||
brinydeep.reboot = function (droplet_ids,callback) { | ||
@@ -96,0 +103,0 @@ var reqs = requestor.build_requests('droplets','reboot',droplet_ids); |
{ | ||
"name": "brinydeep", | ||
"version": "0.0.5", | ||
"version": "0.0.51", | ||
"description": "node.js wrapper for Digital Ocean's API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# brinydeep | ||
========= | ||
## 0.51 notes | ||
* added a function that takes in ID's and returns IPs (if not available will continue to poll until IP is assigned): | ||
``` js | ||
get_ips([185733,185734,185735], callback) | ||
``` | ||
returns: | ||
``` js | ||
[ { ip: '192.81.212.217', id: 185733 }, | ||
{ ip: '198.211.115.4', id: 185734 }, | ||
{ ip: '192.81.218.144', id: 185735 } ] | ||
``` | ||
* 0.5 notes | ||
## 0.5 notes | ||
* fixed several bugs due with untested functions | ||
* seperated requesting logic for the api exposure functions | ||
* added a ip providing event emitter to allow an event to be throw to client when an event is picked up | ||
* TODO | ||
## TODO | ||
* ensure 100% test coverage | ||
@@ -11,0 +21,0 @@ * implement ssh functionality |
@@ -55,3 +55,2 @@ var should = require('should'); | ||
brinydeep.new_droplets(new_droplet, function(e, o) { | ||
//console.log(e, o); | ||
o.status.should.equal('OK'); | ||
@@ -62,9 +61,8 @@ done(); | ||
// it('should be able to create multiple droplets', function(done) { | ||
// brinydeep.new_droplets(new_droplet_multi, function(e, o) { | ||
// console.log(e, o); | ||
// o.length.should.equal(2); | ||
// done(); | ||
// }); | ||
// }); | ||
it('should be able to create multiple droplets', function(done) { | ||
brinydeep.new_droplets(new_droplet_multi, function(e, o) { | ||
o.length.should.equal(2); | ||
done(); | ||
}); | ||
}); | ||
@@ -86,6 +84,17 @@ }); | ||
test_droplet_ids = brinydeep.get_ids_created_this_session(); | ||
test_droplet_ids.length.should.equal(1); | ||
test_droplet_ids.length.should.equal(3); | ||
//console.log(test_droplet_ids); | ||
done(); | ||
}); | ||
it('should be able to provide all droplet IPs', function(done) { | ||
this.timeout(50 * 1000); //unclear how long this should take this will disable the timeout | ||
brinydeep.get_ips(test_droplet_ids,function (e,o) { | ||
o.length.should.equal(3); | ||
console.log(o); | ||
o[0].ip_address.should.not.equal(null); | ||
o[1].ip_address.should.not.equal(null); | ||
o[2].ip_address.should.not.equal(null); | ||
done(); | ||
}); | ||
}); | ||
@@ -121,4 +130,5 @@ | ||
brinydeep.destroy(test_droplet_ids, function(e, o) { | ||
console.log(e, o, o[0].error_message); | ||
o.status.should.equal('OK'); | ||
o[0].status.should.equal('OK'); | ||
o[1].status.should.equal('OK'); | ||
o[2].status.should.equal('OK'); | ||
done(); | ||
@@ -125,0 +135,0 @@ }); |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
43407
418
307
0