Conversation
| gem 'rspec-retry' | ||
| gem 'rspec_junit_formatter' | ||
| gem 'shoulda-matchers', '~> 4.0', require: false | ||
| gem 'tableparser', require: false |
There was a problem hiding this comment.
In the specs, I wanted to be able to parse the Terminal::Table output, and as far as I could tell, that gem doesn't have any parsing.
I happened to have my own smol gem (https://github.com/zachmargolis/tableparser) that does this, so I opted to use it here. Open to removing if anybody feels strongly!
It's a pretty limited gem, I YARD doc'ed it as best I could
There was a problem hiding this comment.
I like the idea of using something one of us "owns" rather than introducing a 3rd-party dependency... no objection here.
| # @api private | ||
| # A subtask is a class that has a run method, the type signature should look like: | ||
| # +#run(args: Array<String>, include_missing: Boolean) -> Result+ | ||
| # @return [Class,nil] | ||
| def subtask(name) | ||
| { | ||
| 'uuid-lookup' => UuidLookup, | ||
| 'uuid-convert' => UuidConvert, | ||
| 'email-lookup' => EmailLookup, | ||
| 'profile-status' => ProfileStatus, | ||
| }[name] | ||
| end |
There was a problem hiding this comment.
I feel like having these all in the same file is fine for now? Open to feedback if others feel differently
changelog: Internal, Tooling, Add script to streamline data pulls
- Add required --reason arg - Add subtask specs
|
This is ready for review now! |
| gem 'rspec-retry' | ||
| gem 'rspec_junit_formatter' | ||
| gem 'shoulda-matchers', '~> 4.0', require: false | ||
| gem 'tableparser', require: false |
There was a problem hiding this comment.
I like the idea of using something one of us "owns" rather than introducing a 3rd-party dependency... no objection here.
🎫 Ticket
See RFC for Data Pull Script
🛠 Summary of changes
Adds a new
./bin/data-pullexecutable with a few subtasks, this is intended for batch-compatible, human- and machine-friendly output.I know that the RFC is still being reviewed, but I had some time and energy, so I just went for it.
📝
Still left to do:
profile-lookup(or remove entirely and implement in a future PR)--reasonflag