• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MushroomObserver / mushroom-observer / 26632086327
97%
main: 97%

Build:
Build:
LAST BUILD BRANCH: nimmo-account-preferences-phlex
DEFAULT BRANCH: main
Ran 29 May 2026 10:31AM UTC
Jobs 1
Files 1036
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 May 2026 10:26AM UTC coverage: 96.507% (-0.001%) from 96.508%
26632086327

Pull #4391

github

nimmolo
Location.dubious_reasons_for: collapse 6-site duplicate pattern

Adds Location.dubious_reasons_for(user:, place_name:, approved:) that
encapsulates the user_format + dubious_name?(true) pattern that lived
as 2-3 lines in 4 controllers across 6 call sites:

  - locations_controller#new (no approved gate)
  - locations_controller#create_location_ivar_and_save
    (approved: @approved_name)
  - locations_controller#determine_and_check_location
    (approved: params[:approved_where])
  - species_lists_controller#validate_place_name
    (approved gate already in the surrounding pre-check;
    helper called with approved: nil)
  - species_lists/write_in_controller#validate_place_name
    (approved: params[:approved_where])
  - observations_controller/validators#validate_place_name
    (no approved gate)

The helper always returns an Array, normalizing any defensive falsy
result from dubious_name? to [] so callers can use .empty? without
nil-checks.

Drops the now-unused db_name parameter from
create_location_ivar_and_save / update_location_change /
determine_and_check_location and their internal callers in
locations_controller -- db_name is still computed at the top of
#create and #update for the find_by_name_or_reverse_name lookup,
just no longer plumbed into the dubious-name path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pull Request #4391: Location.dubious_reasons_for: collapse 6-site duplicate pattern

16 of 16 new or added lines in 5 files covered. (100.0%)

39511 of 40941 relevant lines covered (96.51%)

673.49 hits per line

Jobs
ID Job ID Ran Files Coverage
1 26632086327.1 29 May 2026 10:31AM UTC 1036
96.51
GitHub Action Run
Source Files on build 26632086327
  • Tree
  • List 1036
  • Changed 5
  • Source Changed 5
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26632086327
  • Pull Request #4391
  • PR Base - main (#26631317870)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc