Skip to content

Commit 8a60c4b

Browse files
Merge branch 'master' into bugfix-duplicate-properties
2 parents fcafc8b + 8d4b5d8 commit 8a60c4b

File tree

90 files changed

+850
-639
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+850
-639
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# See https://help.github.com/ignore-files/ for more about ignoring files.
22

3+
/concat-stats-for
4+
35
# Terraform
46
terraform.tfstate
57
terraform.tfstate.backup

CONTRIBUTING.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Questions
2+
3+
This is the issue tracker for [Ember.js API](https://emberjs.com/api/).
4+
5+
# Issue Labeling
6+
7+
We use [StandardIssueLabels](https://github.com/wagenet/StandardIssueLabels) for Github Issues.
8+
9+
# Issues
10+
11+
Think you've found a bug or have a new feature to suggest? Let us know!
12+
13+
## Reporting a Bug
14+
15+
1. Search for similar issues. It's possible somebody has encountered
16+
this bug already.
17+
18+
2. Please make sure you provide very specific steps to reproduce the error.
19+
If we cannot reproduce it, we will close the ticket. Screenshots or [recorded gifs](https://www.cockos.com/licecap/) of
20+
the issue that you are experiencing will help towards reproducing and solving issues sooner.
21+
22+
4. Your issue will be verified. The provided example will be tested for
23+
correctness. Our team will work with you until your issue can
24+
be verified.
25+
26+
5. Keep up to date with feedback from our team on your ticket. Your
27+
ticket may be closed if it becomes stale.
28+
29+
6. If possible, submit a Pull Request with a failing test. Better yet, take
30+
a stab at fixing the bug yourself if you can!
31+
32+
The more information you provide, the easier it is for us to validate that
33+
there is a bug and the faster we'll be able to take action.
34+
35+
### Triaging policy
36+
37+
* You might be requested to provide a reproduction or extra information. In that
38+
case, the issue will be labeled as _Needs Submitter Response_. If we did not
39+
get any response after seven days, we will ping you to remind you about it. We
40+
might close the issue if we do not hear from you after two weeks since the
41+
original notice.
42+
43+
* If you submit a feature request as an issue, you will be invited to follow the
44+
[instructions in this document](#requesting-a-feature) and the issue will be closed.
45+
46+
* Issues that become inactive will be labeled accordingly
47+
to inform the original poster and our contributors that the issue
48+
should be closed since the issue is no longer actionable. The issue
49+
can be reopened at a later time if needed, e.g. becomes actionable again.
50+
51+
* If possible, issues will be labeled to indicate the status or priority.
52+
For example, labels may have a prefix for `Status: X`, or `Priority: X`.
53+
Statuses may include: `In Progress`, `On Hold`. Priorities may include:
54+
`High` or `Low`.
55+
56+
## Requesting a Feature
57+
58+
* Provide a clear and detailed explanation of the feature you want and why
59+
it's important to add. Keep in mind that we want features that will be useful
60+
to the majority of our users and not just a small subset.
61+
62+
* After discussing the feature you may choose to attempt a Pull Request. If
63+
you're at all able, start writing some code. We always have more work to do
64+
than time to do it. If you can write some code then that will speed the process
65+
along.
66+
67+
If you have a question please reach out to us on the #team-learning channel on ember slack
68+
69+
# Building Ember.js API Docs
70+
71+
```sh
72+
clone the latest ember.js api docs from github
73+
- git clone https://github.com/ember-learn/ember-api-docs.git
74+
75+
cd to the cloned ember-api-docs directory
76+
- cd ember-api-docs
77+
78+
ensure Node.js, bower and yarn are installed
79+
80+
follow these commands to build ember.js
81+
- yarn install
82+
- bower install
83+
- yarn run build
84+
```
85+
86+
# Development steps
87+
88+
1. Follow the setup steps listed above under [Building Ember.js API](#building-emberjs-api-docs).
89+
90+
2. To start the development server, run `yarn start`.
91+
92+
3. To run all tests run `yarn test`
93+
94+
4. To run the app with fastboot cli like our server deployment run the following commands,
95+
```
96+
- ember deploy production
97+
- ./bin/ember-fastboot tmp/deploy-dist
98+
```
99+
100+
101+
# Pull Requests
102+
103+
We love pull requests. Here's a quick guide:
104+
105+
1. Fork the repo.
106+
107+
2. Run the tests. We only take pull requests with passing tests, and it's great
108+
to know that you have a clean slate: `yarn install && bower install && yarn test`.
109+
110+
3. Add a test for your change. Only refactoring and documentation changes
111+
require no new tests. If you are adding functionality or fixing a bug, we need
112+
a test!
113+
114+
4. Make the test pass.
115+
116+
5. Commit your changes. If your pull request fixes an issue specify it in the commit message.
117+
118+
6. Push to your fork and submit a pull request. Please provide us with some
119+
explanation of why you made the changes you made. For new features make sure to
120+
explain a standard use case to us.
121+
122+
We try to be quick about responding to tickets but sometimes we get a bit
123+
backlogged. If the response is slow, try to find someone on slack (#team-learning) to
124+
give the ticket a review.
125+
126+
Including tests that fail without your code, and making it pass will increase the chance
127+
that your pull request is accepted.
128+
129+
And in case we didn't emphasize it enough: we love tests!
130+
131+
132+
# Travis CI Tests
133+
134+
We use [Travis CI](https://travis-ci.org/ember-learn/ember-api-docs/pull_requests) to test each PR before it is merged.
135+
136+
When you submit your PR (or later change that code), a Travis build will automatically be kicked off. A note will be added to the PR, and will indicate the current status of the build.
137+
138+
139+
NOTE: Derived from https://raw.githubusercontent.com/emberjs/ember.js/master/CONTRIBUTING.md

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,37 @@
11
# [Ember-api-docs](https://emberjs.com/api/) [![Build Status](https://travis-ci.org/ember-learn/ember-api-docs.svg?branch=master)](https://travis-ci.org/ember-learn/ember-api-docs)
22

3-
This app is used to produce versioned Ember api docs. To view the data generator producing its data, please visit https://github.com/ember-learn/ember-jsonapi-docs
3+
This app is used to produce versioned [Ember api docs](https://emberjs.com/api). To view the data generator producing its data, please visit https://github.com/ember-learn/ember-jsonapi-docs
44

55
## Want to help out?
6-
We'd love to get help working on the [next set of issues we're seeing](https://github.com/ember-learn/ember-api-docs/projects/2)
6+
7+
We'd love to get help working on the [next set of issues we're seeing](https://github.com/ember-learn/ember-api-docs/projects/2).
8+
9+
If you're a new contributor, come say hi in the Ember Community Slack's
10+
team-learning channel, and look for the tags ["Good for New Contributors"
11+
and "Help Wanted"](https://github.com/ember-learn/ember-api-docs/issues?q=is%3Aopen+is%3Aissue+label%3A%22Good+for+New+Contributors%22+label%3A%22help+wanted%22)
12+
on our Issues.
13+
14+
Please also see [CONTRIBUTING.md](CONTRIBUTING.md).
15+
16+
## Quickstart to run locally
17+
18+
```
19+
git clone https://github.com/ember-learn/ember-api-docs.git
20+
yarn install
21+
bower install
22+
ember serve
23+
```
24+
View at http://localhost:4200
25+
26+
## Project Overview
27+
28+
Ember itself is documented using a tool called [YUIDoc](http://yui.github.io/yuidoc/).
29+
YUIDoc creates structured API doc data, which is turned into JSONAPI by a generator, [ember-jsonapi-docs](https://github.com/ember-learn/ember-jsonapi-docs).
30+
That data is filtered and displayed by this Ember app, [ember-api-docs](https://github.com/ember-learn/ember-api-docs).
31+
32+
This project contains only the [API docs](https://emberjs.com/api) portion of [Emberjs.com](https://emberjs.com/). If you're looking for the rest of the site,
33+
see the [website](https://github.com/emberjs/website)
34+
and [guides](https://github.com/emberjs/guides) repositories.
735

836
## a11y testing
937

app/adapters/application.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1+
import { inject as service } from '@ember/service';
12
import DS from 'ember-data';
2-
import Ember from 'ember';
33
import fetch from 'fetch';
44
import ENV from 'ember-api-docs/config/environment';
5-
6-
const {
7-
Inflector: { inflector },
8-
inject: { service }
9-
} = Ember;
5+
import { pluralize } from 'ember-inflector';
106

117
const { JSONAPIAdapter } = DS;
128

@@ -29,11 +25,11 @@ export default JSONAPIAdapter.extend({
2925
if (['namespace', 'class', 'module'].includes(modelName)) {
3026
let [version] = id.replace(`${projectName}-`, '').split('-');
3127
let revId = this.get('metaStore').getRevId(projectName, version, modelName, id);
32-
url = `json-docs/${projectName}/${version}/${inflector.pluralize(modelName)}/${revId}`;
28+
url = `json-docs/${projectName}/${version}/${pluralize(modelName)}/${revId}`;
3329
} else if (modelName === 'missing') {
3430
let version = this.get('projectService.version');
3531
let revId = this.get('metaStore').getRevId(projectName, version, modelName, id);
36-
url = `json-docs/${projectName}/${version}/${inflector.pluralize(modelName)}/${revId}`;
32+
url = `json-docs/${projectName}/${version}/${pluralize(modelName)}/${revId}`;
3733
} else if (modelName === 'project') {
3834
this.set('currentProject', id);
3935
url = `rev-index/${id}`;

app/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import Ember from 'ember';
1+
import Application from '@ember/application';
22
import Resolver from './resolver';
33
import loadInitializers from 'ember-load-initializers';
44
import config from './config/environment';
55

6-
const App = Ember.Application.extend({
6+
const App = Application.extend({
77
modulePrefix: config.modulePrefix,
88
podModulePrefix: config.podModulePrefix,
99
Resolver

app/components/api-index-filter.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import Ember from 'ember';
2-
import _ from 'lodash';
1+
import { computed } from '@ember/object';
2+
import Component from '@ember/component';
3+
import uniq from 'npm:lodash.uniq';
4+
import sortBy from 'npm:lodash.sortby';
35

4-
const { computed, Component } = Ember;
56

67
export default Component.extend({
78
classNames: ['api-index-filter'],
@@ -47,8 +48,9 @@ export default Component.extend({
4748
if (!this.get('filterData.showDeprecated')) {
4849
items = items.filter(item => item.deprecated !== true);
4950
}
50-
let sortedUniqueItems = _.uniq(_.sortBy(items, 'name'), true, (item => item.name));
51-
return this.filterMultipleInheritance(sortedUniqueItems)
51+
52+
let sortedUniqueItems = uniq(sortBy(items, 'name'), true, (item => item.name));
53+
return this.filterMultipleInheritance(sortedUniqueItems);
5254
},
5355

5456
filteredData: computed('filteredMethods', 'filteredProperties', 'filteredEvents', function() {

app/components/api-index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import Ember from 'ember';
1+
import { computed } from '@ember/object';
2+
import Component from '@ember/component';
23

3-
export default Ember.Component.extend({
4+
export default Component.extend({
45

5-
sections: Ember.computed('itemData.methods', 'itemData.properties', 'itemData.events', function () {
6+
sections: computed('itemData.methods', 'itemData.properties', 'itemData.events', function () {
67
return [
78
{
89
title: 'Methods',

app/components/class-field-description.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import Ember from 'ember';
2-
3-
const { Component } = Ember;
1+
import Component from '@ember/component';
42

53
export default Component.extend({
64

app/components/ember-anchor.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1+
import $ from 'jquery';
2+
import { get } from '@ember/object';
13
import AnchorComponent from 'ember-anchor/components/ember-anchor';
2-
import Ember from 'ember';
34
import config from 'ember-api-docs/config/environment';
45

5-
const { $, get } = Ember;
6-
76
export default AnchorComponent.extend({
87

98
// This overrides Ember Anchor to support scrolling within a fixed position element

app/components/loading-spinner.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Ember from 'ember';
1+
import Component from '@ember/component';
22

3-
export default Ember.Component.extend({
3+
export default Component.extend({
44
classNames: ['loading-spinner']
55
});

app/components/main-footer.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import Ember from 'ember';
1+
import { computed } from '@ember/object';
2+
import Component from '@ember/component';
23

3-
export default Ember.Component.extend({
4+
export default Component.extend({
45

56
tagName: '',
67

7-
currentYear: Ember.computed(function() {
8+
currentYear: computed(function() {
89
return new Date().getUTCFullYear();
910
})
1011

app/components/search-input.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
1-
import Ember from 'ember';
1+
import { later } from '@ember/runloop';
2+
import { denodeify } from 'rsvp';
3+
import { A } from '@ember/array';
4+
import { alias } from '@ember/object/computed';
5+
import { inject as service } from '@ember/service';
6+
import Component from '@ember/component';
27
import get from 'ember-metal/get';
38
import set from 'ember-metal/set';
4-
import {task, timeout} from 'ember-concurrency';
9+
import { task, timeout } from 'ember-concurrency';
510

611
const SEARCH_DEBOUNCE_PERIOD = 300;
712

8-
export default Ember.Component.extend({
13+
export default Component.extend({
914
// Public API
1015
value: '',
1116

12-
_searchClient: Ember.inject.service('algolia'),
17+
_searchClient: service('algolia'),
1318

1419
// Private API
1520
classNames: ['search-input'],
16-
_projectService: Ember.inject.service('project'),
17-
_projectVersion: Ember.computed.alias('_projectService.standardisedVersion'),
18-
_results: Ember.A(),
21+
_projectService: service('project'),
22+
_projectVersion: alias('_projectService.standardisedVersion'),
23+
_results: A(),
1924
_focused: false,
2025
_resultTetherConstraints: [
2126
{
@@ -47,7 +52,7 @@ export default Ember.Component.extend({
4752
query
4853
};
4954

50-
let searchFn = Ember.RSVP.denodeify(client.search.bind(client));
55+
let searchFn = denodeify(client.search.bind(client));
5156
let res = yield searchFn(searchObj, params);
5257

5358
const results = get(res, 'hits');
@@ -63,7 +68,7 @@ export default Ember.Component.extend({
6368
},
6469

6570
onblur() {
66-
Ember.run.later(this, function () {
71+
later(this, function () {
6772
set(this, '_focused', false);
6873
}, 200);
6974
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Ember from 'ember';
1+
import Component from '@ember/component';
22

3-
export default Ember.Component.extend({
3+
export default Component.extend({
44
classNames: ['ds-suggestion']
55
});
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import Ember from 'ember';
1+
import { gt } from '@ember/object/computed';
2+
import { computed } from '@ember/object';
3+
import Component from '@ember/component';
24

3-
export default Ember.Component.extend({
5+
export default Component.extend({
46
// Public API
57
result: {},
68
role: 'option',
@@ -12,9 +14,9 @@ export default Ember.Component.extend({
1214
attributeBindings: ['role'],
1315

1416
// Left sidebar should only be displayed for the first result in the group
15-
_primaryColumn: Ember.computed('groupPosition,groupName', function () {
17+
_primaryColumn: computed('groupPosition,groupName', function () {
1618
const { groupName, groupPosition } = this.getProperties('groupName', 'groupPosition');
1719
return groupPosition === 0? groupName : '';
1820
}),
19-
isSecondary: Ember.computed.gt('groupPosition', 0)
21+
isSecondary: gt('groupPosition', 0)
2022
});

0 commit comments

Comments
 (0)