graphql-libgraphqlparser 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/graphql/libgraphqlparser.rb +1 -1
- data/lib/graphql/libgraphqlparser/version.rb +1 -1
- data/test/graphql/libgraphqlparser_test.rb +12 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fac8a6ed259e6b0267805c9e9a0126d442b67ac8
|
4
|
+
data.tar.gz: 638b73f16772147c6cd09b84d3cce80a14e75606
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6992624a49c006f63cc7192377aebb6e8081a30550414f03f6fc9e6596787068abfb29612fffe83a20ade47eb711259c01c7e3697322c7fe69c8eb73f6d6ab9
|
7
|
+
data.tar.gz: 58206f1dfe44bfa3ac6fb6e33e84fd462d1de7b6ed202ba642d3cc2c7d41f57ddf158616cd6188c0b9054e520b0b01c75228ababa52fba9e6e76570b53c51ba5
|
data/CHANGELOG.md
CHANGED
@@ -14,7 +14,7 @@ module GraphQL
|
|
14
14
|
if index = string.index("\x00")
|
15
15
|
string_before_null = string.slice(0, index)
|
16
16
|
line = string_before_null.count("\n") + 1
|
17
|
-
col = index - string_before_null.rindex("\n") || 0
|
17
|
+
col = index - (string_before_null.rindex("\n") || 0)
|
18
18
|
raise GraphQL::ParseError.new("Invalid null byte in query", line, col, string)
|
19
19
|
end
|
20
20
|
raise
|
@@ -244,9 +244,18 @@ describe GraphQL::Libgraphqlparser do
|
|
244
244
|
err = assert_raises(GraphQL::ParseError) do
|
245
245
|
GraphQL::Libgraphqlparser.parse("mutation{\nsend(message: \"null\x00byte\")\n}")
|
246
246
|
end
|
247
|
-
assert_equal
|
248
|
-
assert_equal err.line
|
249
|
-
assert_equal err.col
|
247
|
+
assert_equal "Invalid null byte in query", err.message
|
248
|
+
assert_equal 2, err.line
|
249
|
+
assert_equal 20, err.col
|
250
|
+
end
|
251
|
+
|
252
|
+
it "raises a parse error in query with null byte and no new line" do
|
253
|
+
err = assert_raises(GraphQL::ParseError) do
|
254
|
+
GraphQL::Libgraphqlparser.parse("mutation{send(message: \"null\x00byte\")}")
|
255
|
+
end
|
256
|
+
assert_equal "Invalid null byte in query", err.message
|
257
|
+
assert_equal 1, err.line
|
258
|
+
assert_equal 28, err.col
|
250
259
|
end
|
251
260
|
end
|
252
261
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql-libgraphqlparser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Mosolgo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql
|