Skip to content
This repository has been archived by the owner on May 30, 2019. It is now read-only.

Fix 2019 #716

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
37 changes: 37 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/node:11.11

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4


working_directory: ~/repo

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: npm install

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

- run: npm run test
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Thank you http://bit.ly/2KYNd1q
# Ignore everything
**

# Allow files and directories
!./package.json
!/docker/
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
.sass-cache
node_modules
npm-debug.log
/.node-version
/appserver/java-spring/.java-version
/appserver/java-spring/out
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
11.11.0
17 changes: 15 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
language: java

dist: xenial

env:
matrix:
- TRAVIS_NODE_VERSION="11.11.0"

addons:
hosts:
- samplestack.local
Expand Down Expand Up @@ -28,11 +34,18 @@ install:
# (gulp e2e commands below invoke the corresponding gradle tasks
# to congifure the java middle tier)

- npm cache clean
- npm install -g npm@2.1.10
# enable nvm to have control over the Node.js version being used
- . $HOME/.nvm/nvm.sh
- nvm install
- nvm use
- npm cache verify

- npm install -g gulp
- npm install

- node -v
- npm -v

script:
- gulp unit
# for pull requests, we can't use sec. env vars, so no access
Expand Down
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:11-stretch-slim

WORKDIR /pkgs

ADD package.json /pkgs/

RUN ls
1 change: 0 additions & 1 deletion browser/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"modernizr": "2.8.3",
"momentjs": "2.9.0",
"ng-tags-input": "wooldridge/ngTagsInput-bower#bb0e439000983363a17256862b5ae763ef6b5000",
"ngMarkdown": "GrumpyWizards/ngMarkdown#c396e44b64d9e67f4dbc5626e2a645d36e87ed01",
"requirejs-plugins": "1.0.3",
"requirejs": "2.1.15",
"stacktrace-js": "0.6.4",
Expand Down
1 change: 0 additions & 1 deletion browser/src/app/styles/directives/_ss-search-results.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@
margin-top: 0;
margin-bottom: 3px;
padding:0;
line-height:
}

.ss-question-inner p {
Expand Down
6 changes: 3 additions & 3 deletions database/transforms/search-response.sjs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function searchTransform(context, params, input) {
outputObject.owner = unknownOwner;
};
var ownerNodes = input.xpath(".//owner");
if (ownerNodes.count > 0) {
if (fn.count(ownerNodes) > 0) {
var joinedOwners = joinReputations(ownerNodes);
outputObject.owner = joinedOwners[outputObject.owner.id];
if (outputObject.answers !== undefined) {
Expand All @@ -95,7 +95,7 @@ function searchTransform(context, params, input) {
var result = results[i];
var matches = result.matches;
var uri = result.uri;
var sourceDoc = fn.doc(uri).next().value;
var sourceDoc = cts.doc(uri);
for (var j = 0; j < matches.length; j++) {
var match = matches[j];
var source = "";
Expand Down Expand Up @@ -126,7 +126,7 @@ function searchTransform(context, params, input) {
}
var answerNodePath = "/array-node(\"answers\")/object-node()[" + answerIndex + "]/id";

var answersSource = sourceDoc.xpath(answerNodePath).next().value;
var answersSource = fn.head(sourceDoc.xpath(answerNodePath));
if (answersSource !== undefined) {
match.id = answersSource;
} else {
Expand Down
6 changes: 6 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,9 @@ if (!ctx.parentPid() && ctx.currentTask === 'watch') {
ctx.restartChild();
});
}

process.on('exit', function() {
if ( ctx.hadErrors ) {
process.exit(1);
}
});