Support named task arguments
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 2.5k
- Forks
- 650
- Avg merge
- 6m
- Merged PRs (30d)
- 3
Description
When creating tasks that take multiple optional arguments, specifying parameters becomes tedious.
When calling the following task
task :test, [:database, :table, :column, :host, :port, :user, :password] do
# Something
end
and specifying only parameter user, I have to count its position and call rake as follows:
rake 'test[,,,,,testuser,]'
I suggest supporting a syntax using named parameters that makes calling these tasks easier and more readable, e.g.
rake 'test{user:testuser}'
I'd like to put this up for discussion, if it is acceptable, I'm willing to create a pull request.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by locating task argument parsing and invocation handling, then determine whether named arguments such as rake 'test{user:testuser}' can be supported without breaking positional syntax; done means the proposed form works for optional parameters and is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- build-system, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100