lib/frenetic/configuration.rb in frenetic-0.0.20.alpha.2 vs lib/frenetic/configuration.rb in frenetic-0.0.20.alpha.3

- old
+ new

@@ -51,10 +51,16 @@ def default_root_cache_age @_cfg[:default_root_cache_age] end def headers - @@defaults[:headers].merge( @_cfg[:headers] || {} ) + @@defaults[:headers].merge( @_cfg[:headers] || {} ).tap do |h| + if @_cfg[:headers] && @_cfg[:headers][:user_agent] + if h[:user_agent] != @@defaults[:headers][:user_agent] + h[:user_agent] = "#{h[:user_agent]} (#{@@defaults[:headers][:user_agent]})" + end + end + end end def password @_cfg[:password] || @_cfg[:api_key] end \ No newline at end of file