Skip to content

Conversation

@abrightwell
Copy link
Member

@abrightwell abrightwell commented Jun 14, 2022

This is not a functional change. Here we're only seeking to organize the
code a little bit further now that the action list has grown quite
extensively.

The impetus for this was originally stated as a comment in #45 about how we had a name conflict between Token and TokenAction and wanting to maybe clean that up a little.

Candidly, I'm not sure how I feel about this one overall. I do think that giving actions their own module is a good thing, however, I'm less confident in how I've accomplished that here. More specifically, I toyed with the idea of CB::Action vs Action... and I tried both. I ultimately landed on CB::Action as it just felt a little better to me. However, I have no strong opinion here.

The other thing I did was I went through and move all the of the CB::Action::<name> declarations under a module CB::Action block. That resulted in a lot of 'files' appearing as changed given that it formatted them differently. However, the above is the only real change to these files.

I also opted to move the actions to their own directory. I don't think this is the final form as I wasn't certain what to do with the scope_checks directory. Seems like it might be appropriate to move it along with the scope.cr file. Also, dirs.cr I was a little on the fence about, but felt it was best left where it was for now.

At any rate, this is just an initial swing at this but accepted that it could potentially use some polish and it might not be the only swing at it.

This is not a functional change. Here we're only seeking to organize the
code a little bit further now that the action list has grown quite
extensively.
@abrightwell abrightwell requested a review from will June 14, 2022 15:10

private def make_ba
CB::BackupCapture.new(BackupTestClient.new(TEST_TOKEN))
CB::Action::BackupCapture.new(BackupTestClient.new(TEST_TOKEN))
Copy link
Collaborator

Choose a reason for hiding this comment

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

One thing that might be worth trying, is if we include CB::Action once at the top of a spec, then I think everywhere in that file we can just have BackupCapture. It might cut down on a lot of the extra scoping and be okay enough for a given file at a time?

@will
Copy link
Collaborator

will commented Jun 15, 2022

I like grouping them in the directory for sure

@abrightwell abrightwell requested a review from a team as a code owner January 23, 2024 13:24
@abrightwell abrightwell force-pushed the main branch 2 times, most recently from fe69c4e to 8805c40 Compare April 3, 2025 23:20
@sfc-gh-abrightwell sfc-gh-abrightwell force-pushed the main branch 2 times, most recently from 6391d23 to 5ca9fcf Compare October 30, 2025 15:23
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.

3 participants