graphql-libgraphqlparser 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66cc33f8789ca13aa84da1d2931732841943a607
4
- data.tar.gz: c23e932dca62dba848d109d704cc5fdc355e69cc
3
+ metadata.gz: 531be18cb503a27ef9302801f2d0658e2f8fca82
4
+ data.tar.gz: c38554b8988671b157fa0536f58437c0180ac5e4
5
5
  SHA512:
6
- metadata.gz: e426fed71b59bd245b0044f2b69e6d32826a0c5ceca1058c5128d8dda90a87ff8957cbbf8401e0b61d52eecaf026003d84b554cc5636b84e04df49d68875f448
7
- data.tar.gz: d2bbeff1006b1adc1146517e0779d96df4890cbb0ba6185382849de2f75b0201a58d74db2739958ffea0084eaaf09bcdff4f0b8ada22ccfa93931a98509c33bd
6
+ metadata.gz: 4d12023d1a99965dd29493455849509a5a0644d8a0e286bcb31fe270c6ca4c90b6f7394f6c71c04ffce74a51d93e6dde4614c2a6d0b667280c93cece62bc4913
7
+ data.tar.gz: e173be433ad458a047e6bf5e6704c8fe9a061a0392921a41dfb0e4a99f2980bda463ff61dd6bde1789cbf2a44523808d683b18e2dbaf4e57ab972c8fa91fdbdb
@@ -277,15 +277,17 @@ 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
+ BEGIN("Enum");
280
281
  const char* str_value = GraphQLAstEnumValue_get_value(node);
281
282
  VALUE rb_string = rb_str_new2(str_value);
282
283
  int enc = rb_enc_find_index("UTF-8");
283
284
  rb_enc_associate_index(rb_string, enc);
284
- ADD_LITERAL(rb_string);
285
+ rb_funcall(rb_node, name_set_intern, 1, rb_string);
285
286
  return 1;
286
287
  }
287
288
 
288
289
  void enum_value_end_visit(const struct GraphQLAstEnumValue* node, void* builder_ptr) {
290
+ END;
289
291
  }
290
292
 
291
293
  int array_value_begin_visit(const struct GraphQLAstArrayValue* node, void* builder_ptr) {
@@ -48,6 +48,8 @@ module GraphQL
48
48
  current.value = node.values
49
49
  when Nodes::InputObject
50
50
  current.value = node
51
+ when Nodes::Enum
52
+ current.value = node
51
53
  end
52
54
 
53
55
  @ast_stack.push(node)
@@ -14,6 +14,7 @@ module GraphQL
14
14
  end
15
15
  def type; self.of_type; end
16
16
  end
17
+
17
18
  class NonNullType
18
19
  def type=(inner_type)
19
20
  self.of_type = inner_type
@@ -21,8 +22,6 @@ module GraphQL
21
22
  def type; self.of_type; end
22
23
  end
23
24
 
24
-
25
-
26
25
  class ArrayLiteral < AbstractNode
27
26
  attr_reader :values
28
27
 
@@ -1,5 +1,5 @@
1
1
  module GraphQL
2
2
  module Libgraphqlparser
3
- VERSION = '0.1.2'
3
+ VERSION = '0.1.3'
4
4
  end
5
5
  end
@@ -184,7 +184,8 @@ describe GraphQL::Libgraphqlparser do
184
184
  end
185
185
 
186
186
  it "parses enums" do
187
- assert_equal "ENUM_NAME", inputs[4].value
187
+ assert_instance_of GraphQL::Language::Nodes::Enum, inputs[4].value
188
+ assert_equal "ENUM_NAME", inputs[4].value.name
188
189
  end
189
190
 
190
191
  it "parses arrays" do
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.2
4
+ version: 0.1.3
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-02-29 00:00:00.000000000 Z
11
+ date: 2016-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql