Skip to content

Commit

Permalink
Merge branch 'master' into enable-fastboot-2
Browse files Browse the repository at this point in the history
  • Loading branch information
kzys authored Oct 24, 2019
2 parents ebff9fe + 68a77de commit c9b0204
Show file tree
Hide file tree
Showing 55 changed files with 3,048 additions and 1,017 deletions.
90 changes: 83 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ tar = "0.4.16"
base64 = "0.9"

openssl = "0.10.13"
oauth2 = "0.3"
oauth2 = "2.0.0"
log = "0.4"
env_logger = "0.5"
hex = "0.3"
Expand Down Expand Up @@ -83,12 +83,14 @@ tokio = "0.1"
hyper = "0.12"
ctrlc = { version = "3.0", features = ["termination"] }
indexmap = "1.0.2"
handlebars = "2.0.1"

[dev-dependencies]
conduit-test = "0.8"
hyper-tls = "0.3"
lazy_static = "1.0"
tokio-core = "0.1"
diesel_migrations = { version = "1.3.0", features = ["postgres"] }

[build-dependencies]
dotenv = "0.11"
Expand Down
2 changes: 1 addition & 1 deletion RustConfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION=1.33.0
VERSION=1.38.0
8 changes: 8 additions & 0 deletions app/components/crate-readme.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,13 @@ export default Component.extend({
this.$('pre > code').each(function() {
window.Prism.highlightElement(this);
});
this.scrollToFragment();
},

scrollToFragment() {
if (location.hash) {
let anchor_id = location.hash.substr(1);
document.getElementById(anchor_id).scrollIntoView();
}
},
});
4 changes: 2 additions & 2 deletions app/components/email-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ export default Component.extend({
await ajax(`/api/v1/users/${user.id}/resend`, { method: 'PUT' });
this.set('disableResend', true);
} catch (error) {
if (error.payload) {
if (error.errors) {
this.set('isError', true);
this.set('emailError', `Error in resending message: ${error.payload.errors[0].detail}`);
this.set('emailError', `Error in resending message: ${error.errors[0].detail}`);
} else {
this.set('isError', true);
this.set('emailError', 'Unknown error in resending message');
Expand Down
8 changes: 4 additions & 4 deletions app/components/pending-owner-invite-row.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export default Component.extend({
this.set('isAccepted', true);
} catch (error) {
this.set('isError', true);
if (error.payload) {
this.set('inviteError', `Error in accepting invite: ${error.payload.errors[0].detail}`);
if (error.errors) {
this.set('inviteError', `Error in accepting invite: ${error.errors[0].detail}`);
} else {
this.set('inviteError', 'Error in accepting invite');
}
Expand All @@ -31,8 +31,8 @@ export default Component.extend({
this.set('isDeclined', true);
} catch (error) {
this.set('isError', true);
if (error.payload) {
this.set('inviteError', `Error in declining invite: ${error.payload.errors[0].detail}`);
if (error.errors) {
this.set('inviteError', `Error in declining invite: ${error.errors[0].detail}`);
} else {
this.set('inviteError', 'Error in declining invite');
}
Expand Down
8 changes: 4 additions & 4 deletions app/controllers/crate/owners.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export default Controller.extend({
await this.crate.inviteOwner(username);
this.set('invited', `An invite has been sent to ${username}`);
} catch (error) {
if (error.payload) {
this.set('error', `Error sending invite: ${error.payload.errors[0].detail}`);
if (error.errors) {
this.set('error', `Error sending invite: ${error.errors[0].detail}`);
} else {
this.set('error', 'Error sending invite');
}
Expand All @@ -40,8 +40,8 @@ export default Controller.extend({

this.get('crate.owner_user').removeObject(user);
} catch (error) {
if (error.payload) {
this.set('removed', `Error removing owner: ${error.payload.errors[0].detail}`);
if (error.errors) {
this.set('removed', `Error removing owner: ${error.errors[0].detail}`);
} else {
this.set('removed', 'Error removing owner');
}
Expand Down
1 change: 1 addition & 0 deletions app/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Router.map(function() {
this.route('category-slugs', { path: 'category_slugs' });
this.route('team', { path: '/teams/:team_id' });
this.route('policies');
this.route('data-access');
this.route('confirm', { path: '/confirm/:email_token' });

this.route('catch-all', { path: '*path' });
Expand Down
4 changes: 2 additions & 2 deletions app/routes/confirm.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export default Route.extend({
});
}
} catch (error) {
if (error.payload) {
this.flashMessages.queue(`Error in email confirmation: ${error.payload.errors[0].detail}`);
if (error.errors) {
this.flashMessages.queue(`Error in email confirmation: ${error.errors[0].detail}`);
return this.replaceWith('index');
} else {
this.flashMessages.queue(`Unknown error in email confirmation`);
Expand Down
Loading

0 comments on commit c9b0204

Please sign in to comment.