Skip to content

Commit 3d931bd

Browse files
authored
Merge pull request #192 from WorldBank-Transport/develop
Release v0.7.0
2 parents ffccd71 + 4e6c05c commit 3d931bd

27 files changed

+1888
-177
lines changed

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ The configuration is overridable by environment variables, expressed between []:
3535
- `api` - The address for the API. [API]
3636
- `iDEditor` - The address of the iDEditor. Defaults to the `master` branch of the [RAM fork of iD](https://github.com/WorldBank-Transport/ram-id), hosted on GH Pages. (Default: https://id.ruralaccess.info). [IDEDITOR]
3737
- `mbtoken` - The Mapbox Token to load map tiles from. [MBTOKEN]
38+
- `rahUrl` - The url for the Rural Accessibility Hub. [RAH_URL]
3839
- `auth` - The configuration for optional authentication with Auth0. By default, no authentication is set (Default: {})
3940
- `auth.domain` - See instructions below [AUTH_DOMAIN]
4041
- `auth.clientID` - See instructions below [AUTH_CLIENTID]
@@ -47,6 +48,7 @@ module.exports = {
4748
api: 'http://localhost:4000',
4849
idEditor: 'https://id.ruralaccess.info',
4950
mbtoken: 'asfd23rlmksjdf023rnnsafd',
51+
rahUrl: 'http://rah.surge.sh'
5052
auth: {}
5153
};
5254
```
@@ -72,7 +74,7 @@ Compiles the sass files, javascript, and launches the server making the site ava
7274
The system will watch files and execute tasks whenever one of them changes.
7375
The site will automatically refresh since it is bundled with livereload.
7476

75-
# Deployment
77+
## Deployment
7678
To prepare the app for deployment run:
7779

7880
```
@@ -81,7 +83,7 @@ yarn build
8183
This will package the app and place all the contents in the `dist` directory.
8284
The app can then be run by any web server.
8385

84-
## Docker
86+
### Docker
8587
The RAM frontend is also available in a [Docker container](https://hub.docker.com/r/wbtransport/ram-frontend/). This container builds the site and serves the interface through nginx. [Environment variables](#config-files) will be picked up when the container is run:
8688

8789
``` yml
@@ -96,3 +98,13 @@ services:
9698
```
9799
98100
To run the full RAM stack in Docker, you can use the `docker-compose.yml` file that's available in the [RAM backend repo](https://github.com/WorldBank-Transport/ram-backend/blob/develop/docker-compose.yml).
101+
102+
### Releasing a new version
103+
The process to release a new version:
104+
105+
- still on `develop`, bump the version in `package.json`
106+
- set up PR, have somebody do a review and merge `develop` into `master`
107+
- CircleCI will add a new tag to git using the version in `package.json`
108+
- if the tagging was successful, CircleCI will build the Docker image, tag it with the version number and push it to Docker Hub. If the tagging failed (because the version wasn't updated in `package.json`), the build fails
109+
110+
Once this is done, you can [add a new release on Github](https://github.com/WorldBank-Transport/ram-frontend/releases/new) with useful notes that describe it.
Lines changed: 41 additions & 0 deletions
Loading

app/assets/scripts/actions/index.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ export const REQUEST_SCENARIO_COMPARE = 'REQUEST_SCENARIO_COMPARE';
6666
export const RECEIVE_SCENARIO_COMPARE = 'RECEIVE_SCENARIO_COMPARE';
6767
export const INVALIDATE_SCENARIO_COMPARE = 'INVALIDATE_SCENARIO_COMPARE';
6868

69+
export const RESET_RAH_FORM = 'RESET_RAH_FORM';
70+
export const START_SUBMIT_RAH = 'START_SUBMIT_RAH';
71+
export const FINISH_SUBMIT_RAH = 'FINISH_SUBMIT_RAH';
72+
6973
// Auth
7074

7175
export function loginSuccess () {
@@ -411,6 +415,24 @@ export function fetchScenarioCompare (projectId, scenarioId, filters) {
411415
};
412416
}
413417

418+
// Scenario Form
419+
420+
export function resetRAHForm () {
421+
return { type: RESET_RAH_FORM };
422+
}
423+
424+
export function startSubmitRAH () {
425+
return { type: START_SUBMIT_RAH };
426+
}
427+
428+
export function finishSubmitRAH (data, error = null) {
429+
return { type: FINISH_SUBMIT_RAH, data, error, receivedAt: Date.now() };
430+
}
431+
432+
export function postRAHExport (projId, data) {
433+
return postAndDispatch(`${config.api}/projects/${projId}/rah-export`, data, startSubmitRAH, finishSubmitRAH);
434+
}
435+
414436
// Fetcher function
415437

416438
function getAndDispatch (url, requestFn, receiveFn) {

0 commit comments

Comments
 (0)