Skip to content

Commit 5ebd4bc

Browse files
committed
Merge remote-tracking branch 'upstream/master' into fastboot-log
2 parents b72684b + 1ccd730 commit 5ebd4bc

File tree

37 files changed

+585
-132
lines changed

37 files changed

+585
-132
lines changed

.travis.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,21 @@ env:
1313
- JOBS=1 # See https://git.io/vdao3 for details.
1414
- DATABASE_URL=postgres://postgres:@localhost/cargo_registry_test
1515
- TEST_DATABASE_URL=postgres://postgres:@localhost/cargo_registry_test
16-
- CARGO_TARGET_DIR=target
16+
- CARGO_INCREMENTAL=0
1717
- PERCY_PARALLEL_TOTAL=2
1818
# Percy secrets are included here to enable Percy's GitHub integration
1919
# on community-submitted PRs
2020
- PERCY_TOKEN=0d8707a02b19aebbec79bb0bf302b8d2fa95edb33169cfe41b084289596670b1
2121
- PERCY_PROJECT=crates-io/crates.io
2222
- PGPORT=5433
23+
- PATH=$HOME/.cargo/bin:$PATH
24+
- RUSTFLAGS="-C debuginfo=0"
2325

2426
install:
2527
- sudo cp /etc/postgresql/10/main/pg_hba.conf /etc/postgresql/11/main/pg_hba.conf
2628
- sudo systemctl restart postgresql@11-main
2729
- script/ci/cargo-clean-on-new-rustc-version.sh
28-
- cargo install --force diesel_cli --vers `cat .diesel_version` --no-default-features --features postgres && export PATH=$HOME/.cargo/bin:$PATH
30+
- which diesel || cargo install diesel_cli --vers `cat .diesel_version` --no-default-features --features postgres
2931

3032
before_script:
3133
- diesel database setup --locked-schema

Cargo.lock

+44-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/components/api-token-row.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ export default Component.extend({
77
serverError: null,
88

99
didInsertElement() {
10-
let input = this.element.querySelector('input');
11-
if (input.focus) {
12-
input.focus();
10+
if (this.get('api_token.isNew')) {
11+
this.$('input').focus();
1312
}
1413
},
1514

app/components/crate-row.js

+4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import Component from '@ember/component';
2+
import { computed } from '@ember/object';
23

34
export default Component.extend({
45
classNames: ['crate', 'row'],
6+
crateTomlText: computed('crate.name', 'max_version', function() {
7+
return `${this.get('crate.name')} = "${this.get('crate.max_version')}"`;
8+
}),
59

610
'data-test-crate-row': true,
711
});

app/components/crate-toml-copy.js

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import Component from '@ember/component';
2+
import { later } from '@ember/runloop';
3+
4+
export default Component.extend({
5+
classNames: ['crate-toml-copy'],
6+
copyText: '',
7+
showSuccess: false,
8+
showNotification: false,
9+
toggleClipboardProps(isSuccess) {
10+
this.setProperties({
11+
showSuccess: isSuccess,
12+
showNotification: true,
13+
});
14+
later(
15+
this,
16+
() => {
17+
this.set('showNotification', false);
18+
},
19+
2000,
20+
);
21+
},
22+
actions: {
23+
copySuccess(event) {
24+
event.clearSelection();
25+
this.toggleClipboardProps(true);
26+
},
27+
28+
copyError() {
29+
this.toggleClipboardProps(false);
30+
},
31+
},
32+
});

app/controllers/crate/version.js

+3-24
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import Controller from '@ember/controller';
44
import PromiseProxyMixin from '@ember/object/promise-proxy-mixin';
55
import ArrayProxy from '@ember/array/proxy';
66
import { computed, observer } from '@ember/object';
7-
import { later } from '@ember/runloop';
87
import moment from 'moment';
98

109
const NUM_VERSIONS = 5;
@@ -25,6 +24,9 @@ export default Controller.extend({
2524
fetchingFollowing: true,
2625
following: false,
2726
currentVersion: alias('model'),
27+
crateTomlText: computed('crate.name', 'currentVersion.num', function() {
28+
return `${this.get('crate.name')} = "${this.get('currentVersion.num')}"`;
29+
}),
2830
requestedVersion: null,
2931
keywords: alias('crate.keywords'),
3032
categories: alias('crate.categories'),
@@ -152,30 +154,7 @@ export default Controller.extend({
152154
return data;
153155
}),
154156

155-
toggleClipboardProps(isSuccess) {
156-
this.setProperties({
157-
showSuccess: isSuccess,
158-
showNotification: true,
159-
});
160-
later(
161-
this,
162-
() => {
163-
this.set('showNotification', false);
164-
},
165-
2000,
166-
);
167-
},
168-
169157
actions: {
170-
copySuccess(event) {
171-
event.clearSelection();
172-
this.toggleClipboardProps(true);
173-
},
174-
175-
copyError() {
176-
this.toggleClipboardProps(false);
177-
},
178-
179158
toggleFollow() {
180159
this.set('fetchingFollowing', true);
181160

app/routes/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default Route.extend({
1414
},
1515

1616
setupController(controller) {
17+
this.controllerFor('application').set('searchQuery', null);
1718
controller.dataTask.perform();
1819
},
1920
});

app/routes/search.js

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default Route.extend({
1414
},
1515

1616
setupController(controller, params) {
17+
this.controllerFor('application').set('searchQuery', params.q);
1718
controller.dataTask.perform(params);
1819
},
1920
});

0 commit comments

Comments
 (0)