Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ testem.log
.env-local
.env-stage*
.env-prod

13 changes: 10 additions & 3 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@ The MIT License (MIT)

Copyright (c) 2016

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
57 changes: 35 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,69 @@ This repo contains code for interacting with the OSF APIv2 inside of an Ember ap

## Installation

* `git clone` this repository
* `npm install`
* `bower install`
* `git clone` this repository
* `npm install`
* `bower install`

## Configuration

#### Using the Staging or Production API (preferred)
### Using the Staging or Production API (preferred)

To do this, you will need to [create a developer application](https://staging.osf.io/settings/applications/) on the relevant version of the OSF.
To do this, you will need to [create a developer application](https://staging.osf.io/settings/applications/) on the
relevant version of the OSF.

#### Running the OSF Locally (optional)
### Running the OSF Locally (optional)

For local development, you will need to be running the [OSF APIv2](https://github.com/CenterForOpenScience/osf.io#running-the-api-server).
To connect to the APIv2 while using [fakecas](https://github.com/CenterForOpenScience/osf.io#running-the-osf), you will need to generate a
personal access token on your local OSF instance ([here](http://localhost:5000/settings/tokens/-- go ahead and grant access to all scopes)).
For local development, you will need to be running the [OSF
APIv2](https://github.com/CenterForOpenScience/osf.io#running-the-api-server). To connect to the APIv2 while using
[fakecas](https://github.com/CenterForOpenScience/osf.io#running-the-osf), you will need to generate a personal
access token on your local OSF instance ([here](http://localhost:5000/settings/tokens/-- go ahead and grant access
to all scopes)).

#### Create a .env
### Create a .env

To connect to the APIv2 while using [fakecas](https://github.com/CenterForOpenScience/osf.io#running-the-osf), you will
need to generate a personal access token on your local OSF instance ([here](http://localhost:5000/settings/tokens/-- go
ahead and grant access to all scopes)).

Next, depending on the environment you want to target, you will need to create the .env file. For:
- local: .env-local
- staging: .env-stage
- staging2: .env-stage2
- production: .env-prod

* local: .env-local
* staging: .env-stage
* staging2: .env-stage2
* production: .env-prod

To do this:

```bash
cp .env-dist .env-<env>

```

and edit the new .env file to replace `<your_personal_access_token>` with the newly generated token.

Edit the new .env and replace:
- `<your_client_id>` with the client id of your developer application
- `<your_personal_access_token>` with the newly generated token (if applicable)

* `<your_client_id>` with the client id of your developer application
* `<your_personal_access_token>` with the newly generated token (if applicable)

**Note**: For development, we reccomend point your local app to our staging servers: `ember s --environment staging`

## Running

* `ember server`
* Visit your app at http://localhost:4200.
* `ember server`
* Visit your app at [http://localhost:4200](http://localhost:4200).

**Note:** This runs the dummy app contained in /tests/dummy

## Running Tests

* `npm test` (Runs `ember try:testall` to test your addon against multiple Ember versions)
* `ember test`
* `ember test --server`
* `npm test` (Runs `ember try:testall` to test your addon against multiple Ember versions)
* `ember test`
* `ember test --server`

## Building

* `ember build`
* `ember build`

For more information on using ember-cli, visit [http://www.ember-cli.com/](http://www.ember-cli.com/).
1 change: 0 additions & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module.exports = function(defaults) {
var app = new EmberAddon(defaults, {
});


app.import('bower_components/bootstrap/dist/css/bootstrap.min.css');
app.import('bower_components/bootstrap/dist/css/bootstrap-theme.min.css');
app.import('bower_components/bootstrap/dist/js/bootstrap.min.js');
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
'use strict';

module.exports = {
name: 'ember-osf'
name: 'ember-osf'
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
"loader": "^2.1.0"
},
"ember-addon": {
"configPath": "tests/dummy/config"
"configPath": "dashboard/config"
}
}