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

MushroomObserver / mushroom-observer / 28882362678

07 Jul 2026 04:32PM UTC coverage: 99.048% (-0.06%) from 99.103%
28882362678

Pull #4719

github

JoeCohen
Fix handling of licensed param in URL

- Fixes superimporter "import others" confirm counts and unlicensed-obs handling

The confirm page miscounted Requested/Expected/Already-imported when a superimporter's URL filtered on `licensed=false`, and unlicensed observations were misclassified as "already imported" instead of their own category.

- `URLNormalizer` no longer strips `licensed` from the URL, so estimates reflect the user's actual request.
- `Estimators` adds `not_yet_imported`/`licensed_explicitly_false?` so Expected/Total Ignored short-circuit correctly instead of querying an unrelated population.
- `PageParser#add_ownership_filter` now defaults `licensed:true` instead of always overriding it.
- `ObservationImporter#unlicensed_other?` is the real safety net: for import-others, an obs with no iNat license is skipped entirely (new `ignored_unlicensed_count`), while individual unlicensed photos on an otherwise-licensed obs are still skipped per-image as before.
- Confirm page moves the unlicensed count into the Ignored Observations breakdown for import-others.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Pull Request #4719: Fix handling of licensed param in URL

42 of 42 new or added lines in 8 files covered. (100.0%)

29 existing lines in 11 files now uncovered.

51710 of 52207 relevant lines covered (99.05%)

754.76 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

86.67
/app/classes/api2/error/error.rb
1
# frozen_string_literal: true
2

3
class API2
4✔
4
  # API exception base class.
5
  class Error < ::StandardError
4✔
6
    attr_accessor :tag, :args, :fatal, :trace
4✔
7

8
    def initialize
4✔
9
      super
403✔
10
      self.tag = self.class.name.underscore.tr("/", "_").
403✔
11
                 sub(/^api\d+/, "api").to_sym
12
      self.args = {}
403✔
13
      self.fatal = false
403✔
14
      self.trace = caller
403✔
15
    end
16

17
    def inspect
4✔
UNCOV
18
      "#{self.class.name}(:#{tag}#{args.inspect})"
×
19
    end
20

21
    def to_s
4✔
22
      tag.l(args)
114✔
23
    end
24

25
    def t
4✔
UNCOV
26
      tag.t(args)
×
27
    end
28
  end
29
end
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