technicalpickles / technicalpickles/homesick

Use file/git libraries instead of always shelling out

Open
#74 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

refactoring
Dominant language
Ruby
Stars
2.5k
Forks
128
PR merge metrics
No merged PRs in 30d

Description

Advantages

  • Shelling out takes a while, and you can get major performance and stability boosts with the right libraries.
  • We could save time writing ruby wrappers around command line functionality by using an existing library.
  • The code would be a bit less bloated with generalized file/git/etc. code placed somewhere else.
  • Many Ruby libraries give comfortable object-oriented interfaces to existing command line functionality.

File stuff

Ruby has a lot of awesome command-line-inspired libraries built in, including FileUtils, which could easily replace many calls to commands like mv, cp, rm, and ln.

Git stuff

Grit looks pretty awesome, as it's what GitHub uses internally. See Supercharged Ruby-Git.
Grit is deprecated, and its readme recommends switching to Rugged.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Ruby code that shells out for file and Git operations, then compare those uses with FileUtils and Rugged. Done means the relevant shell-outs have been replaced where appropriate without changing homesick's behavior, with tests covering the affected operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, ruby
Domain
cli, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.