Skip to content

Commit

Permalink
General cleanup and updates
Browse files Browse the repository at this point in the history
  • Loading branch information
binoculars committed Oct 29, 2017
1 parent b9b855a commit c43fa8b
Show file tree
Hide file tree
Showing 9 changed files with 178 additions and 202 deletions.
3 changes: 0 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ module.exports = {
globals: {
MathJax: true
},
rules: {
'array-callback-return': 'off',
}
};
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8
17 changes: 6 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,18 @@ sudo: required
dist: trusty
addons:
chrome: stable

node_js:
8
firefox: latest

env:
global:
- SUPPRESS_NO_CONFIG_WARNING=true
- SUPPRESS_NO_CONFIG_WARNING=true

cache:
yarn: true
directories:
- node_modules
cache: yarn

install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
- yarn --prefer-offline --pure-lockfile
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
- yarn --prefer-offline --frozen-lockfile

script:
- yarn test:cover
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]
### Added
- Headless Firefox for tests
### Changed
- Remove global eslint rule and inline in router
- Update travis to use Firefox
- Update README
- Use .nvmrc file (for travis and local)
- Update yarn.lock
- Update Dockerfile
### Removed
### Fixed
- Fix Loading indicator on Reviews dashboard which was not displaying when user clicks on see more link button.
Expand Down
37 changes: 5 additions & 32 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*

ENV WATCHMAN_VERSION 4.7.0
ENV WATCHMAN_VERSION 4.9.0
RUN cd /tmp \
&& git clone https://github.com/facebook/watchman.git \
&& cd watchman \
Expand All @@ -40,40 +40,13 @@ RUN mkdir -p /code
WORKDIR /code

COPY ./package.json ./yarn.lock /code/
RUN yarn --pure-lockfile --ignore-engines
RUN yarn --frozen-lockfile --ignore-engines

COPY ./ /code/
COPY ./ ./

ARG GIT_COMMIT=
ENV GIT_COMMIT ${GIT_COMMIT}

ARG APP_ENV=production
ENV APP_ENV ${APP_ENV}
RUN yarn build --environment=production

ARG BACKEND=local
ENV BACKEND ${BACKEND}

ARG OSF_URL=
ENV OSF_URL ${OSF_URL}
ARG OSF_API_URL=
ENV OSF_API_URL ${OSF_API_URL}
ARG OSF_RENDER_URL=
ENV OSF_RENDER_URL ${OSF_RENDER_URL}
ARG OSF_FILE_URL=
ENV OSF_FILE_URL ${OSF_FILE_URL}
ARG OSF_HELP_URL=
ENV OSF_HELP_URL ${OSF_HELP_URL}
ARG OSF_COOKIE_LOGIN_URL=
ENV OSF_COOKIE_LOGIN_URL ${OSF_COOKIE_LOGIN_URL}
ARG OSF_OAUTH_URL=
ENV OSF_OAUTH_URL ${OSF_OAUTH_URL}
ARG SHARE_BASE_URL=
ENV SHARE_BASE_URL ${SHARE_BASE_URL}
ARG SHARE_API_URL=
ENV SHARE_API_URL ${SHARE_API_URL}
ARG SHARE_SEARCH_URL=
ENV SHARE_SEARCH_URL ${SHARE_SEARCH_URL}

RUN ./node_modules/ember-cli/bin/ember build --env ${APP_ENV}

CMD ["yarn", "test"]
CMD ["yarn", "start"]
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ This README outlines the details of collaborating on this OSF Reviews Ember appl
You will need the following software properly installed on your computer.

* [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org/) (with NPM)
* [Bower](https://bower.io/)
* [Node.js](https://nodejs.org/)
* [Yarn](https://yarnpkg.com/)
* [Ember CLI](https://ember-cli.com/)
* [PhantomJS](http://phantomjs.org/)
* [Chrome](https://www.google.com/chrome/)
* [Firefox](https://www.mozilla.org/firefox/)

## Installation

* `git clone <repository-url>` this repository
* `cd reviews`
* `npm install`
* `bower install`
* `cd ember-osf-reviews`
* `yarn --frozen-lockfile`

## Running / Development

Expand Down
4 changes: 4 additions & 0 deletions app/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ const Router = EmberRouter.extend({

});

/* eslint-disable array-callback-return */

Router.map(function() {
this.route('page-not-found', { path: '/*bad_url' });

Expand All @@ -62,4 +64,6 @@ Router.map(function() {
this.route('forbidden');
});

/* eslint-enable array-callback-return */

export default Router;
5 changes: 5 additions & 0 deletions testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ module.exports = {
disable_watching: true,
launch_in_ci: [
'Chrome',
'Firefox',
],
launch_in_dev: [
'Chrome',
'Firefox',
],
browser_args: {
Chrome: [
Expand All @@ -16,5 +18,8 @@ module.exports = {
'--remote-debugging-port=9222',
'--no-sandbox',
],
Firefox: [
'-headless',
],
},
};
Loading

0 comments on commit c43fa8b

Please sign in to comment.