papertrail / papertrail-cli

Command-line client for Papertrail hosted syslog & app log management service
http://papertrailapp.com/
MIT License
427 stars 46 forks source link

Don't bail when existing group/system name partially matches #109

Closed markdascher closed 3 years ago

markdascher commented 3 years ago

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.