lib/spaceship/tunes/tester.rb in spaceship-0.19.3 vs lib/spaceship/tunes/tester.rb in spaceship-0.19.4

- old
+ new

@@ -74,14 +74,14 @@ client.testers(self).map { |tester| self.factory(tester) } end # @return (Spaceship::Tunes::Tester) Returns the tester matching the parameter # as either the Tester id or email - # @param identifier (String) (required): Value used to filter the tester + # @param identifier (String) (required): Value used to filter the tester, case insensitive def find(identifier) all.find do |tester| - (tester.tester_id == identifier.to_s or tester.email == identifier) + (tester.tester_id.to_s.casecmp(identifier.to_s).zero? or tester.email.to_s.casecmp(identifier.to_s).zero?) end end # Create new tester in iTunes Connect # @param email (String) (required): The email of the new tester @@ -109,13 +109,13 @@ end # @return (Spaceship::Tunes::Tester) Returns the tester matching the parameter # as either the Tester id or email # @param app_id (String) (required): The app id to filter the testers - # @param identifier (String) (required): Value used to filter the tester + # @param identifier (String) (required): Value used to filter the tester, case insensitive def find_by_app(app_id, identifier) all_by_app(app_id).find do |tester| - (tester.tester_id == identifier.to_s or tester.email == identifier) + (tester.tester_id.to_s.casecmp(identifier.to_s).zero? or tester.email.to_s.casecmp(identifier.to_s).zero?) end end # Add all testers to the app received # @param app_id (String) (required): The app id to filter the testers