agoo 2.11.5 → 2.11.6
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of agoo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/ext/agoo/con.c +4 -4
- data/ext/agoo/doc.c +6 -6
- data/ext/agoo/gqleval.c +4 -4
- data/ext/agoo/gqljson.c +3 -3
- data/ext/agoo/graphql.h +0 -1
- data/ext/agoo/page.c +3 -3
- data/ext/agoo/pub.c +1 -1
- data/ext/agoo/rgraphql.c +12 -9
- data/ext/agoo/rserver.c +2 -2
- data/ext/agoo/sdl.c +10 -9
- data/ext/agoo/sectime.c +5 -5
- data/lib/agoo/version.rb +1 -1
- data/test/graphql_test.rb +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec973e4fdcdde42dc7fa2109e4165f8b6aa7218562c8b650607b61e1eed66f20
|
4
|
+
data.tar.gz: fed893a8ecd3fd01db7ae5620e9f52a55a7c265355a9b0236d750d39d3ff801e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e0b1e3ef863a137dc99e4377f34d2b0597bf6b29c26e778e18b2f626c4faeb991219228e2fbde41f6f6b7d2f8a2f0d80c5f5550c0a07cd7c1d9192365e2ab70
|
7
|
+
data.tar.gz: 294ac4028f17faca961d3f8e5fc26537fc8f2e8c9887ccabccc5e3b5ee8eafad4ab9755b9783c7def1757fdde689aae676820556e12202cece9f63bbc69e03d2
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,16 @@ All changes to the Agoo gem are documented here. Releases follow semantic versio
|
|
4
4
|
|
5
5
|
## [Unreleased]
|
6
6
|
|
7
|
+
## [2.11.6] - [2019-12-??]
|
8
|
+
|
9
|
+
Bug fixes
|
10
|
+
|
11
|
+
### Fixed
|
12
|
+
|
13
|
+
- Missing variable arguments no longer cause a crash.
|
14
|
+
|
15
|
+
- Eliminated the type cast warnings introduced by the Ruby 2.6.5 which uses stricter makefile settings.
|
16
|
+
|
7
17
|
## [2.11.5] - [2019-11-11]
|
8
18
|
|
9
19
|
Alpine
|
data/ext/agoo/con.c
CHANGED
@@ -509,13 +509,13 @@ agoo_con_http_read(agooCon c) {
|
|
509
509
|
if (AGOO_CON_HTTPS == c->bind->kind) {
|
510
510
|
#ifdef HAVE_OPENSSL_SSL_H
|
511
511
|
if (NULL != c->req) {
|
512
|
-
cnt = SSL_read(c->ssl, c->req->msg + c->bcnt, c->req->mlen - c->bcnt);
|
512
|
+
cnt = SSL_read(c->ssl, c->req->msg + c->bcnt, (int)(c->req->mlen - c->bcnt));
|
513
513
|
} else {
|
514
|
-
cnt = SSL_read(c->ssl, c->buf + c->bcnt, sizeof(c->buf) - c->bcnt - 1);
|
514
|
+
cnt = SSL_read(c->ssl, c->buf + c->bcnt, (int)(sizeof(c->buf) - c->bcnt - 1));
|
515
515
|
}
|
516
516
|
if (0 > cnt) {
|
517
517
|
//unsigned long e = ERR_get_error();
|
518
|
-
int e = ERR_get_error();
|
518
|
+
int e = (int)ERR_get_error();
|
519
519
|
|
520
520
|
if (0 == e) {
|
521
521
|
return false;
|
@@ -661,7 +661,7 @@ agoo_con_http_write(agooCon c) {
|
|
661
661
|
}
|
662
662
|
if (AGOO_CON_HTTPS == c->bind->kind) {
|
663
663
|
#ifdef HAVE_OPENSSL_SSL_H
|
664
|
-
if (0 >= (cnt = SSL_write(c->ssl, message->text + c->wcnt, message->len - c->wcnt))) {
|
664
|
+
if (0 >= (cnt = SSL_write(c->ssl, message->text + c->wcnt, (int)(message->len - c->wcnt)))) {
|
665
665
|
unsigned long e = ERR_get_error();
|
666
666
|
|
667
667
|
if (0 == e) {
|
data/ext/agoo/doc.c
CHANGED
@@ -340,7 +340,7 @@ agoo_doc_read_value(agooErr err, agooDoc doc, gqlType type) {
|
|
340
340
|
doc->cur++;
|
341
341
|
start++;
|
342
342
|
agoo_doc_read_token(doc);
|
343
|
-
value = gql_var_create(err, start, doc->cur - start);
|
343
|
+
value = gql_var_create(err, start, (int)(doc->cur - start));
|
344
344
|
break;
|
345
345
|
case '"': {
|
346
346
|
const char *end;
|
@@ -355,7 +355,7 @@ agoo_doc_read_value(agooErr err, agooDoc doc, gqlType type) {
|
|
355
355
|
} else {
|
356
356
|
end = doc->cur - 1;
|
357
357
|
}
|
358
|
-
value = gql_string_create(err, start, end - start);
|
358
|
+
value = gql_string_create(err, start, (int)(end - start));
|
359
359
|
break;
|
360
360
|
}
|
361
361
|
case '-':
|
@@ -377,7 +377,7 @@ agoo_doc_read_value(agooErr err, agooDoc doc, gqlType type) {
|
|
377
377
|
if (doc->cur - start == 4 && 0 == strncmp("null", start, 4)) {
|
378
378
|
value = gql_null_create(err);
|
379
379
|
} else {
|
380
|
-
value = gql_token_create(err, start, doc->cur - start, type);
|
380
|
+
value = gql_token_create(err, start, (int)(doc->cur - start), type);
|
381
381
|
}
|
382
382
|
break;
|
383
383
|
case 't':
|
@@ -385,7 +385,7 @@ agoo_doc_read_value(agooErr err, agooDoc doc, gqlType type) {
|
|
385
385
|
if (doc->cur - start == 4 && 0 == strncmp("true", start, 4)) {
|
386
386
|
value = gql_bool_create(err, true);
|
387
387
|
} else {
|
388
|
-
value = gql_token_create(err, start, doc->cur - start, type);
|
388
|
+
value = gql_token_create(err, start, (int)(doc->cur - start), type);
|
389
389
|
}
|
390
390
|
break;
|
391
391
|
case 'f':
|
@@ -393,7 +393,7 @@ agoo_doc_read_value(agooErr err, agooDoc doc, gqlType type) {
|
|
393
393
|
if (doc->cur - start == 5 && 0 == strncmp("false", start, 5)) {
|
394
394
|
value = gql_bool_create(err, false);
|
395
395
|
} else {
|
396
|
-
value = gql_token_create(err, start, doc->cur - start, type);
|
396
|
+
value = gql_token_create(err, start, (int)(doc->cur - start), type);
|
397
397
|
}
|
398
398
|
break;
|
399
399
|
case '[':
|
@@ -467,7 +467,7 @@ agoo_doc_read_value(agooErr err, agooDoc doc, gqlType type) {
|
|
467
467
|
break;
|
468
468
|
default: // Enum value
|
469
469
|
agoo_doc_read_token(doc);
|
470
|
-
value = gql_token_create(err, start, doc->cur - start, type);
|
470
|
+
value = gql_token_create(err, start, (int)(doc->cur - start), type);
|
471
471
|
break;
|
472
472
|
}
|
473
473
|
return value;
|
data/ext/agoo/gqleval.c
CHANGED
@@ -48,7 +48,7 @@ err_resp(agooRes res, agooErr err, int status) {
|
|
48
48
|
long long frac = (long long)now % 1000000000LL;
|
49
49
|
struct _agooTime at;
|
50
50
|
const char *code = agoo_err_str(err->code);
|
51
|
-
int clen = strlen(code);
|
51
|
+
int clen = (int)strlen(code);
|
52
52
|
|
53
53
|
agoo_sectime(t, &at);
|
54
54
|
cnt = snprintf(buf, sizeof(buf),
|
@@ -488,7 +488,7 @@ eval_post(agooErr err, agooReq req) {
|
|
488
488
|
gqlValue result = NULL;
|
489
489
|
gqlValue j = NULL;
|
490
490
|
|
491
|
-
// TBD handle query parameter and concatenate with body
|
491
|
+
// TBD handle query parameter and concatenate with JSON body variables if present
|
492
492
|
|
493
493
|
op_name = agoo_req_query_value(req, operation_name_str, sizeof(operation_name_str) - 1, &oplen);
|
494
494
|
var_json = agoo_req_query_value(req, variables_str, sizeof(variables_str) - 1, &vlen);
|
@@ -521,14 +521,14 @@ eval_post(agooErr err, agooReq req) {
|
|
521
521
|
goto DONE;
|
522
522
|
}
|
523
523
|
query = s;
|
524
|
-
qlen = strlen(s);
|
524
|
+
qlen = (int)strlen(s);
|
525
525
|
} else if (0 == strcmp("operationName", m->key)) {
|
526
526
|
if (NULL == (s = gql_string_get(m->value))) {
|
527
527
|
agoo_err_set(err, AGOO_ERR_TYPE, "operationName must be an string");
|
528
528
|
goto DONE;
|
529
529
|
}
|
530
530
|
op_name = s;
|
531
|
-
oplen = strlen(s);
|
531
|
+
oplen = (int)strlen(s);
|
532
532
|
} else if (0 == strcmp("variables", m->key)) {
|
533
533
|
gqlLink link;
|
534
534
|
|
data/ext/agoo/gqljson.c
CHANGED
@@ -116,7 +116,7 @@ parse_num(agooErr err, agooDoc doc) {
|
|
116
116
|
if (INT32_MAX < i) {
|
117
117
|
value = gql_i64_create(err, si);
|
118
118
|
} else {
|
119
|
-
value = gql_int_create(err, si);
|
119
|
+
value = gql_int_create(err, (int)si);
|
120
120
|
}
|
121
121
|
} else { // decimal
|
122
122
|
double d = (double)i + (double)num / (double)div;
|
@@ -256,7 +256,7 @@ parse_escaped(agooErr err, agooDoc doc) {
|
|
256
256
|
return NULL;
|
257
257
|
}
|
258
258
|
}
|
259
|
-
value = gql_string_create(err, t->text, t->len);
|
259
|
+
value = gql_string_create(err, t->text, (int)(t->len));
|
260
260
|
doc->cur++; // past trailing "
|
261
261
|
DONE:
|
262
262
|
agoo_text_release(t);
|
@@ -458,7 +458,7 @@ gqlValue
|
|
458
458
|
gql_json_parse(agooErr err, const char *json, size_t len) {
|
459
459
|
struct _agooDoc doc;
|
460
460
|
|
461
|
-
agoo_doc_init(&doc, json, len);
|
461
|
+
agoo_doc_init(&doc, json, (int)(len));
|
462
462
|
|
463
463
|
return parse_value(err, &doc);
|
464
464
|
}
|
data/ext/agoo/graphql.h
CHANGED
data/ext/agoo/page.c
CHANGED
@@ -523,7 +523,7 @@ agoo_page_immutable(agooErr err, const char *path, const char *content, int clen
|
|
523
523
|
}
|
524
524
|
plen = (int)strlen(path);
|
525
525
|
if (NULL != cache.root) {
|
526
|
-
int rlen = strlen(cache.root);
|
526
|
+
int rlen = (int)strlen(cache.root);
|
527
527
|
|
528
528
|
if (0 == strncmp(cache.root, p->path, rlen) && '/' == p->path[rlen]) {
|
529
529
|
rel_path = p->path + rlen + 1;
|
@@ -657,7 +657,7 @@ update_contents(agooPage p) {
|
|
657
657
|
rewind(f);
|
658
658
|
|
659
659
|
if (NULL != cache.root) {
|
660
|
-
int rlen = strlen(cache.root);
|
660
|
+
int rlen = (int)strlen(cache.root);
|
661
661
|
|
662
662
|
if (0 == strncmp(cache.root, path, rlen) && '/' == path[rlen]) {
|
663
663
|
rel_path = path + rlen + 1;
|
@@ -972,7 +972,7 @@ agoo_header_rule(agooErr err, const char *path, const char *mime, const char *ke
|
|
972
972
|
} else if (NULL == (hr->mime = AGOO_STRDUP(mime))) {
|
973
973
|
goto ERROR;
|
974
974
|
}
|
975
|
-
hr->len = strlen(hr->key) + strlen(hr->value) + 4;
|
975
|
+
hr->len = (int)strlen(hr->key) + (int)strlen(hr->value) + 4;
|
976
976
|
hr->next = cache.head_rules;
|
977
977
|
cache.head_rules = hr;
|
978
978
|
|
data/ext/agoo/pub.c
CHANGED
@@ -105,7 +105,7 @@ agoo_pub_dup(agooPub src) {
|
|
105
105
|
if (NULL == src->subject) {
|
106
106
|
p->subject = NULL;
|
107
107
|
} else {
|
108
|
-
p->subject = agoo_subject_create(src->subject->pattern, strlen(src->subject->pattern));
|
108
|
+
p->subject = agoo_subject_create(src->subject->pattern, (int)strlen(src->subject->pattern));
|
109
109
|
}
|
110
110
|
p->msg = src->msg;
|
111
111
|
if (NULL != p->msg) {
|
data/ext/agoo/rgraphql.c
CHANGED
@@ -233,7 +233,7 @@ coerce(agooErr err, gqlRef ref, gqlType type) {
|
|
233
233
|
break;
|
234
234
|
case RUBY_T_STRING:
|
235
235
|
v = ref_to_string(ref);
|
236
|
-
value = gql_string_create(err, rb_string_value_ptr(&v), RSTRING_LEN(v));
|
236
|
+
value = gql_string_create(err, rb_string_value_ptr(&v), (int)RSTRING_LEN(v));
|
237
237
|
break;
|
238
238
|
case RUBY_T_ARRAY: {
|
239
239
|
gqlValue v;
|
@@ -265,7 +265,7 @@ coerce(agooErr err, gqlRef ref, gqlType type) {
|
|
265
265
|
if (i < INT32_MIN || INT32_MAX < i) {
|
266
266
|
value = gql_i64_create(err, i);
|
267
267
|
} else {
|
268
|
-
value = gql_int_create(err, i);
|
268
|
+
value = gql_int_create(err, (int)i);
|
269
269
|
}
|
270
270
|
break;
|
271
271
|
}
|
@@ -282,7 +282,7 @@ coerce(agooErr err, gqlRef ref, gqlType type) {
|
|
282
282
|
}
|
283
283
|
default:
|
284
284
|
v = ref_to_string(ref);
|
285
|
-
value = gql_string_create(err, rb_string_value_ptr(&v), RSTRING_LEN(v));
|
285
|
+
value = gql_string_create(err, rb_string_value_ptr(&v), (int)RSTRING_LEN(v));
|
286
286
|
break;
|
287
287
|
}
|
288
288
|
} else if (GQL_SCALAR == type->kind) {
|
@@ -307,7 +307,7 @@ coerce(agooErr err, gqlRef ref, gqlType type) {
|
|
307
307
|
case GQL_SCALAR_TOKEN:
|
308
308
|
case GQL_SCALAR_ID:
|
309
309
|
v = ref_to_string(ref);
|
310
|
-
value = gql_string_create(err, rb_string_value_ptr(&v), RSTRING_LEN(v));
|
310
|
+
value = gql_string_create(err, rb_string_value_ptr(&v), (int)RSTRING_LEN(v));
|
311
311
|
break;
|
312
312
|
case GQL_SCALAR_TIME: {
|
313
313
|
VALUE clas = rb_obj_class((VALUE)ref);
|
@@ -319,7 +319,7 @@ coerce(agooErr err, gqlRef ref, gqlType type) {
|
|
319
319
|
}
|
320
320
|
case GQL_SCALAR_UUID:
|
321
321
|
v = ref_to_string(ref);
|
322
|
-
value = gql_uuid_str_create(err, rb_string_value_ptr(&v), RSTRING_LEN(v));
|
322
|
+
value = gql_uuid_str_create(err, rb_string_value_ptr(&v), (int)RSTRING_LEN(v));
|
323
323
|
break;
|
324
324
|
case GQL_SCALAR_LIST: {
|
325
325
|
gqlValue v;
|
@@ -347,7 +347,7 @@ coerce(agooErr err, gqlRef ref, gqlType type) {
|
|
347
347
|
}
|
348
348
|
} else if (GQL_ENUM == type->kind) {
|
349
349
|
v = ref_to_string(ref);
|
350
|
-
value = gql_string_create(err, rb_string_value_ptr(&v), RSTRING_LEN(v));
|
350
|
+
value = gql_string_create(err, rb_string_value_ptr(&v), (int)RSTRING_LEN(v));
|
351
351
|
} else {
|
352
352
|
rb_raise(rb_eStandardError, "Can not coerce a non-scalar into a %s.", type->name);
|
353
353
|
}
|
@@ -410,6 +410,9 @@ resolve(agooErr err, gqlDoc doc, gqlRef target, gqlField field, gqlSel sel, gqlV
|
|
410
410
|
} else {
|
411
411
|
v = sa->value;
|
412
412
|
}
|
413
|
+
if (NULL == v) {
|
414
|
+
v = gql_null_create(err);
|
415
|
+
}
|
413
416
|
if (NULL != field) {
|
414
417
|
gqlArg fa;
|
415
418
|
|
@@ -431,7 +434,7 @@ resolve(agooErr err, gqlDoc doc, gqlRef target, gqlField field, gqlSel sel, gqlV
|
|
431
434
|
if (GQL_SUBSCRIPTION == doc->op->kind && RUBY_T_STRING == rb_type(child)) {
|
432
435
|
gqlValue c;
|
433
436
|
|
434
|
-
if (NULL == (c = gql_string_create(err, rb_string_value_ptr(&child), RSTRING_LEN(child))) ||
|
437
|
+
if (NULL == (c = gql_string_create(err, rb_string_value_ptr(&child), (int)RSTRING_LEN(child))) ||
|
435
438
|
AGOO_ERR_OK != gql_object_set(err, result, "subject", c)) {
|
436
439
|
return err->code;
|
437
440
|
}
|
@@ -669,7 +672,7 @@ graphql_load(VALUE self, VALUE sdl) {
|
|
669
672
|
rb_raise(rb_eStandardError, "GraphQL root not set. Use Agoo::GraphQL.schema.");
|
670
673
|
}
|
671
674
|
rb_check_type(sdl, T_STRING);
|
672
|
-
if (AGOO_ERR_OK != sdl_parse(&err, StringValuePtr(sdl), RSTRING_LEN(sdl))) {
|
675
|
+
if (AGOO_ERR_OK != sdl_parse(&err, StringValuePtr(sdl), (int)RSTRING_LEN(sdl))) {
|
673
676
|
rb_raise(rb_eStandardError, "%s", err.msg);
|
674
677
|
}
|
675
678
|
return Qnil;
|
@@ -712,7 +715,7 @@ graphql_load_file(VALUE self, VALUE path) {
|
|
712
715
|
sdl[len] = '\0';
|
713
716
|
}
|
714
717
|
fclose(f);
|
715
|
-
if (AGOO_ERR_OK != sdl_parse(&err, sdl, len)) {
|
718
|
+
if (AGOO_ERR_OK != sdl_parse(&err, sdl, (int)len)) {
|
716
719
|
xfree(sdl);
|
717
720
|
rb_raise(rb_eStandardError, "%s", err.msg);
|
718
721
|
}
|
data/ext/agoo/rserver.c
CHANGED
@@ -412,7 +412,7 @@ header_cb(VALUE key, VALUE value, agooText *tp) {
|
|
412
412
|
}
|
413
413
|
} else {
|
414
414
|
if (vs < end) {
|
415
|
-
*tp = agoo_text_append(*tp, vs, end - vs);
|
415
|
+
*tp = agoo_text_append(*tp, vs, (int)(end - vs));
|
416
416
|
}
|
417
417
|
vlen -= end - vs + 1;
|
418
418
|
vs = end + 1;
|
@@ -995,7 +995,7 @@ handle(VALUE self, VALUE method, VALUE pattern, VALUE handler) {
|
|
995
995
|
if (NULL == t) {
|
996
996
|
rb_raise(rb_eNoMemError, "Failed to allocate memory for a response.");
|
997
997
|
}
|
998
|
-
if (NULL == agoo_page_immutable(&err, pat, t->text, t->len)) {
|
998
|
+
if (NULL == agoo_page_immutable(&err, pat, t->text, (int)t->len)) {
|
999
999
|
rb_raise(rb_eArgError, "%s", err.msg);
|
1000
1000
|
}
|
1001
1001
|
agoo_text_release(t);
|
data/ext/agoo/sdl.c
CHANGED
@@ -867,14 +867,14 @@ sdl_parse(agooErr err, const char *str, int len) {
|
|
867
867
|
case 's': // schema or scalar
|
868
868
|
if (6 < (doc.end - doc.cur) && 'c' == doc.cur[1]) {
|
869
869
|
if ('a' == doc.cur[2]) {
|
870
|
-
if (AGOO_ERR_OK != make_scalar(err, &doc, desc, dlen, extend_next)) {
|
870
|
+
if (AGOO_ERR_OK != make_scalar(err, &doc, desc, (int)dlen, extend_next)) {
|
871
871
|
return err->code;
|
872
872
|
}
|
873
873
|
desc = NULL;
|
874
874
|
dlen = 0;
|
875
875
|
break;
|
876
876
|
} else {
|
877
|
-
if (AGOO_ERR_OK != make_schema(err, &doc, desc, dlen, extend_next)) {
|
877
|
+
if (AGOO_ERR_OK != make_schema(err, &doc, desc, (int)dlen, extend_next)) {
|
878
878
|
return err->code;
|
879
879
|
}
|
880
880
|
desc = NULL;
|
@@ -886,7 +886,7 @@ sdl_parse(agooErr err, const char *str, int len) {
|
|
886
886
|
case 'e': // enum or extend
|
887
887
|
if (4 < (doc.end - doc.cur)) {
|
888
888
|
if ('n' == doc.cur[1]) {
|
889
|
-
if (AGOO_ERR_OK != make_enum(err, &doc, desc, dlen, extend_next)) {
|
889
|
+
if (AGOO_ERR_OK != make_enum(err, &doc, desc, (int)dlen, extend_next)) {
|
890
890
|
return err->code;
|
891
891
|
}
|
892
892
|
desc = NULL;
|
@@ -904,21 +904,21 @@ sdl_parse(agooErr err, const char *str, int len) {
|
|
904
904
|
}
|
905
905
|
return agoo_doc_err(&doc, err, "Unknown directive");
|
906
906
|
case 'u': // union
|
907
|
-
if (AGOO_ERR_OK != make_union(err, &doc, desc, dlen, extend_next)) {
|
907
|
+
if (AGOO_ERR_OK != make_union(err, &doc, desc, (int)dlen, extend_next)) {
|
908
908
|
return err->code;
|
909
909
|
}
|
910
910
|
desc = NULL;
|
911
911
|
dlen = 0;
|
912
912
|
break;
|
913
913
|
case 'd': // directive
|
914
|
-
if (AGOO_ERR_OK != make_directive(err, &doc, desc, dlen)) {
|
914
|
+
if (AGOO_ERR_OK != make_directive(err, &doc, desc, (int)dlen)) {
|
915
915
|
return err->code;
|
916
916
|
}
|
917
917
|
desc = NULL;
|
918
918
|
dlen = 0;
|
919
919
|
break;
|
920
920
|
case 't': // type
|
921
|
-
if (AGOO_ERR_OK != make_type(err, &doc, desc, dlen, extend_next)) {
|
921
|
+
if (AGOO_ERR_OK != make_type(err, &doc, desc, (int)dlen, extend_next)) {
|
922
922
|
return err->code;
|
923
923
|
}
|
924
924
|
desc = NULL;
|
@@ -927,14 +927,14 @@ sdl_parse(agooErr err, const char *str, int len) {
|
|
927
927
|
case 'i': // interface, input
|
928
928
|
if (5 < (doc.end - doc.cur) && 'n' == doc.cur[1]) {
|
929
929
|
if ('p' == doc.cur[2]) {
|
930
|
-
if (AGOO_ERR_OK != make_input(err, &doc, desc, dlen, extend_next)) {
|
930
|
+
if (AGOO_ERR_OK != make_input(err, &doc, desc, (int)dlen, extend_next)) {
|
931
931
|
return err->code;
|
932
932
|
}
|
933
933
|
desc = NULL;
|
934
934
|
dlen = 0;
|
935
935
|
break;
|
936
936
|
} else {
|
937
|
-
if (AGOO_ERR_OK != make_interface(err, &doc, desc, dlen, extend_next)) {
|
937
|
+
if (AGOO_ERR_OK != make_interface(err, &doc, desc, (int)dlen, extend_next)) {
|
938
938
|
return err->code;
|
939
939
|
}
|
940
940
|
desc = NULL;
|
@@ -1001,7 +1001,7 @@ make_sel_arg(agooErr err, agooDoc doc, gqlDoc gdoc, gqlOp op, gqlSel sel) {
|
|
1001
1001
|
break;
|
1002
1002
|
}
|
1003
1003
|
}
|
1004
|
-
if (NULL == var) {
|
1004
|
+
if (NULL == var || NULL == var->value) {
|
1005
1005
|
for (var = gdoc->vars; NULL != var; var = var->next) {
|
1006
1006
|
if (0 == strcmp(var_name, var->name)) {
|
1007
1007
|
break;
|
@@ -1602,6 +1602,7 @@ sdl_parse_doc(agooErr err, const char *str, int len, gqlVar vars, gqlOpKind defa
|
|
1602
1602
|
gqlDoc gdoc = NULL;
|
1603
1603
|
|
1604
1604
|
agoo_doc_init(&doc, str, len);
|
1605
|
+
|
1605
1606
|
if (NULL == (gdoc = gql_doc_create(err))) {
|
1606
1607
|
return NULL;
|
1607
1608
|
}
|
data/ext/agoo/sectime.c
CHANGED
@@ -110,7 +110,7 @@ agoo_sectime(int64_t secs, agooTime at) {
|
|
110
110
|
}
|
111
111
|
}
|
112
112
|
}
|
113
|
-
at->year = (qc - shift) * 400 + c * 100 + qy * 4 + y;
|
113
|
+
at->year = (int)((qc - shift) * 400 + c * 100 + qy * 4 + y);
|
114
114
|
if (leap) {
|
115
115
|
ms = eom_leap_secs;
|
116
116
|
} else {
|
@@ -125,12 +125,12 @@ agoo_sectime(int64_t secs, agooTime at) {
|
|
125
125
|
break;
|
126
126
|
}
|
127
127
|
}
|
128
|
-
at->day = secs / 86400LL;
|
128
|
+
at->day = (int)(secs / 86400LL);
|
129
129
|
secs = secs - (int64_t)at->day * 86400LL;
|
130
130
|
at->day++;
|
131
|
-
at->hour = secs / 3600LL;
|
131
|
+
at->hour = (int)(secs / 3600LL);
|
132
132
|
secs = secs - (int64_t)at->hour * 3600LL;
|
133
|
-
at->min = secs / 60LL;
|
133
|
+
at->min = (int)(secs / 60LL);
|
134
134
|
secs = secs - (int64_t)at->min * 60LL;
|
135
|
-
at->sec = secs;
|
135
|
+
at->sec = (int)secs;
|
136
136
|
}
|
data/lib/agoo/version.rb
CHANGED
data/test/graphql_test.rb
CHANGED
@@ -325,8 +325,8 @@ directive @ruby(class: String!) on SCHEMA | OBJECT
|
|
325
325
|
end
|
326
326
|
|
327
327
|
def test_json_vars_query
|
328
|
-
|
329
|
-
uri = URI('http://localhost:6472/graphql?query={artist(name:"Fazerdaze"){name}}&indent=2&variables={"name":"Fazerdaze"}')
|
328
|
+
uri = URI('http://localhost:6472/graphql?query={artist(name:$name){name}}&indent=2&variables={"name":"Fazerdaze"}')
|
329
|
+
#uri = URI('http://localhost:6472/graphql?query={artist(name:"Fazerdaze"){name}}&indent=2&variables={"name":"Fazerdaze"}')
|
330
330
|
expect = %^{
|
331
331
|
"data":{
|
332
332
|
"artist":{
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: agoo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.11.
|
4
|
+
version: 2.11.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Ohler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|
@@ -188,12 +188,12 @@ signing_key:
|
|
188
188
|
specification_version: 4
|
189
189
|
summary: An HTTP server
|
190
190
|
test_files:
|
191
|
-
- test/
|
192
|
-
- test/bind_test.rb
|
191
|
+
- test/graphql_test.rb
|
193
192
|
- test/hijack_test.rb
|
194
|
-
- test/early_hints_test.rb
|
195
193
|
- test/rack_handler_test.rb
|
196
|
-
- test/
|
194
|
+
- test/base_handler_test.rb
|
197
195
|
- test/log_test.rb
|
198
|
-
- test/graphql_test.rb
|
199
196
|
- test/domain_test.rb
|
197
|
+
- test/early_hints_test.rb
|
198
|
+
- test/bind_test.rb
|
199
|
+
- test/static_test.rb
|