Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions lib/dns/zone.js
Original file line number Diff line number Diff line change
Expand Up @@ -712,17 +712,16 @@ Zone.prototype.import = function(localPath, callback) {
}

var parsedZonefile = zonefile.parse(file);

var recordTypes = Object.keys(parsedZonefile);
var recordsToCreate = [];
function addRecordToCreate(record) {
var recordInstance = new Record.fromZoneRecord_(self, recordType, record);
recordsToCreate.push(recordInstance);
}

for (var recordType in parsedZonefile) {
recordTypes.forEach(function(recordType) {
var recordTypeSet = arrify(parsedZonefile[recordType]);
recordTypeSet.forEach(addRecordToCreate);
}

recordTypeSet.forEach(function(record) {
recordsToCreate.push(Record.fromZoneRecord_(self, recordType, record));
});
});

self.addRecords(recordsToCreate, callback);
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"google-auto-auth": "^0.2.0",
"hash-stream-validation": "^0.1.0",
"is": "^3.0.1",
"jshint": "^2.9.1",

This comment was marked as spam.

This comment was marked as spam.

"methmeth": "^1.0.0",
"mime-types": "^2.0.8",
"modelo": "^4.2.0",
Expand All @@ -118,7 +119,6 @@
"glob": "^5.0.9",
"istanbul": "^0.3.5",
"jscs": "^2.1.1",
"jshint": "^2.6.0",
"mitm": "^1.1.0",
"mocha": "^2.1.0",
"mockery": "^1.4.0",
Expand Down
3 changes: 2 additions & 1 deletion test/storage/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ describe('File', function() {

it('should unpipe stream from an error on the response', function(done) {
var requestStream = through();
var readStream = file.createReadStream();

file.bucket.storage.makeAuthenticatedRequest = function() {
setImmediate(function() {
Expand All @@ -641,7 +642,7 @@ describe('File', function() {
});
};

var readStream = file.createReadStream().resume();
readStream.resume();
});

it('should let util.handleResp handle the response', function(done) {
Expand Down