Skip to content

fix some typos. #4112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 29, 2017
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
10 changes: 5 additions & 5 deletions spec/AuthenticationAdapters.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var defaultColumns = require('../src/Controllers/SchemaController').defaultColum
var authenticationLoader = require('../src/Adapters/Auth');
var path = require('path');

describe('AuthenticationProviers', function() {
describe('AuthenticationProviders', function() {
["facebook", "github", "instagram", "google", "linkedin", "meetup", "twitter", "janrainengage", "janraincapture", "vkontakte"].map(function(providerName){
it("Should validate structure of " + providerName, (done) => {
var provider = require("../src/Adapters/Auth/" + providerName);
Expand Down Expand Up @@ -230,10 +230,10 @@ describe('AuthenticationProviers', function() {
expect(typeof validator).toBe('function');
}

function validateAuthenticationHandler(authenticatonHandler) {
expect(authenticatonHandler).not.toBeUndefined();
expect(typeof authenticatonHandler.getValidatorForProvider).toBe('function');
expect(typeof authenticatonHandler.getValidatorForProvider).toBe('function');
function validateAuthenticationHandler(authenticationHandler) {
expect(authenticationHandler).not.toBeUndefined();
expect(typeof authenticationHandler.getValidatorForProvider).toBe('function');
expect(typeof authenticationHandler.getValidatorForProvider).toBe('function');
}

function validateAuthenticationAdapter(authAdapter) {
Expand Down
4 changes: 2 additions & 2 deletions spec/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ describe('server', () => {
});
});

it('throws if you initialize email adapter incorrecly', done => {
it('throws if you initialize email adapter incorrectly', done => {
reconfigureServer({
appName: 'unused',
verifyUserEmails: true,
Expand Down Expand Up @@ -428,7 +428,7 @@ describe('server', () => {
})
});

it('should suceed if you provide valid ip in masterKeyIps', done => {
it('should succeed if you provide valid ip in masterKeyIps', done => {
reconfigureServer({ masterKeyIps: ['1.2.3.4','2001:0db8:0000:0042:0000:8a2e:0370:7334'] })
.then(done)
});
Expand Down
4 changes: 2 additions & 2 deletions src/Adapters/Storage/Mongo/MongoSchemaCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class MongoSchemaCollection {
.then(schemas => schemas.map(mongoSchemaToParseSchema));
}

_fechOneSchemaFrom_SCHEMA(name: string) {
_fetchOneSchemaFrom_SCHEMA(name: string) {
return this._collection._rawFind(_mongoSchemaQueryFromNameQuery(name), { limit: 1 }).then(results => {
if (results.length === 1) {
return mongoSchemaToParseSchema(results[0]);
Expand Down Expand Up @@ -150,7 +150,7 @@ class MongoSchemaCollection {

// TODO: don't spend an extra query on finding the schema if the type we are trying to add isn't a GeoPoint.
addFieldIfNotExists(className: string, fieldName: string, type: string) {
return this._fechOneSchemaFrom_SCHEMA(className)
return this._fetchOneSchemaFrom_SCHEMA(className)
.then(schema => {
// The schema exists. Check for existing GeoPoints.
if (type.type === 'GeoPoint') {
Expand Down
8 changes: 4 additions & 4 deletions src/Adapters/Storage/Mongo/MongoStorageAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export class MongoStorageAdapter {
.then(schemaCollection => schemaCollection.findAndDeleteSchema(className))
}

// Delete all data known to this adatper. Used for testing.
// Delete all data known to this adapter. Used for testing.
deleteAllClasses() {
return storageAdapterAllCollections(this)
.then(collections => Promise.all(collections.map(collection => collection.drop())));
Expand All @@ -220,7 +220,7 @@ export class MongoStorageAdapter {
// Pointer field names are passed for legacy reasons: the original mongo
// format stored pointer field names differently in the database, and therefore
// needed to know the type of the field before it could delete it. Future database
// adatpers should ignore the pointerFieldNames argument. All the field names are in
// adapters should ignore the pointerFieldNames argument. All the field names are in
// fieldNames, they show up additionally in the pointerFieldNames database for use
// by the mongo adapter, which deals with the legacy mongo format.

Expand Down Expand Up @@ -265,12 +265,12 @@ export class MongoStorageAdapter {
// undefined as the reason.
getClass(className) {
return this._schemaCollection()
.then(schemasCollection => schemasCollection._fechOneSchemaFrom_SCHEMA(className))
.then(schemasCollection => schemasCollection._fetchOneSchemaFrom_SCHEMA(className))
}

// TODO: As yet not particularly well specified. Creates an object. Maybe shouldn't even need the schema,
// and should infer from the type. Or maybe does need the schema for validations. Or maybe needs
// the schem only for the legacy mongo format. We'll figure that out later.
// the schema only for the legacy mongo format. We'll figure that out later.
createObject(className, schema, object) {
schema = convertParseSchemaToMongoSchema(schema);
const mongoObject = parseObjectToMongoObjectForCreate(className, object, schema);
Expand Down