Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement teams command refs: #55317 #11

Merged
merged 1 commit into from
Oct 5, 2020

Conversation

TheWalkingLeek
Copy link
Member

No description provided.

@TheWalkingLeek TheWalkingLeek changed the title Implement teams commandm refs: #55317 Implement teams command refs: #55317 Sep 24, 2020
Copy link
Contributor

@mtnstar mtnstar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love it 😻

some minor things to take account of

lib/cli.rb Outdated
require_relative 'adapters/ose_adapter'
require_relative 'models/account'
require_relative 'models/team'
require_relative 'models/ose_secret'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id: data[:id])
end

def render_list(team)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't #render_list belong to team model ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm it does. But in the model, I simply delegate to this method. This way, you can easily call the method on your instance and the logic is inside the serializer. Do you think that's an unecessary delegation?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just think this has really nothing to do with the serializer, does it? the serializer is responsible for converting json to data and versa. whereas #render_list renders a list of folders.
In my opinion, this belongs more to the model in your case. Probably it would belong to a view layer. maybe introduce for example presenters and move it over there ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from wikipedia: The presenter acts upon the model and the view. It retrieves data from repositories (the model), and formats it for display in the view.

@TheWalkingLeek TheWalkingLeek force-pushed the feature-55317-teams-command branch 5 times, most recently from eeadb8e to 122de50 Compare October 5, 2020 09:16
@TheWalkingLeek TheWalkingLeek merged commit bd237b4 into master Oct 5, 2020
@TheWalkingLeek TheWalkingLeek deleted the feature-55317-teams-command branch October 5, 2020 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants