markbates / markbates/cover_me

Fails to write coverage report when there is a space in the project path

Open
#48 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
203
Forks
17
PR merge metrics
No merged PRs in 30d

Description

If you have a rails app in a path such as ~/Projects/My Project/myapp it appears that the cover_me gem is not able to create the coverage folder, and thus can't create the coverage report. There is no error at any point during the bundle install process or rails g cover_me:install process that would allude to this problem except for a non-fatal error at the end of a rake spec run.

The files /Users/chrisbloom7/Projects/My and /Users/chrisbloom7/Projects/My Project/myapp/Project/myapp/coverage/index.html do not exist.

Notice the how the first path in the error is truncated while the second path is duplicated.

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

Reproduce this with a Rails app whose path contains spaces, then run rails g cover_me:install and rake spec. Trace how the coverage report paths are assembled from the project path and compare the malformed paths in the error. Done means the coverage folder and coverage/index.html are created at the correct location without truncation or duplication.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
testing, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.