Skip to content

Commit

Permalink
Merge branch 'release/0.17.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
alexschiller committed May 30, 2018
2 parents 7cd5895 + b80d8fc commit 76e9414
Show file tree
Hide file tree
Showing 45 changed files with 584 additions and 519 deletions.
10 changes: 4 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ language: node_js

sudo: required
dist: trusty

addons:
chrome: stable
firefox: latest

env:
global:
Expand All @@ -16,15 +18,11 @@ cache:
- node_modules
- $HOME/.cache # includes bowers cache

before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start

install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
- yarn --pure-lockfile --ignore-engines
- ./node_modules/bower/bin/bower install --config.interactive=false
- yarn --frozen-lockfile --ignore-engines
- ./node_modules/.bin/bower install --config.interactive=false

script:
- yarn test:cover
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.17.0] - 2018-05-29
### Added
- `scheduled-banner` component that pulls banners (created in the OSF Admin app) from the API

### Changed
- Format last edited date in search result like "MMM DDD, YYYY UTC" instead of "YYYY-MM-DD (UTC)"
- `navbar-auth-dropdown` to match current changes to the navbar

### Fixed
- Missing banner translation error

## [0.16.2] - 2018-05-01
### Added
- temporary inline style to sign-up button
Expand All @@ -26,6 +37,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- ember-cli-moment-shim version to `^3.5.3` due to security issues found in `moment` versions before `2.19.3`
- classes and element tags to match styles needed for long name truncation on navbar

### Added
- Add moderator model, serializer, and adapter

## [0.15.0] - 2018-03-06
### Added
- Added "choose your custom citation" section to citation-widget
Expand Down
54 changes: 7 additions & 47 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,52 +1,12 @@
FROM node:8
FROM quay.io/centerforopenscience/ember-base

RUN apt-get update \
&& apt-get install -y \
git \
# Next 2 needed for yarn
apt-transport-https \
ca-certificates \
# watchman
build-essential \
automake \
autoconf \
python-dev \
&& apt-get clean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
COPY ./package.json ./yarn.lock ./.yarnrc ./
RUN yarn --frozen-lockfile --ignore-engines

RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get install -y \
yarn \
&& apt-get clean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
COPY ./.bowerrc ./bower.json ./
RUN ./node_modules/.bin/bower install --allow-root --config.interactive=false

ENV WATCHMAN_VERSION 4.7.0
RUN cd /tmp \
&& git clone https://github.com/facebook/watchman.git \
&& cd watchman \
&& git checkout v$WATCHMAN_VERSION \
&& ./autogen.sh \
&& ./configure --enable-statedir=/tmp \
&& make \
&& make install \
&& mv watchman /usr/local/bin/watchman \
&& rm -Rf /tmp/watchman

RUN mkdir -p /code
WORKDIR /code

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

COPY ./.bowerrc /code/.bowerrc
COPY ./bower.json /code/bower.json
RUN ./node_modules/bower/bin/bower install --allow-root --config.interactive=false

COPY ./ /code/
COPY ./ ./

ARG GIT_COMMIT=
ENV GIT_COMMIT ${GIT_COMMIT}
Expand All @@ -55,6 +15,6 @@ ARG APP_ENV=production
ENV APP_ENV ${APP_ENV}
ARG BACKEND=local
ENV BACKEND ${BACKEND}
RUN ./node_modules/ember-cli/bin/ember build --env ${APP_ENV}
RUN ./node_modules/.bin/ember build --env ${APP_ENV}

CMD ["yarn", "test"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ See the [yarn docs](https://yarnpkg.com/) for installing and using yarn. These i
environment if you plan to modify and test this addon in isolation.

* `git clone` this repository
* `yarn install --pure-lockfile`
* `yarn install --frozen-lockfile`
* `bower install`

## Using this addon in another Ember app
Expand Down
26 changes: 26 additions & 0 deletions addon/adapters/moderator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import OsfAdapter from './osf-adapter';

export default OsfAdapter.extend({
pathForType() {
return 'preprint_providers';
},
buildURL(modelName, id, snapshot, requestType, query) {
let provider = '';
if (query) {
provider = query.provider;
delete query.provider;
} else if (requestType === 'createRecord' && snapshot.record.provider) {
provider = snapshot.record.provider;
delete snapshot.record.provider;
return `${this._buildURL(modelName)}/${provider}/moderators/`;
} else if (snapshot.adapterOptions && snapshot.adapterOptions.provider) {
provider = snapshot.adapterOptions.provider;
delete snapshot.adapterOptions.provider;
if (requestType === 'updateRecord' || requestType === 'deleteRecord' || requestType === 'findRecord') {
return `${this._buildURL(modelName)}/${provider}/moderators/${id}/`;
}
}

return `${this._super(...arguments)}${provider}/moderators/`;
}
});
4 changes: 4 additions & 0 deletions addon/adapters/subscription.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import OsfAdapter from './osf-adapter';

export default OsfAdapter.extend({
});
125 changes: 0 additions & 125 deletions addon/components/donate-banner/component.js

This file was deleted.

Loading

0 comments on commit 76e9414

Please sign in to comment.