Skip to content

Commit 17c1050

Browse files
committed
2 parents cf9a7b3 + f17da39 commit 17c1050

17 files changed

Lines changed: 27203 additions & 16518 deletions

File tree

app/components/App/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import Helmet from 'react-helmet'
44
import Q from 'q'
55
import React, { Component } from 'react'
66

7-
FieldDBObject.todo = function () {};
8-
FieldDBObject.warn = function () {};
7+
FieldDBObject.todo = function () {}
8+
FieldDBObject.warn = function () {}
99
FieldDBObject.confirm = function (message, optionalLocale) {
1010
const deferred = Q.defer()
1111
console.warn('Not confirming: ', message)

app/components/CorpusMask/CorpusMaskContainer.test.js

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('Container::CorpusMask', function () {
2121
},
2222
children: [], // To avoid rendering the Search component
2323
corpusMask: Immutable.fromJS({
24-
dbname: 222,
24+
dbname: 'abc',
2525
title: 'the-corpusMask-title',
2626
team: {
2727
id: 1234,
@@ -30,6 +30,9 @@ describe('Container::CorpusMask', function () {
3030
fields: [],
3131
prototypeApp: {
3232
url: ''
33+
},
34+
connection: {
35+
dbname: 'abc'
3336
}
3437
}),
3538
searchResults: Immutable.fromJS([])
@@ -42,6 +45,13 @@ describe('Container::CorpusMask', function () {
4245
})
4346

4447
expect(doc).to.have.keys(['component', 'root', 'node', 'nodes', 'length', 'options', 'complexSelector'])
48+
49+
const images = doc.find('img')
50+
expect(images).to.exist
51+
expect(images.length).to.equal(2)
52+
53+
const avatar = images.nodes[0]
54+
expect(avatar.getAttribute('src')).to.equal('https://secure.gravatar.com/avatar/900150983cd24fb0d6963f7d28e17f72.jpg?s=96&d=retro&r=pg')
4555
})
4656

4757
it('should support OLAC metadata in header', function () {
@@ -52,16 +62,19 @@ describe('Container::CorpusMask', function () {
5262
teamname: 'someone'
5363
},
5464
corpusMask: Immutable.fromJS({
55-
dbname: 222,
65+
dbname: 'abc',
5666
title: 'the-corpusMask-title',
67+
connection: {
68+
dbname: 'abc'
69+
},
5770
description: 'hi \n* a \n* list',
5871
dateCreated: 1411424261782,
5972
dateModified: 1490462360903,
6073
keywords: 'kartuli, batumi, natural speech',
6174
copyright: 'Georgian Together Users',
6275
termsOfUse: 'any \nterms',
6376
team: {
64-
id: 1234,
77+
id: '123-efg',
6578
name: 'jack'
6679
},
6780
fields: [{
@@ -129,7 +142,10 @@ describe('Container::CorpusMask', function () {
129142
teamname: 'someone'
130143
},
131144
corpusMask: Immutable.fromJS({
132-
dbname: 222,
145+
dbname: 'abc',
146+
connection: {
147+
dbname: 'abc'
148+
},
133149
title: 'the-corpusMask-title',
134150
description: 'hi \n* a \n* list',
135151
termsOfUse: 'some \nterms',

app/components/CorpusMask/index.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ class CorpusMaskContainer extends Component {
4242
})
4343
}
4444
render () {
45-
let {corpusMask} = this.props
45+
let { corpusMask } = this.props
46+
const fielddbCorpusMask = new CorpusMask(corpusMask.toJS())
4647

4748
if (!corpusMask || !corpusMask.get('team')) {
4849
return (
@@ -160,7 +161,7 @@ class CorpusMaskContainer extends Component {
160161
<h1 className='media-heading'>{corpusMask.get('title')}</h1>
161162
<div className='media'>
162163
<a href={`${corpusMask.get('prototypeApp').get('url')}/prototype/_design/prototype/user.html#login/${corpusMask.get('dbname')}`} className='pull-right'>
163-
<img src={'https://secure.gravatar.com/avatar/' + corpusMask.getIn(['connection', 'gravatar']) + '.jpg?s=96&d=retro&r=pg'} alt='Corpus image' className='media-object' />
164+
<img src={'https://secure.gravatar.com/avatar/' + fielddbCorpusMask.connection.gravatar + '.jpg?s=96&d=retro&r=pg'} alt='Corpus image' className='media-object' />
164165
</a>
165166
<div className='media-body'>
166167
<div className='description' dangerouslySetInnerHTML={{

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
"tests"
2323
],
2424
"dependencies": {
25-
"fielddb": "^5.5.29"
25+
"fielddb": "5.121.19-rc0"
2626
}
2727
}

lib/corpus.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ var getCorpusMask = function(dbname, next) {
4141
corpusMask.team.corpus = corpusMask;
4242
corpusMask.connection = corpusMask.connection || {};
4343
corpusMask.team.fetch(config.corpus.url + "/" + validateIdentifier.identifier).then(function() {
44-
// console.log(new Date() + " owners's gravatar in this database " + corpusMask.team.gravatar, corpusMask.startYear);
45-
// console.log(new Date() + " corpus connection's gravatar in this database " + corpusMask.connection.gravatar);
46-
// console.log(new Date() + " TODO consider saving corpus.json with the team inside.");
44+
// Must prime the gravatar:
45+
// corpusMask.debug(new Date() + " owners's gravatar in this database " + corpusMask.team.gravatar, corpusMask.startYear);
46+
// corpusMask.debug(new Date() + " corpus connection's gravatar in this database " + corpusMask.connection.gravatar);
47+
// corpusMask.debug(new Date() + " TODO consider saving corpus.json with the team inside.");
4748
deferred.resolve(corpusMask);
4849
}, function(err) {
4950
console.log(new Date() + "error fetching corpus team", err);

lib/user.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ var getUserMask = function getUserMask(username, next) {
7373
connection: corpusConnection
7474
});
7575
promises.push(corpusMask.fetch(config.corpus.url + "/" + corpusConnection.dbname).then(function() {
76-
// Must prime the gravatar
77-
// console.log(new Date() + " Using connection from the corpus mask details", corpusMask.connection.owner, corpusMask.connection.gravatar);
76+
// Must prime the gravatar:
77+
corpusMask.debug(new Date() + " Using connection from the corpus mask details", corpusMask.connection.owner, corpusMask.connection.gravatar);
7878
corpusMask.connection.title = corpusMask.connection.title;
7979
corpusMask.connection.description = corpusMask.connection.description;
8080
if (!corpusMask.connection.websiteUrl || corpusMask.connection.websiteUrl === config.public.url || corpusMask.connection.websiteUrl.indexOf("lingsync.org") === corpusMask.connection.websiteUrl.length - 12) {
@@ -90,7 +90,7 @@ var getUserMask = function getUserMask(username, next) {
9090
});
9191

9292
// console.log(new Date() + " Waiting for " + promises.length + " to download details");
93-
Q.allSettled(promises).done(function(results) {
93+
Q.allSettled(promises).done(function() {
9494
// console.log(new Date() + " TODO Consider saving in the user to avoid making requests again ", results.length);
9595
// console.log(new Date() + " userPrivate.userMask.corpora.titles ", userPrivate.userMask.corpora.map(function(mask) {
9696
// return mask.title;

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"consolidate": "^0.13.1",
4040
"debug": "^2.6.3",
4141
"express": "^4.13.3",
42-
"fielddb": "https://github.com/FieldDB/FieldDB.git",
42+
"fielddb": "^5.168.13-rc0",
4343
"forever": "^0.15.1",
4444
"handlebars": "^4.0.2",
4545
"history": "^1.17.0",
@@ -66,7 +66,7 @@
6666
"fielddb-web": "./bin/fielddb-web-server"
6767
},
6868
"engines": {
69-
"node": "~4.0 || ^6.0"
69+
"node": "^4.0 || ^6.0"
7070
},
7171
"scripts": {
7272
"build": "npm run webpack && gulp build",
@@ -76,7 +76,7 @@
7676
"lint:es6": "eslint --fix --ext .jsx --ext .js app bin",
7777
"start": "./bin/fielddb-web-server",
7878
"start:watch": "NODE_PATH=./app concurrently --kill-others \"nodemon ./bin/fielddb-web-server\" \"node webpack.server.js\" \"gulp css:watch\"",
79-
"start:production": "NODE_ENV=production PORT=8000 API_BASE_URL=http://localhost:8000 NODE_PATH=./app node app/server",
79+
"start:production": "NODE_ENV=production PORT=8000 API_BASE_URL=http://localhost:8000 NODE_PATH=./app node bin/fielddb-web-server",
8080
"test": "NODE_ENV=test mocha test/**/*-spec.js",
8181
"test:ci": "NODE_ENV=test NODE_PATH=./app mocha --compilers js:babel-register -r app/spec/support/setup.mocha.js --recursive 'app/**/*.test.js'",
8282
"test:site": "node test/integration/links.js",

public/components/fielddb/.bower.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fielddb",
3-
"version": "5.5.29",
3+
"version": "5.121.19-rc0",
44
"homepage": "http://fielddb.github.io/FieldDB/",
55
"bugs": {
66
"url": "https://github.com/FieldDB/FieldDB/issues"
@@ -68,13 +68,13 @@
6868
"dependencies": {},
6969
"main": "fielddb.js",
7070
"devDependencies": {},
71-
"_release": "5.5.29",
71+
"_release": "5.121.19-rc0",
7272
"_resolution": {
7373
"type": "version",
74-
"tag": "v5.5.29",
75-
"commit": "6d248da3ef96a0faa7b64cee550a14a167db6f7b"
74+
"tag": "v5.121.19-rc0",
75+
"commit": "be23290812ef88c0648186517a0e66ca246c2c98"
7676
},
7777
"_source": "https://github.com/OpenSourceFieldlinguistics/bower-fielddb.git",
78-
"_target": "^5.5.29",
78+
"_target": "5.121.19-rc0",
7979
"_originalSource": "fielddb"
8080
}

public/components/fielddb/bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fielddb",
3-
"version": "5.5.29",
3+
"version": "5.121.19-rc0",
44
"homepage": "http://fielddb.github.io/FieldDB/",
55
"bugs": {
66
"url": "https://github.com/FieldDB/FieldDB/issues"

0 commit comments

Comments
 (0)