ruby_rnv 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/rnv/ruby_rnv.c +12 -5
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce96c14db6a65519b008b024bdd445baa77d7fd8dc7c4058036069b570137ffc
|
4
|
+
data.tar.gz: ea3d0f24683bc0534c59ed42780e3f09fec6065fa4d45cb338661000d04e9e4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbf7ae9c188ca229dcc96c468dc5cf5b4cade193d49dd65fdc1ad9e1e7fcf124fb7a536c8b0a8a89a6c80706ab5ca94ff5b8a88bb7fa1d97b8376064e26c00d3
|
7
|
+
data.tar.gz: e949052b38a2cece1846fbcb4f365112de0f9674c0e55eb10fd5646f19f61e6034796d8923807736e17b7e8ad5e3081d2aecd60899d6cd6921b3863c516956fa
|
data/ext/rnv/ruby_rnv.c
CHANGED
@@ -470,7 +470,7 @@ static void document_load(document_t *document)
|
|
470
470
|
/*
|
471
471
|
* load schema from a buffer
|
472
472
|
* @param [String] r_str buffer
|
473
|
-
* @return [
|
473
|
+
* @return [Boolean]
|
474
474
|
*/
|
475
475
|
VALUE rb_document_load_string(VALUE self, VALUE r_str)
|
476
476
|
{
|
@@ -490,13 +490,17 @@ VALUE rb_document_load_string(VALUE self, VALUE r_str)
|
|
490
490
|
RSTRING_PTR(r_str), RSTRING_LEN(r_str));
|
491
491
|
|
492
492
|
document_load(document);
|
493
|
-
|
493
|
+
|
494
|
+
if (document->opened)
|
495
|
+
return Qtrue;
|
496
|
+
else
|
497
|
+
return Qfalse;
|
494
498
|
}
|
495
499
|
|
496
500
|
/*
|
497
501
|
* load schema from a file
|
498
502
|
* @param [String] r_fn filename
|
499
|
-
* @return [
|
503
|
+
* @return [Boolean]
|
500
504
|
*/
|
501
505
|
VALUE rb_document_load_file(VALUE self, VALUE r_fn)
|
502
506
|
{
|
@@ -513,7 +517,6 @@ VALUE rb_document_load_file(VALUE self, VALUE r_fn)
|
|
513
517
|
document->rn_st,
|
514
518
|
document->rnd_st,
|
515
519
|
document->fn);
|
516
|
-
|
517
520
|
break;
|
518
521
|
case T_FILE: // TODO
|
519
522
|
default:
|
@@ -522,7 +525,11 @@ VALUE rb_document_load_file(VALUE self, VALUE r_fn)
|
|
522
525
|
}
|
523
526
|
|
524
527
|
document_load(document);
|
525
|
-
|
528
|
+
|
529
|
+
if (document->opened)
|
530
|
+
return Qtrue;
|
531
|
+
else
|
532
|
+
return Qfalse;
|
526
533
|
}
|
527
534
|
|
528
535
|
/*
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_rnv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julien Boulnois
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -148,7 +148,7 @@ files:
|
|
148
148
|
- ext/rnv/src/xsd_tm.h
|
149
149
|
- lib/rnv.rb
|
150
150
|
- lib/rnv/validator.rb
|
151
|
-
homepage:
|
151
|
+
homepage: https://github.com/immateriel/ruby_rnv
|
152
152
|
licenses:
|
153
153
|
- MIT
|
154
154
|
metadata: {}
|
@@ -170,5 +170,5 @@ requirements: []
|
|
170
170
|
rubygems_version: 3.0.8
|
171
171
|
signing_key:
|
172
172
|
specification_version: 4
|
173
|
-
summary: RelaxNG compact syntax validator
|
173
|
+
summary: RelaxNG compact syntax validator for Ruby
|
174
174
|
test_files: []
|