Move all actions to CB::Action
module.
#46
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andTokenAction
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
vsAction
... and I tried both. I ultimately landed onCB::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 amodule 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 thescope.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.