Replies: 5 comments 2 replies
-
I would love help with setting up rubocop, although it seems to dislike some of my coding styles (vertically aligned I tried to pack as much into the README as possible. The API links allow new users to see all of the functionality and see brief examples in the documentation. Then there are copy/pasteable examples to show off syntax; in addition to runnable examples in the |
Beta Was this translation helpful? Give feedback.
-
Re: rubocop. Happy to take a stab at it if you think it would be worthwhile. I'm totally agnostic on config, I just like to avoid manual formatting. My personal style is pretty different from the rubocop defaults. Usually I end up turning off half the rules anyway... Occasionally it finds real issues, which is nice. Most of my projects have a Re: README. I think the current README is pretty good. I can think of a few improvements we might make:
I don't want to overwhelm you in here. 😄 Give me a quick yea or nay on these guys and I'll create issues. We can tackle them one at a time and I'll give you PRs to check out. Oh, and I should warn you that I've never used rspec. I'm an experienced Ruby dev but I've always used minitest. I'll do my best, tho 😄 |
Beta Was this translation helpful? Give feedback.
-
unless exec('apt-get install xyz')
abort "Failed to install xyz"
end vs. begin
install_pkgs('xyz')
rescue ExecError => error
abort error.message
end Originally, I started copy/pasting every example into the README, however it started getting super long. Maybe we could copy/paste the top-level summaries and example from each module's documentation into the README, and add a Table of Contents with All good suggestions. I'd say robucop, adding background colors to |
Beta Was this translation helpful? Give feedback.
-
I created issue #35 for background color support. |
Beta Was this translation helpful? Give feedback.
-
command_kit looks neat and qualitative but seems to miss some common features for me to replace docopt:
Also even something not strictly argument parsing but highly related, do you plan to support automatic shell completion generation? Like docopt-compgen for docopt or dry-cli-completion for dry-cli but natively supported. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, command_kit is neat! Thanks for creating. I've been kicking the tires a bit this afternoon...
I've built some similar stuff myself, mostly for internal use, and I'd love to move over to command_kit. Looking for help? There are a few features that I'd be happy to work on if you are interested:
csv_read
method that returns an array of Structs and acsv_write
method that outputs an array of hash-like objects (Struct, OpenStruct, hash). This isn't intended to support all csv use cases, but helps tremendously when dealing with common CSVs.banner
prints a timestamped line of text with a green background (see screenshot below).fatal
is like banner but uses a red background and callsexit(1)
. I also have one calledwarning
that uses a yellow background. Skip the color if $stdout isn't a tty.exec
method for running commands and raising exceptions in a unified way. Basicallysystem(..., exception: true)
. It's also nice to have anexec_capture
variant that returns captured output. My old implementation uses backticks and does the shell escaping manually. Might be easier to usepopen
.Also happy to help with the README, setting up linting/formatting/rubocop (if you want), etc.
What do you think?
banner('hello world')
Beta Was this translation helpful? Give feedback.
All reactions