diff --git a/packages/ruby/lib/readme/metrics.rb b/packages/ruby/lib/readme/metrics.rb index 831a9824f5..159b47bd84 100644 --- a/packages/ruby/lib/readme/metrics.rb +++ b/packages/ruby/lib/readme/metrics.rb @@ -28,8 +28,6 @@ def self.platform PLATFORM = platform DEFAULT_BUFFER_LENGTH = 1 ENDPOINT = "https://metrics.readme.io/v1/request" - USER_INFO_KEYS = [:api_key, :label, :email] - USER_INFO_KEYS_DEPRECATED = [:id, :label, :email] def self.logger @@logger @@ -148,11 +146,9 @@ def is_a_boolean?(arg) end def user_info_valid?(user_info) - sorted_user_info_keys = user_info.keys.sort !user_info.nil? && !user_info.values.any?(&:nil?) && - (sorted_user_info_keys === USER_INFO_KEYS.sort || - sorted_user_info_keys === USER_INFO_KEYS_DEPRECATED.sort) + user_info.has_key?(:api_key) || user_info.has_key?(:id) end end end