rspec_junit_formatter 0.3.0.pre3 → 0.3.0.pre4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rspec_junit_formatter.rb +39 -26
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3eb5f0c15526709a1aef2fea35ce933a11045ec7
|
4
|
+
data.tar.gz: 13b8780f9599c9638e835898f9fe782f697504b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e38320e1ec585d37c36ca6df2671c3294d3732cadb6058252e47843b2da85ff1d5d164a2280ccab6c5c84516f0765f568612c20f944ae487583e4ff09cb4109
|
7
|
+
data.tar.gz: b3cf45e4adaac3b06cb28281d195397929808950ab46c5ffc5c78377c9ebe8ef452f52b310c58f908f54216b10f2a620ce7539ff17311eaaaa84c918163d19f1
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -70,39 +70,53 @@ private
|
|
70
70
|
output << %{</testcase>\n}
|
71
71
|
end
|
72
72
|
|
73
|
-
#
|
74
|
-
|
75
|
-
#
|
76
|
-
# See https://www.w3.org/TR/xml/#dt-chardata
|
77
|
-
ESCAPE_REGEXP = Regexp.new(
|
73
|
+
# Inversion of character range from https://www.w3.org/TR/xml/#charsets
|
74
|
+
ILLEGAL_REGEXP = Regexp.new(
|
78
75
|
"[^" <<
|
79
76
|
"\u{9}" << # => \t
|
80
77
|
"\u{a}" << # =>\n
|
81
78
|
"\u{d}" << # => \r
|
82
|
-
"\u{20}-\u{
|
83
|
-
# "\u{22}" << # => "
|
84
|
-
"\u{23}-\u{25}" <<
|
85
|
-
# "\u{26}" << # => &
|
86
|
-
# "\u{27}" << # => '
|
79
|
+
"\u{20}-\u{d7ff}" <<
|
87
80
|
"\u{28}-\u{3b}" <<
|
88
|
-
# "\u{3c}" << # => <
|
89
81
|
"\u{3d}" <<
|
90
|
-
|
91
|
-
"\u{
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
"
|
99
|
-
|
100
|
-
|
82
|
+
"\u{e000}-\u{fffd}" <<
|
83
|
+
"\u{10000}-\u{10ffff}" <<
|
84
|
+
"]"
|
85
|
+
)
|
86
|
+
|
87
|
+
# Discouraged characters from https://www.w3.org/TR/xml/#charsets
|
88
|
+
# Plus special characters with well-known entity replacements
|
89
|
+
ESCAPE_REGEXP = Regexp.new(
|
90
|
+
"[" <<
|
91
|
+
"\u{22}" << # => "
|
92
|
+
"\u{26}" << # => &
|
93
|
+
"\u{27}" << # => '
|
94
|
+
"\u{3c}" << # => <
|
95
|
+
"\u{3e}" << # => >
|
96
|
+
"\u{7f}-\u{84}" <<
|
97
|
+
"\u{86}-\u{9f}" <<
|
98
|
+
"\u{fdd0}-\u{fdef}" <<
|
99
|
+
"\u{1fffe}-\u{1ffff}" <<
|
100
|
+
"\u{2fffe}-\u{2ffff}" <<
|
101
|
+
"\u{3fffe}-\u{3ffff}" <<
|
102
|
+
"\u{4fffe}-\u{4ffff}" <<
|
103
|
+
"\u{5fffe}-\u{5ffff}" <<
|
104
|
+
"\u{6fffe}-\u{6ffff}" <<
|
105
|
+
"\u{7fffe}-\u{7ffff}" <<
|
106
|
+
"\u{8fffe}-\u{8ffff}" <<
|
107
|
+
"\u{9fffe}-\u{9ffff}" <<
|
108
|
+
"\u{afffe}-\u{affff}" <<
|
109
|
+
"\u{bfffe}-\u{bffff}" <<
|
110
|
+
"\u{cfffe}-\u{cffff}" <<
|
111
|
+
"\u{dfffe}-\u{dffff}" <<
|
112
|
+
"\u{efffe}-\u{effff}" <<
|
113
|
+
"\u{ffffe}-\u{fffff}" <<
|
114
|
+
"\u{10fffe}-\u{10ffff}" <<
|
101
115
|
"]"
|
102
116
|
)
|
103
117
|
|
104
118
|
# Translate well-known entities, or use generic unicode hex entity
|
105
|
-
|
119
|
+
ESCAPE_REPLACEMENTS = Hash.new { |_, c| "&#x#{c.ord.to_s(16)};".freeze }.update(
|
106
120
|
?" => """.freeze,
|
107
121
|
?& => "&".freeze,
|
108
122
|
?' => "'".freeze,
|
@@ -111,9 +125,8 @@ private
|
|
111
125
|
).freeze
|
112
126
|
|
113
127
|
def escape(text)
|
114
|
-
# Make sure it's utf-8
|
115
|
-
|
116
|
-
text.to_s.encode(Encoding::UTF_8).gsub(ESCAPE_REGEXP, ESCAPE_ENTITY)
|
128
|
+
# Make sure it's utf-8, omit illegal characters, and replace special and discouraged characters with entities
|
129
|
+
text.to_s.encode(Encoding::UTF_8).gsub(ILLEGAL_REGEXP, "").gsub(ESCAPE_REGEXP, ESCAPE_REPLACEMENTS)
|
117
130
|
end
|
118
131
|
end
|
119
132
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec_junit_formatter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.0.
|
4
|
+
version: 0.3.0.pre4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Cochran
|
@@ -28,7 +28,7 @@ cert_chain:
|
|
28
28
|
bn56+Lu22lsUMYD62lUEdAPyYn1/JLPfq47UEuV1p5gy/f++aTxknsAYE/z/bfmO
|
29
29
|
EkIxoeESVQ0Kqhp754GWYv3Sfmtyk8UbGo5XCZHzvC6h2G7mplPzh6o+Edw=
|
30
30
|
-----END CERTIFICATE-----
|
31
|
-
date: 2017-06-
|
31
|
+
date: 2017-06-14 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rspec-core
|
metadata.gz.sig
CHANGED
Binary file
|