rj_schema 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/rj_schema/rapidjson/CMakeLists.txt +23 -1
- data/ext/rj_schema/rapidjson/appveyor.yml +49 -1
- data/ext/rj_schema/rapidjson/bin/types/alotofkeys.json +502 -0
- data/ext/rj_schema/rapidjson/bin/unittestschema/idandref.json +69 -0
- data/ext/rj_schema/rapidjson/doc/stream.md +7 -7
- data/ext/rj_schema/rapidjson/doc/stream.zh-cn.md +1 -1
- data/ext/rj_schema/rapidjson/doc/tutorial.md +15 -15
- data/ext/rj_schema/rapidjson/example/schemavalidator/schemavalidator.cpp +2 -0
- data/ext/rj_schema/rapidjson/example/traverseaspointer.cpp +39 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/allocators.h +460 -52
- data/ext/rj_schema/rapidjson/include/rapidjson/document.h +350 -60
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/strfunc.h +14 -0
- data/ext/rj_schema/rapidjson/include/rapidjson/pointer.h +68 -1
- data/ext/rj_schema/rapidjson/include/rapidjson/rapidjson.h +60 -11
- data/ext/rj_schema/rapidjson/include/rapidjson/schema.h +249 -102
- data/ext/rj_schema/rapidjson/include/rapidjson/uri.h +466 -0
- data/ext/rj_schema/rapidjson/test/perftest/perftest.h +5 -4
- data/ext/rj_schema/rapidjson/test/perftest/rapidjsontest.cpp +20 -2
- data/ext/rj_schema/rapidjson/test/unittest/CMakeLists.txt +2 -0
- data/ext/rj_schema/rapidjson/test/unittest/allocatorstest.cpp +193 -1
- data/ext/rj_schema/rapidjson/test/unittest/documenttest.cpp +2 -0
- data/ext/rj_schema/rapidjson/test/unittest/platformtest.cpp +40 -0
- data/ext/rj_schema/rapidjson/test/unittest/pointertest.cpp +62 -2
- data/ext/rj_schema/rapidjson/test/unittest/schematest.cpp +372 -7
- data/ext/rj_schema/rapidjson/test/unittest/uritest.cpp +718 -0
- data/ext/rj_schema/rapidjson/test/unittest/valuetest.cpp +12 -2
- data/ext/rj_schema/rj_schema.cpp +1 -1
- data/lib/rj_schema.rb +1 -1
- metadata +9 -3
@@ -1078,9 +1078,9 @@ static void TestArray(T& x, Allocator& allocator) {
|
|
1078
1078
|
}
|
1079
1079
|
|
1080
1080
|
TEST(Value, Array) {
|
1081
|
+
Value::AllocatorType allocator;
|
1081
1082
|
Value x(kArrayType);
|
1082
1083
|
const Value& y = x;
|
1083
|
-
Value::AllocatorType allocator;
|
1084
1084
|
|
1085
1085
|
EXPECT_EQ(kArrayType, x.GetType());
|
1086
1086
|
EXPECT_TRUE(x.IsArray());
|
@@ -1119,6 +1119,16 @@ TEST(Value, Array) {
|
|
1119
1119
|
z.SetArray();
|
1120
1120
|
EXPECT_TRUE(z.IsArray());
|
1121
1121
|
EXPECT_TRUE(z.Empty());
|
1122
|
+
|
1123
|
+
// PR #1503: assign from inner Value
|
1124
|
+
{
|
1125
|
+
CrtAllocator a; // Free() is not a noop
|
1126
|
+
GenericValue<UTF8<>, CrtAllocator> nullValue;
|
1127
|
+
GenericValue<UTF8<>, CrtAllocator> arrayValue(kArrayType);
|
1128
|
+
arrayValue.PushBack(nullValue, a);
|
1129
|
+
arrayValue = arrayValue[0]; // shouldn't crash (use after free)
|
1130
|
+
EXPECT_TRUE(arrayValue.IsNull());
|
1131
|
+
}
|
1122
1132
|
}
|
1123
1133
|
|
1124
1134
|
TEST(Value, ArrayHelper) {
|
@@ -1481,9 +1491,9 @@ static void TestObject(T& x, Allocator& allocator) {
|
|
1481
1491
|
}
|
1482
1492
|
|
1483
1493
|
TEST(Value, Object) {
|
1494
|
+
Value::AllocatorType allocator;
|
1484
1495
|
Value x(kObjectType);
|
1485
1496
|
const Value& y = x; // const version
|
1486
|
-
Value::AllocatorType allocator;
|
1487
1497
|
|
1488
1498
|
EXPECT_EQ(kObjectType, x.GetType());
|
1489
1499
|
EXPECT_TRUE(x.IsObject());
|
data/ext/rj_schema/rj_schema.cpp
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
#include <ruby.h>
|
14
14
|
#include <ruby/version.h>
|
15
15
|
|
16
|
-
#if (RUBY_API_VERSION_MAJOR > 2 || (RUBY_API_VERSION_MAJOR == 2 && RUBY_API_VERSION_MINOR >= 7)) && defined(__GLIBC__)
|
16
|
+
#if (RUBY_API_VERSION_MAJOR > 2 || (RUBY_API_VERSION_MAJOR == 2 && RUBY_API_VERSION_MINOR >= 7)) && defined(__GLIBC__) && !defined(TRUFFLERUBY)
|
17
17
|
namespace std {
|
18
18
|
static inline void* ruby_nonempty_memcpy(void *dest, const void *src, size_t n) {
|
19
19
|
return ::ruby_nonempty_memcpy(dest, src, n);
|
data/lib/rj_schema.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rj_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Semmler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|
@@ -231,6 +231,7 @@ files:
|
|
231
231
|
- ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/type.json
|
232
232
|
- ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/uniqueItems.json
|
233
233
|
- ext/rj_schema/rapidjson/bin/jsonschema/tox.ini
|
234
|
+
- ext/rj_schema/rapidjson/bin/types/alotofkeys.json
|
234
235
|
- ext/rj_schema/rapidjson/bin/types/booleans.json
|
235
236
|
- ext/rj_schema/rapidjson/bin/types/floats.json
|
236
237
|
- ext/rj_schema/rapidjson/bin/types/guids.json
|
@@ -242,6 +243,7 @@ files:
|
|
242
243
|
- ext/rj_schema/rapidjson/bin/unittestschema/address.json
|
243
244
|
- ext/rj_schema/rapidjson/bin/unittestschema/allOf_address.json
|
244
245
|
- ext/rj_schema/rapidjson/bin/unittestschema/anyOf_address.json
|
246
|
+
- ext/rj_schema/rapidjson/bin/unittestschema/idandref.json
|
245
247
|
- ext/rj_schema/rapidjson/bin/unittestschema/oneOf_address.json
|
246
248
|
- ext/rj_schema/rapidjson/contrib/natvis/LICENSE
|
247
249
|
- ext/rj_schema/rapidjson/contrib/natvis/README.md
|
@@ -321,6 +323,7 @@ files:
|
|
321
323
|
- ext/rj_schema/rapidjson/example/simplereader/simplereader.cpp
|
322
324
|
- ext/rj_schema/rapidjson/example/simplewriter/simplewriter.cpp
|
323
325
|
- ext/rj_schema/rapidjson/example/sortkeys/sortkeys.cpp
|
326
|
+
- ext/rj_schema/rapidjson/example/traverseaspointer.cpp
|
324
327
|
- ext/rj_schema/rapidjson/example/tutorial/tutorial.cpp
|
325
328
|
- ext/rj_schema/rapidjson/include/rapidjson/allocators.h
|
326
329
|
- ext/rj_schema/rapidjson/include/rapidjson/cursorstreamwrapper.h
|
@@ -358,6 +361,7 @@ files:
|
|
358
361
|
- ext/rj_schema/rapidjson/include/rapidjson/schema.h
|
359
362
|
- ext/rj_schema/rapidjson/include/rapidjson/stream.h
|
360
363
|
- ext/rj_schema/rapidjson/include/rapidjson/stringbuffer.h
|
364
|
+
- ext/rj_schema/rapidjson/include/rapidjson/uri.h
|
361
365
|
- ext/rj_schema/rapidjson/include/rapidjson/writer.h
|
362
366
|
- ext/rj_schema/rapidjson/include_dirs.js
|
363
367
|
- ext/rj_schema/rapidjson/library.json
|
@@ -390,6 +394,7 @@ files:
|
|
390
394
|
- ext/rj_schema/rapidjson/test/unittest/jsoncheckertest.cpp
|
391
395
|
- ext/rj_schema/rapidjson/test/unittest/namespacetest.cpp
|
392
396
|
- ext/rj_schema/rapidjson/test/unittest/ostreamwrappertest.cpp
|
397
|
+
- ext/rj_schema/rapidjson/test/unittest/platformtest.cpp
|
393
398
|
- ext/rj_schema/rapidjson/test/unittest/pointertest.cpp
|
394
399
|
- ext/rj_schema/rapidjson/test/unittest/prettywritertest.cpp
|
395
400
|
- ext/rj_schema/rapidjson/test/unittest/readertest.cpp
|
@@ -401,6 +406,7 @@ files:
|
|
401
406
|
- ext/rj_schema/rapidjson/test/unittest/strtodtest.cpp
|
402
407
|
- ext/rj_schema/rapidjson/test/unittest/unittest.cpp
|
403
408
|
- ext/rj_schema/rapidjson/test/unittest/unittest.h
|
409
|
+
- ext/rj_schema/rapidjson/test/unittest/uritest.cpp
|
404
410
|
- ext/rj_schema/rapidjson/test/unittest/valuetest.cpp
|
405
411
|
- ext/rj_schema/rapidjson/test/unittest/writertest.cpp
|
406
412
|
- ext/rj_schema/rapidjson/test/valgrind.supp
|
@@ -742,7 +748,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
742
748
|
- !ruby/object:Gem::Version
|
743
749
|
version: '0'
|
744
750
|
requirements: []
|
745
|
-
rubygems_version: 3.2.
|
751
|
+
rubygems_version: 3.2.22
|
746
752
|
signing_key:
|
747
753
|
specification_version: 4
|
748
754
|
summary: JSON schema validation with RapidJSON
|