graphql-libgraphqlparser 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/README.md +2 -0
- data/Rakefile +1 -1
- data/ext/{libgraphqlparser → graphql_libgraphqlparser_ext}/extconf.rb +1 -1
- data/ext/{libgraphqlparser/libgraphqlparser.c → graphql_libgraphqlparser_ext/graphql_libgraphqlparser_ext.c} +2 -2
- data/ext/{libgraphqlparser/libgraphqlparser.h → graphql_libgraphqlparser_ext/graphql_libgraphqlparser_ext.h} +1 -1
- data/ext/{libgraphqlparser → graphql_libgraphqlparser_ext}/visitor_functions.c +6 -4
- data/ext/{libgraphqlparser → graphql_libgraphqlparser_ext}/visitor_functions.h +0 -0
- data/graphql-libgraphqlparser.gemspec +1 -1
- data/lib/graphql/libgraphqlparser/version.rb +1 -1
- data/lib/graphql/libgraphqlparser.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aaa793720d91c1391df9ad95f858fd4faf02bc3d
|
4
|
+
data.tar.gz: 3d178fb7550204d1ee54dda2d1cf825801ddd922
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84ec2c62e65e44b877d16096d979c238729f467cca30bcd9798597ba546202b3eff2757186d05c7bfe62634a249ff7098d89bd3168838985513e1307dc52b703
|
7
|
+
data.tar.gz: 1717afeaa4ea0d225ef71df670fac24f04a6378b8de4c0887b360a96872fe1e32e9183dde0260ad6a34df2a713128ec443ea4a458e308adcee979efaca4947ba
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -32,6 +32,8 @@ This gem depends on [libgraphqlparser](https://github.com/graphql/libgraphqlpars
|
|
32
32
|
cd libgraphqlparser-0.4.0/ && cmake . && make && make install
|
33
33
|
```
|
34
34
|
|
35
|
+
- With [`heroku-buildpack-libgraphqlparser`](https://github.com/goco-inc/heroku-buildpack-libgraphqlparser)
|
36
|
+
|
35
37
|
Then, install this gem:
|
36
38
|
|
37
39
|
```ruby
|
data/Rakefile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#include "
|
1
|
+
#include "graphql_libgraphqlparser_ext.h"
|
2
2
|
#include "visitor_functions.h"
|
3
3
|
|
4
4
|
#define ATTACH_CALLBACKS(node_name) \
|
@@ -33,7 +33,7 @@ VALUE GraphQL_Libgraphqlparser_parse(VALUE self, VALUE query_string) {
|
|
33
33
|
}
|
34
34
|
|
35
35
|
// Initialize the extension
|
36
|
-
void
|
36
|
+
void Init_graphql_libgraphqlparser_ext() {
|
37
37
|
VALUE GraphQL = rb_define_module("GraphQL");
|
38
38
|
VALUE Libgraphqlparser = rb_define_module_under(GraphQL, "Libgraphqlparser");
|
39
39
|
rb_define_singleton_method(Libgraphqlparser, "builder_parse", GraphQL_Libgraphqlparser_parse, 1);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#include "
|
1
|
+
#include "graphql_libgraphqlparser_ext.h"
|
2
2
|
|
3
3
|
// These macros are a bit janky,
|
4
4
|
// they depend on the function signature
|
@@ -277,10 +277,12 @@ void string_value_end_visit(const struct GraphQLAstStringValue* node, void* buil
|
|
277
277
|
}
|
278
278
|
|
279
279
|
int enum_value_begin_visit(const struct GraphQLAstEnumValue* node, void* builder_ptr) {
|
280
|
-
|
281
|
-
|
282
|
-
VALUE rb_string = rb_str_new2(str_value);
|
280
|
+
const char* str_value;
|
281
|
+
VALUE rb_string;
|
283
282
|
int enc = rb_enc_find_index("UTF-8");
|
283
|
+
BEGIN("Enum");
|
284
|
+
str_value = GraphQLAstEnumValue_get_value(node);
|
285
|
+
rb_string = rb_str_new2(str_value);
|
284
286
|
rb_enc_associate_index(rb_string, enc);
|
285
287
|
rb_funcall(rb_node, name_set_intern, 1, rb_string);
|
286
288
|
return 1;
|
File without changes
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.summary = "Use Libgraphqlparser to parse queries for the GraphQL gem"
|
12
12
|
spec.license = "minitest"
|
13
13
|
|
14
|
-
spec.extensions = ['ext/
|
14
|
+
spec.extensions = ['ext/graphql_libgraphqlparser_ext/extconf.rb']
|
15
15
|
spec.files = `git ls-files -z`.split("\x0")
|
16
16
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
@@ -2,7 +2,7 @@ require 'graphql'
|
|
2
2
|
require 'graphql/libgraphqlparser/builder'
|
3
3
|
require 'graphql/libgraphqlparser/monkey_patches/abstract_node'
|
4
4
|
require 'graphql/libgraphqlparser/version'
|
5
|
-
require_relative '../
|
5
|
+
require_relative '../graphql_libgraphqlparser_ext'
|
6
6
|
|
7
7
|
module GraphQL
|
8
8
|
module Libgraphqlparser
|
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.1.
|
4
|
+
version: 0.1.4
|
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-03-
|
11
|
+
date: 2016-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql
|
@@ -155,7 +155,7 @@ email:
|
|
155
155
|
- rdmosolgo@gmail.com
|
156
156
|
executables: []
|
157
157
|
extensions:
|
158
|
-
- ext/
|
158
|
+
- ext/graphql_libgraphqlparser_ext/extconf.rb
|
159
159
|
extra_rdoc_files: []
|
160
160
|
files:
|
161
161
|
- ".gitignore"
|
@@ -165,11 +165,11 @@ files:
|
|
165
165
|
- README.md
|
166
166
|
- Rakefile
|
167
167
|
- benchmark.rb
|
168
|
-
- ext/
|
169
|
-
- ext/
|
170
|
-
- ext/
|
171
|
-
- ext/
|
172
|
-
- ext/
|
168
|
+
- ext/graphql_libgraphqlparser_ext/extconf.rb
|
169
|
+
- ext/graphql_libgraphqlparser_ext/graphql_libgraphqlparser_ext.c
|
170
|
+
- ext/graphql_libgraphqlparser_ext/graphql_libgraphqlparser_ext.h
|
171
|
+
- ext/graphql_libgraphqlparser_ext/visitor_functions.c
|
172
|
+
- ext/graphql_libgraphqlparser_ext/visitor_functions.h
|
173
173
|
- graphql-libgraphqlparser.gemspec
|
174
174
|
- lib/graphql/libgraphqlparser.rb
|
175
175
|
- lib/graphql/libgraphqlparser/builder.rb
|
@@ -197,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
197
197
|
version: '0'
|
198
198
|
requirements: []
|
199
199
|
rubyforge_project:
|
200
|
-
rubygems_version: 2.
|
200
|
+
rubygems_version: 2.5.1
|
201
201
|
signing_key:
|
202
202
|
specification_version: 4
|
203
203
|
summary: Use Libgraphqlparser to parse queries for the GraphQL gem
|