module Aua::Agents::ApiClients
Constants
- KNOWN_CLIENTS
- PATTERN_GERMAN_SYSTEM_PREFS
- PATTERN_SYSTEM_UI_SEVER
- PATTERN_YAHOO_PIPES
Public Class Methods
extend?(agent)
click to toggle source
# File lib/aua/agents/api_clients.rb, line 4 def self.extend?(agent) KNOWN_CLIENTS.include?(agent.app) || agent.raw =~ PATTERN_YAHOO_PIPES || agent.app =~ PATTERN_GERMAN_SYSTEM_PREFS || agent.app =~ PATTERN_SYSTEM_UI_SEVER end
Public Instance Methods
name()
click to toggle source
# File lib/aua/agents/api_clients.rb, line 19 def name @name ||= begin if raw =~ PATTERN_YAHOO_PIPES :YahooPipes elsif app == "PEAR" || app == "HTTP_Request2" :PearPHPHttpRequest elsif app == "NativeHost" :CappucinosNativeHost elsif app =~ PATTERN_GERMAN_SYSTEM_PREFS :SystemPreferences elsif app =~ PATTERN_SYSTEM_UI_SEVER :SystemUIServer elsif app == "Twisted" :PythonTwistedPageGetter else app.to_sym end end end
type()
click to toggle source
# File lib/aua/agents/api_clients.rb, line 15 def type :ApiClient end
version()
click to toggle source
# File lib/aua/agents/api_clients.rb, line 39 def version @version ||= begin return $1 if raw =~ /^Yahoo Pipes ([\d\.]+)$/ return comments.first[1] if name == :"AppEngine-Google" && comments.first[1] versions.first end end