Skip to content

Commit

Permalink
Merge pull request #100 from GoogleCloudPlatform/dependencies
Browse files Browse the repository at this point in the history
Upgraded dependencies
  • Loading branch information
jmdobry committed Apr 13, 2016
2 parents 4d15ea0 + 61a5eee commit 2bf1ac1
Show file tree
Hide file tree
Showing 16 changed files with 54 additions and 52 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ language: node_js
node_js:
- "stable"
- "0.12"
- "0.10"

cache:
directories:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This repository holds Node.js samples used throughout [cloud.google.com]().

[![Build Status](https://travis-ci.org/GoogleCloudPlatform/nodejs-docs-samples.svg)](https://travis-ci.org/GoogleCloudPlatform/nodejs-docs-samples)
[![Coverage Status](https://coveralls.io/repos/github/GoogleCloudPlatform/nodejs-docs-samples/badge.svg?branch=master)](https://coveralls.io/github/GoogleCloudPlatform/nodejs-docs-samples?branch=master)
[![Coverage Status](https://codecov.io/github/GoogleCloudPlatform/nodejs-getting-started/coverage.svg?branch=master)](https://codecov.io/github/GoogleCloudPlatform/nodejs-getting-started?branch=master)

## Table of Contents

Expand Down
2 changes: 1 addition & 1 deletion appengine/datastore/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var crypto = require('crypto');
var app = express();
app.enable('trust proxy');

var dataset = gcloud.datastore.dataset({
var dataset = gcloud.datastore({
// This environment variable is set by app.yaml when running on GAE, but will
// need to be manually set when running locally.
projectId: process.env.GCLOUD_PROJECT
Expand Down
2 changes: 1 addition & 1 deletion appengine/datastore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
},
"dependencies": {
"express": "^4.13.4",
"gcloud": "^0.27.0"
"gcloud": "^0.30.3"
}
}
2 changes: 1 addition & 1 deletion appengine/pubsub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"body-parser": "^1.14.2",
"express": "^4.13.4",
"gcloud": "^0.27.0",
"gcloud": "^0.30.3",
"jade": "^1.11.0"
}
}
2 changes: 1 addition & 1 deletion appengine/storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dependencies": {
"body-parser": "^1.14.2",
"express": "^4.13.4",
"gcloud": "^0.27.0",
"gcloud": "^0.30.3",
"jade": "^1.11.0",
"multer": "^1.1.0"
}
Expand Down
2 changes: 1 addition & 1 deletion bigquery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"dependencies": {
"async": "^1.5.2",
"gcloud": "^0.29.0",
"gcloud": "^0.30.3",
"request": "^2.69.0"
}
}
2 changes: 1 addition & 1 deletion computeengine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"vms_api": "node vms_api.js"
},
"dependencies": {
"gcloud": "^0.30.2",
"gcloud": "^0.30.3",
"googleapis": "^4.0.0",
"sendgrid": "^2.0.0"
}
Expand Down
29 changes: 16 additions & 13 deletions datastore/concepts.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function Entity(projectId) {
if (keyFile) {
options.keyFilename = keyFile;
}
this.datastore = gcloud.datastore.dataset(options);
this.datastore = gcloud.datastore(options);

// To create the keys, we have to use this instance of Datastore.
datastore.key = this.datastore.key;
Expand Down Expand Up @@ -247,7 +247,7 @@ Entity.prototype.testInsert = function(callback) {
// [END insert]

this.datastore.save({
method: 'insert_auto_id',
method: 'insert',
key: taskKey,
data: task
}, callback);
Expand All @@ -274,7 +274,7 @@ Entity.prototype.testLookup = function(callback) {
// [END lookup]

this.datastore.save({
method: 'insert_auto_id',
method: 'insert',
key: taskKey,
data: {}
}, function(err) {
Expand Down Expand Up @@ -304,7 +304,7 @@ Entity.prototype.testUpdate = function(callback) {
// [END update]

this.datastore.save({
method: 'insert_auto_id',
method: 'insert',
key: taskKey,
data: {}
}, function(err) {
Expand Down Expand Up @@ -333,7 +333,7 @@ Entity.prototype.testDelete = function(callback) {
// [END delete]

this.datastore.save({
method: 'insert_auto_id',
method: 'insert',
key: taskKey,
data: {}
}, function(err) {
Expand Down Expand Up @@ -444,7 +444,7 @@ function Index(projectId) {
if (keyFile) {
options.keyFilename = keyFile;
}
this.datastore = gcloud.datastore.dataset(options);
this.datastore = gcloud.datastore(options);
}

Index.prototype.testUnindexedPropertyQuery = function(callback) {
Expand All @@ -459,11 +459,12 @@ Index.prototype.testUnindexedPropertyQuery = function(callback) {
};

Index.prototype.testExplodingProperties = function(callback) {
var original = datastore.key;
datastore.key = this.datastore.key;

// [START exploding_properties]
var task = {
method: 'insert_auto_id',
method: 'insert',
key: datastore.key('Task'),
data: {
tags: [
Expand All @@ -481,7 +482,7 @@ Index.prototype.testExplodingProperties = function(callback) {
};
// [END exploding_properties]

delete datastore.key;
datastore.key = original;

this.datastore.save(task, callback);
};
Expand All @@ -494,7 +495,7 @@ function Metadata(projectId) {
if (keyFile) {
options.keyFilename = keyFile;
}
this.datastore = gcloud.datastore.dataset(options);
this.datastore = gcloud.datastore(options);
}

Metadata.prototype.testNamespaceRunQuery = function(callback) {
Expand Down Expand Up @@ -632,7 +633,7 @@ function Query(projectId) {
if (keyFile) {
options.keyFilename = keyFile;
}
this.datastore = gcloud.datastore.dataset(options);
this.datastore = gcloud.datastore(options);

this.basicQuery = this.getBasicQuery();
this.projectionQuery = this.getProjectionQuery();
Expand Down Expand Up @@ -771,7 +772,8 @@ Query.prototype.testKindlessQuery = function(callback) {

// [START kindless_query]
var query = datastore.createQuery()
.filter('__key__', '>', lastSeenKey);
.filter('__key__', '>', lastSeenKey)
.limit(1);
// [END kindless_query]

this.datastore.runQuery(query, callback);
Expand Down Expand Up @@ -825,7 +827,8 @@ Query.prototype.testKeysOnlyQuery = function(callback) {

// [START keys_only_query]
var query = datastore.createQuery()
.select('__key__');
.select('__key__')
.limit(1);
// [END keys_only_query]

this.datastore.runQuery(query, callback);
Expand Down Expand Up @@ -1066,7 +1069,7 @@ function Transaction(projectId) {
if (keyFile) {
options.keyFilename = keyFile;
}
this.datastore = gcloud.datastore.dataset(options);
this.datastore = gcloud.datastore(options);

this.fromKey = this.datastore.key(['Bank', 1, 'Account', 1]);
this.toKey = this.datastore.key(['Bank', 1, 'Account', 2]);
Expand Down
2 changes: 1 addition & 1 deletion datastore/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

var gcloud = require('gcloud');

var dataset = gcloud.datastore.dataset({
var dataset = gcloud.datastore({
projectId: process.env.GCLOUD_PROJECT
});

Expand Down
2 changes: 1 addition & 1 deletion datastore/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if (keyFile) {
options.keyFilename = keyFile;
}

var datastore = gcloud.datastore.dataset(options);
var datastore = gcloud.datastore(options);
// [END build_service]

/*
Expand Down
2 changes: 1 addition & 1 deletion logging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"export": "node export.js"
},
"dependencies": {
"gcloud": "^0.27.0"
"gcloud": "^0.30.3"
}
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"ava": "ava --match='!*: dependencies should install*'",
"ava:deps": "npm run deps_appengine && npm run ava",
"cover": "npm run deps_appengine && nyc ava --match='!*: dependencies should install*'",
"report": "nyc report --reporter=text-lcov | ./node_modules/.bin/coveralls",
"report": "nyc report --reporter=lcov | codecov",
"report-html": "nyc report --reporter=html",
"deps_gce": "cd computeengine; npm i; cd ../",
"deps_bigquery": "cd bigquery; npm i; cd ../",
Expand All @@ -52,11 +52,11 @@
"devDependencies": {
"async": "^1.5.2",
"ava": "^0.13.0",
"coveralls": "^2.11.9",
"codecov": "^1.0.1",
"jshint": "~2.9.1",
"nyc": "^6.1.1",
"proxyquire": "^1.7.4",
"request": "^2.69.0",
"supertest": "^1.1.0"
"request": "^2.70.0",
"supertest": "^1.2.0"
}
}
2 changes: 1 addition & 1 deletion pubsub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"subscription": "node subscription.js"
},
"dependencies": {
"gcloud": "^0.27.0"
"gcloud": "^0.30.3"
}
}
6 changes: 3 additions & 3 deletions test/appengine/all.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ var sampleTests = [
cmd: 'node',
args: ['./bin/www'],
msg: 'Hello World! Express.js on Google App Engine.',
TRAVIS_NODE_VERSION: '0.10'
TRAVIS_NODE_VERSION: '0.12'
},
{
dir: 'appengine/express-memcached-session',
cmd: 'node',
args: ['server.js'],
msg: 'Viewed',
TRAVIS_NODE_VERSION: '0.10'
TRAVIS_NODE_VERSION: '0.12'
},
{
dir: 'appengine/geddy',
Expand Down Expand Up @@ -212,7 +212,7 @@ var sampleTests = [
}
];

if (process.env.TRAVIS_NODE_VERSION === '0.10') {
if (process.env.TRAVIS_NODE_VERSION === '0.12') {
// For some reason the "npm install" step for the Sails sample doesn't work on
// Travis when using Node.js stable. It works locally, however.
sampleTests.push({
Expand Down
40 changes: 20 additions & 20 deletions test/datastore/concepts.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,19 @@ test.cb.serial('gets a snapshot of task list entities', function (t) {

// Metadata

test.cb('performs a namespace query', function (t) {
test.cb.serial('performs a namespace query', function (t) {
metadata.testNamespaceRunQuery(t.end);
});

test.cb('performs a kind query', function (t) {
test.cb.serial('performs a kind query', function (t) {
metadata.testKindRunQuery(t.end);
});

test.cb('performs a property query', function (t) {
test.cb.serial('performs a property query', function (t) {
metadata.testPropertyRunQuery(t.end);
});

test.cb('performs a property by kind query', function (t) {
test.cb.serial('performs a property by kind query', function (t) {
metadata.testPropertyByKindRunQuery(t.end);
});

Expand Down Expand Up @@ -216,66 +216,66 @@ test.skip('performs an ancestor query', function (t) {

// Entities

test.cb('saves with an incomplete key', function (t) {
test.cb.serial('saves with an incomplete key', function (t) {
entity.testIncompleteKey(t.end);
});

test.cb('saves with a named key', function (t) {
test.cb.serial('saves with a named key', function (t) {
entity.testNamedKey(t.end);
});

test.cb('saves a key with a parent', function (t) {
test.cb.serial('saves a key with a parent', function (t) {
entity.testKeyWithParent(t.end);
});

test.cb('saves a key with multiple parents', function (t) {
test.cb.serial('saves a key with multiple parents', function (t) {
entity.testKeyWithMultiLevelParent(t.end);
});

test.cb('saves an entity with a parent', function (t) {
test.cb.serial('saves an entity with a parent', function (t) {
entity.testEntityWithParent(t.end);
});

test.cb('saves an entity with properties', function (t) {
test.cb.serial('saves an entity with properties', function (t) {
entity.testProperties(t.end);
});

test.cb('saves an entity with arrays', function (t) {
test.cb.serial('saves an entity with arrays', function (t) {
entity.testArrayValue(t.end);
});

test.cb('saves a basic entity', function (t) {
test.cb.serial('saves a basic entity', function (t) {
entity.testBasicEntity(t.end);
});

test.cb('saves with an upsert', function (t) {
test.cb.serial('saves with an upsert', function (t) {
entity.testUpsert(t.end);
});

test.cb('saves with an insert', function (t) {
test.cb.serial('saves with an insert', function (t) {
entity.testInsert(t.end);
});

test.cb('performs a lookup', function (t) {
test.cb.serial('performs a lookup', function (t) {
entity.testLookup(t.end);
});

test.cb('saves with an update', function (t) {
test.cb.serial('saves with an update', function (t) {
entity.testUpdate(t.end);
});

test.cb('deletes an entity', function (t) {
test.cb.serial('deletes an entity', function (t) {
entity.testDelete(t.end);
});

test.cb('performs a batch upsert', function (t) {
test.cb.serial('performs a batch upsert', function (t) {
entity.testBatchUpsert(t.end);
});

test.cb('performs a batch lookup', function (t) {
test.cb.serial('performs a batch lookup', function (t) {
entity.testBatchLookup(t.end);
});

test.cb('performs a batch delete', function (t) {
test.cb.serial('performs a batch delete', function (t) {
entity.testBatchDelete(t.end);
});

0 comments on commit 2bf1ac1

Please sign in to comment.