A means to add an extension
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 32
- Forks
- 24
- Avg merge
- 13h 2m
- Merged PRs (30d)
- 1
Description
I often need to add an extension (be it .tmp or .bak for example).
Writing path.sub_ext("#{path.extname}.tmp") is weird. Likewise for path.sub(/\z/, '.tmp'). And unfortunately + and / have exactly the same semantics, so I can't use that either.
I wish I had add_ext.
Cheers!
Contributor guide
No contributing guide indexed for this repository
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
Review Pathname's existing sub_ext and extname behavior first, using the examples in the issue as the starting cases. Define how add_ext should handle extensions such as .tmp and .bak, then verify that the new method produces the requested paths without changing existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100