-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As discussed this my attempt to overcome the burdens of a legacy application that resisted my attempts to update.
- Loading branch information
1 parent
4123766
commit 7912826
Showing
316 changed files
with
10,039 additions
and
11,034 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# EditorConfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.{diff,md}] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,20 @@ | ||
/blueprints/*/files/**/*.js | ||
# unconventional js | ||
/blueprints/*/files/ | ||
/vendor/ | ||
|
||
# compiled output | ||
/dist/ | ||
/tmp/ | ||
|
||
# dependencies | ||
/bower_components/ | ||
/node_modules/ | ||
|
||
# misc | ||
/coverage/ | ||
!.* | ||
|
||
# ember-try | ||
/.node_modules.ember-try/ | ||
/bower.json.ember-try | ||
/package.json.ember-try |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,12 @@ | ||
"use strict"; | ||
|
||
module.exports = { | ||
globals: { | ||
server: true | ||
}, | ||
root: true, | ||
parserOptions: { | ||
ecmaVersion: 2017, | ||
sourceType: 'module' | ||
}, | ||
parser: 'babel-eslint', | ||
env: { | ||
browser: true | ||
}, | ||
plugins: ['ember', 'prettier'], | ||
extends: ['eslint:recommended', 'plugin:ember/recommended', 'prettier'], | ||
extends: "@adfinis-sygroup/eslint-config/ember-app", | ||
|
||
rules: { | ||
'prettier/prettier': 'error' | ||
"no-unused-vars": "off", | ||
"prefer-rest-params": "off", | ||
"ember/use-brace-expansion": "off", | ||
"ember/no-get": "off", | ||
}, | ||
overrides: [ | ||
// node files | ||
{ | ||
files: [ | ||
'ember-cli-build.js', | ||
'testem.js', | ||
'blueprints/*/index.js', | ||
'config/**/*.js', | ||
'lib/*/index.js' | ||
], | ||
parserOptions: { | ||
sourceType: 'script', | ||
ecmaVersion: 2015 | ||
}, | ||
env: { | ||
browser: false, | ||
node: true | ||
} | ||
} | ||
] | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
# See https://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# compiled output | ||
/dist | ||
/tmp | ||
/dist/ | ||
/tmp/ | ||
|
||
# dependencies | ||
/node_modules | ||
/bower_components | ||
/bower_components/ | ||
/node_modules/ | ||
|
||
# misc | ||
/.env* | ||
/.pnp* | ||
/.sass-cache | ||
/connect.lock | ||
/coverage/* | ||
/coverage/ | ||
/libpeerconnection.log | ||
npm-debug.log* | ||
yarn-error.log | ||
testem.log | ||
/npm-debug.log* | ||
/testem.log | ||
/yarn-error.log | ||
|
||
# ember-try | ||
.node_modules.ember-try/ | ||
bower.json.ember-try | ||
package.json.ember-try | ||
/.node_modules.ember-try/ | ||
/bower.json.ember-try | ||
/package.json.ember-try |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
"use strict"; | ||
|
||
module.exports = { | ||
extends: "octane", | ||
|
||
rules: { | ||
"no-bare-strings": true, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
language: node_js | ||
node_js: | ||
- "10" | ||
|
||
dist: xenial | ||
|
||
addons: | ||
chrome: stable | ||
|
||
cache: | ||
yarn: true | ||
|
||
env: | ||
global: | ||
# See https://git.io/vdao3 for details. | ||
- JOBS=1 | ||
|
||
branches: | ||
only: | ||
- master | ||
|
||
before_install: | ||
- curl -o- -L https://yarnpkg.com/install.sh | bash | ||
- export PATH=$HOME/.yarn/bin:$PATH | ||
|
||
script: | ||
- yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"ignore_dirs": ["tmp", "dist", "node_modules"] | ||
"ignore_dirs": ["node_modules", "tmp", "dist", "build"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# customer-center | ||
|
||
Rewrite of the never release Adfinis customer center. | ||
|
||
## Prerequisites | ||
|
||
You will need the following things properly installed on your computer. | ||
|
||
* [Git](https://git-scm.com/) | ||
* [Node.js](https://nodejs.org/) | ||
* [Yarn](https://yarnpkg.com/) | ||
* [Ember CLI](https://ember-cli.com/) | ||
* [Google Chrome](https://google.com/chrome/) | ||
|
||
## Running / Development | ||
|
||
* `ember serve` | ||
* Visit your app at [http://localhost:4200](http://localhost:4200). | ||
* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests). | ||
|
||
### Code Generators | ||
|
||
Make use of the many generators for code, try `ember help generate` for more details | ||
|
||
### Running Tests | ||
|
||
* `ember test` | ||
* `ember test --server` | ||
|
||
### Linting | ||
|
||
* `yarn lint:hbs` | ||
* `yarn lint:js` | ||
* `yarn lint:js --fix` | ||
|
||
### Building | ||
|
||
* `ember build` (development) | ||
* `yarn build` (production) | ||
|
||
## Further Reading / Useful Links | ||
|
||
* [ember.js](https://emberjs.com/) | ||
* [ember-cli](https://ember-cli.com/) | ||
* Development Browser Extensions | ||
* [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi) | ||
* [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
import DS from 'ember-data' | ||
import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin' | ||
|
||
export default DS.JSONAPIAdapter.extend(DataAdapterMixin, { | ||
authorize(xhr) { | ||
if (this.get('session.data.authenticated.data.token')) { | ||
xhr.setRequestHeader( | ||
'X-Authorization', | ||
this.get('session.data.authenticated.data.token') | ||
) | ||
import JSONAPIAdapter from "@ember-data/adapter/json-api"; | ||
import { computed } from "@ember/object"; | ||
import { inject as service } from "@ember/service"; | ||
|
||
export default class ApplicationAdapter extends JSONAPIAdapter { | ||
@service session; | ||
|
||
@computed("session.data.authenticated.token", "session.isAuthenticated") | ||
get headers() { | ||
const headers = {}; | ||
|
||
if (this.session.isAuthenticated) { | ||
headers["X-Authorization"] = this.session.data.authenticated.token; | ||
} | ||
|
||
return headers; | ||
} | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import TimedAdapter from './timed' | ||
import ApplicationAdapter from "./application"; | ||
|
||
export default TimedAdapter.extend({ | ||
pathForType: () => 'billing-types' | ||
}) | ||
export default class TimedBillingTypeAdapter extends ApplicationAdapter { | ||
namespace = "/api/proxy/timed"; | ||
|
||
pathForType = () => "billing-types"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import TimedAdapter from './timed' | ||
import ApplicationAdapter from "./application"; | ||
|
||
export default TimedAdapter.extend({ | ||
pathForType: () => 'customers' | ||
}) | ||
export default class TimedCustomerAdapter extends ApplicationAdapter { | ||
namespace = "/api/proxy/timed"; | ||
|
||
pathForType = () => "customers"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import TimedAdapter from './timed' | ||
import ApplicationAdapter from "./application"; | ||
|
||
export default TimedAdapter.extend({ | ||
pathForType: () => 'reports' | ||
}) | ||
export default class TimedReportAdapter extends ApplicationAdapter { | ||
namespace = "/api/proxy/timed"; | ||
|
||
pathForType = () => "reports"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import TimedAdapter from './timed' | ||
import ApplicationAdapter from "./application"; | ||
|
||
export default TimedAdapter.extend({ | ||
pathForType: () => 'subscription-orders' | ||
}) | ||
export default class TimedSubscriptionOrderAdapter extends ApplicationAdapter { | ||
namespace = "/api/proxy/timed"; | ||
|
||
pathForType = () => "subscription-orders"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import TimedAdapter from './timed' | ||
import ApplicationAdapter from "./application"; | ||
|
||
export default TimedAdapter.extend({ | ||
pathForType: () => 'subscription-packages' | ||
}) | ||
export default class TimedSubscriptionPackageAdapter extends ApplicationAdapter { | ||
namespace = "/api/proxy/timed"; | ||
|
||
pathForType = () => "subscription-packages"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import TimedAdapter from './timed' | ||
import ApplicationAdapter from "./application"; | ||
|
||
export default TimedAdapter.extend({ | ||
pathForType: () => 'subscription-projects' | ||
}) | ||
export default class TimedSubscriptionProjectAdapter extends ApplicationAdapter { | ||
namespace = "/api/proxy/timed"; | ||
|
||
pathForType = () => "subscription-projects"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import TimedAdapter from './timed' | ||
import ApplicationAdapter from "./application"; | ||
|
||
export default TimedAdapter.extend({ | ||
pathForType: () => 'users' | ||
}) | ||
export default class TimedUserAdapter extends ApplicationAdapter { | ||
namespace = "/api/proxy/timed"; | ||
|
||
pathForType = () => "users"; | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.