Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update XML schema

  • Loading branch information...
commit 578811bf83310f9c2ac774d45457f5093b2dadd7 1 parent 4530e3c
@shime shime authored
View
2  lib/airbrake.rb
@@ -20,7 +20,7 @@
require 'airbrake/railtie' if defined?(Rails::Railtie)
module Airbrake
- API_VERSION = "2.2"
+ API_VERSION = "2.3"
LOG_PREFIX = "** [Airbrake] "
HEADERS = {
View
2  lib/airbrake/notice.rb
@@ -179,7 +179,7 @@ def to_xml
env.tag!("environment-name", environment_name)
env.tag!("hostname", hostname)
end
- if user
+ unless user.blank?
notice.tag!("current-user") do |u|
u.tag!("id",user[:id])
u.tag!("name",user[:name])
View
12 test/airbrake_2_2.xsd → test/airbrake_2_3.xsd
@@ -9,6 +9,7 @@
<xs:element name="error" type="error"/>
<xs:element name="request" type="request" minOccurs="0"/>
<xs:element name="server-environment" type="serverEnvironment"/>
+ <xs:element name="current-user" type="current-user" minOccurs="0"/>
</xs:all>
<xs:attribute name="version" type="xs:string" use="required"/>
</xs:complexType>
@@ -32,7 +33,7 @@
<xs:complexType name="backtrace">
<xs:sequence>
- <xs:element name="line" maxOccurs="unbounded">
+ <xs:element name="line" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:attribute name="file" type="xs:string" use="required"/>
<xs:attribute name="number" type="xs:string" use="required"/>
@@ -75,4 +76,13 @@
</xs:sequence>
</xs:complexType>
+ <xs:complexType name="current-user">
+ <xs:all>
+ <xs:element name="id" type="xs:string"/>
+ <xs:element name="name" type="xs:string" minOccurs="0"/>
+ <xs:element name="email" type="xs:string" minOccurs="0"/>
+ <xs:element name="username" type="xs:string" minOccurs="0"/>
+ </xs:all>
+ </xs:complexType>
+
</xs:schema>
Please sign in to comment.
Something went wrong with that request. Please try again.