Skip to content

Commit

Permalink
Release 2.0.0 (#172)
Browse files Browse the repository at this point in the history
* Update to latest version of fiberplane-rs

* Bump version to 1.0.0

* Add support for members

Add role to output

Bump machine to bigger node
  • Loading branch information
hatchan authored Nov 14, 2022
1 parent 0c3e9b0 commit 9abb295
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-8-cores
steps:
- uses: actions/checkout@v2

Expand Down
16 changes: 8 additions & 8 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fp"
version = "0.14.0"
version = "2.0.0"
authors = ["Team Fiberplane"]
edition = "2018"
build = "build.rs"
Expand Down
14 changes: 9 additions & 5 deletions src/workspaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use fp_api_client::apis::default_api::{
workspace_user_update, workspace_users_list,
};
use fp_api_client::models::{
NewWorkspace, NewWorkspaceInvite, SelectedDataSource, UpdateWorkspace, User, Workspace,
Membership, NewWorkspace, NewWorkspaceInvite, SelectedDataSource, UpdateWorkspace, Workspace,
WorkspaceInvite, WorkspaceInviteResponse, WorkspaceUserUpdate,
};
use std::collections::HashMap;
Expand Down Expand Up @@ -433,7 +433,7 @@ async fn handle_user_list(args: UserListArgs) -> Result<()> {

match args.output {
UserListOutput::Table => {
let rows: Vec<UserRow> = users.into_iter().map(Into::into).collect();
let rows: Vec<MembershipRow> = users.into_iter().map(Into::into).collect();
output_list(rows)
}
UserListOutput::Json => output_json(&users),
Expand Down Expand Up @@ -933,7 +933,7 @@ impl From<(String, SelectedDataSource)> for SelectedDataSourceRow {
}

#[derive(Table)]
struct UserRow {
struct MembershipRow {
#[table(title = "ID")]
pub id: String,

Expand All @@ -942,14 +942,18 @@ struct UserRow {

#[table(title = "Email")]
pub email: String,

#[table(title = "Role")]
pub role: String,
}

impl From<User> for UserRow {
fn from(user: User) -> Self {
impl From<Membership> for MembershipRow {
fn from(user: Membership) -> Self {
Self {
id: user.id,
name: user.name,
email: user.email.unwrap_or_else(|| "unknown".to_string()),
role: user.role.to_string(),
}
}
}
Expand Down

0 comments on commit 9abb295

Please sign in to comment.