From f4a528ee07a196f2009dd20406942d4fbe3a1b08 Mon Sep 17 00:00:00 2001 From: Charles Williams Date: Wed, 27 Apr 2016 12:24:26 -0400 Subject: [PATCH 1/5] Initial --- tests/dummy/config/environment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/dummy/config/environment.js b/tests/dummy/config/environment.js index 6c6d69ec4..31682ceab 100644 --- a/tests/dummy/config/environment.js +++ b/tests/dummy/config/environment.js @@ -92,7 +92,7 @@ module.exports = function(environment) { ENV.OSF.url = 'https://osf.io/'; ENV.OSF.apiUrl = 'https://api.osf.io/v2/'; - ENV.OSF.authUrl = 'https://accounts.osf.io/'; + ENV.OSF.authUrl = 'https://accounts.osf.io/login/oauth2/'; } return ENV; From 2bb7616fb5e3bd472832d843af5db693077e4c0b Mon Sep 17 00:00:00 2001 From: Charles Williams Date: Wed, 27 Apr 2016 12:49:10 -0400 Subject: [PATCH 2/5] Initial commit --- .env-stage | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .env-stage diff --git a/.env-stage b/.env-stage new file mode 100644 index 000000000..fb915e954 --- /dev/null +++ b/.env-stage @@ -0,0 +1,5 @@ +OSF_CLIENT_ID=862528a980a846e7b4abb6f727c85a0e +OSF_SCOPE=osf.full_write +OSF_URL=http://localhost:4200/ + +OSF_ACCESS_TOKEN=gwb3F8PXbDZ9TFGkU6oSFSvVMPtJp59sFQNplFu6e8cXbddVYT1vffFazc0lWUcHIMHRvP From 67767109c307c7e9e2c8be95209f4b8cfb9e16c4 Mon Sep 17 00:00:00 2001 From: Charles Williams Date: Tue, 3 May 2016 13:42:02 -0400 Subject: [PATCH 3/5] Need not commit --- .env-stage | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .env-stage diff --git a/.env-stage b/.env-stage deleted file mode 100644 index fb915e954..000000000 --- a/.env-stage +++ /dev/null @@ -1,5 +0,0 @@ -OSF_CLIENT_ID=862528a980a846e7b4abb6f727c85a0e -OSF_SCOPE=osf.full_write -OSF_URL=http://localhost:4200/ - -OSF_ACCESS_TOKEN=gwb3F8PXbDZ9TFGkU6oSFSvVMPtJp59sFQNplFu6e8cXbddVYT1vffFazc0lWUcHIMHRvP From 14de8d581515067423d69a89255b972e9f6d40e6 Mon Sep 17 00:00:00 2001 From: Charles Williams Date: Tue, 3 May 2016 14:07:51 -0400 Subject: [PATCH 4/5] Changed Read.md for compatibility --- .gitignore | 1 - README.md | 57 +++++++++++++++++++++++++++++++++--------------------- index.js | 2 +- 3 files changed, 36 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 0cab8edcb..4e97a75dd 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,3 @@ testem.log .env-local .env-stage* .env-prod - diff --git a/README.md b/README.md index a725ab653..49a535b67 100644 --- a/README.md +++ b/README.md @@ -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- + ``` +and edit the new .env file to replace `` with the newly generated token. + Edit the new .env and replace: -- `` with the client id of your developer application -- `` with the newly generated token (if applicable) + +* `` with the client id of your developer application +* `` 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/). diff --git a/index.js b/index.js index bcd7d47b6..1495b2ff0 100644 --- a/index.js +++ b/index.js @@ -2,5 +2,5 @@ 'use strict'; module.exports = { - name: 'ember-osf' + name: 'ember-osf' }; From 8c93876be90af22f62b5a830b8c58a2d5d503796 Mon Sep 17 00:00:00 2001 From: Charles Williams Date: Tue, 3 May 2016 14:32:01 -0400 Subject: [PATCH 5/5] Config changes --- LICENSE.md | 13 ++++++++++--- ember-cli-build.js | 1 - package.json | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 02000b56e..f48c6b977 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -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. diff --git a/ember-cli-build.js b/ember-cli-build.js index fce710214..8998889eb 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -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'); diff --git a/package.json b/package.json index 26f46a8f2..5f85b69ae 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,6 @@ "ember-cli-babel": "^5.1.5" }, "ember-addon": { - "configPath": "tests/dummy/config" + "configPath": "dashboard/config" } }