Currently, running papertrail-add-group -g 'My Group' fails if there's already a group called My Group A, or anything else that partially matches the new name. This PR updates the logic to require an exact (but still case-insensitive) match before bailing.
Using .upcase for the comparisons since that seems to have the best compatibility with various Ruby versions, while getting automatic Unicode support in Ruby 2.4+. Tested both papertrail-add-group and papertrail-add-system locally to confirm the bug is fixed.
Currently, running
papertrail-add-group -g 'My Group'
fails if there's already a group calledMy Group A
, or anything else that partially matches the new name. This PR updates the logic to require an exact (but still case-insensitive) match before bailing.Using
.upcase
for the comparisons since that seems to have the best compatibility with various Ruby versions, while getting automatic Unicode support in Ruby 2.4+. Tested bothpapertrail-add-group
andpapertrail-add-system
locally to confirm the bug is fixed.