graphql-client 0.11.2 → 0.11.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e16a0bd7e5a96cd51a7beaba34c16f42d18b584e
4
- data.tar.gz: 64a8e730f5c3079bdf472b2931165b7c9da27f1a
3
+ metadata.gz: d1f249768903f7c19d50d767cde9477fe3c40856
4
+ data.tar.gz: 533ec338472652dd2c9de670f69eebf5f2acf408
5
5
  SHA512:
6
- metadata.gz: 33f7cf43e6b04b5205eb9bcacc4223b84f0da3abd5bcb140c7c346fa25c64113bf9f977b8777c508963b04764996c39116e9708a452a91601531913e6a2a3934
7
- data.tar.gz: 4722c40b42e578fc3c1943539fa9c1dfe94e3218c87314fde34ee8a4173133943f2f6dd61cad64551c31f512a8494ecff4f42c4a4daff280b38f1281fca0ae3c
6
+ metadata.gz: a8d0ba14057afdeb80ed7a688861b2e69b999dbd753e8354dd0eb66dd7fd57c69984a74d13cb35e64d89211e0e7be0e5e6c5b71576fcec9667242a6ce2537d36
7
+ data.tar.gz: 71d1946d1cc42a397acb3c9ae73f2034c65d1f799927f344c3dcf4341bbb0acb2dcd97089ee6126a2b5b80e4e733da776722bcaf8df6831d7d3bd9c2f9a16bca
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  require "active_support/inflector"
3
+ require "forwardable"
3
4
 
4
5
  module GraphQL
5
6
  class Client
@@ -29,7 +29,7 @@ module GraphQL
29
29
  end
30
30
  str.define_singleton_method("#{value.downcase}?") { true }
31
31
  str.freeze
32
- const_set(value, str)
32
+ const_set(value, str) if value =~ /^[A-Z]/
33
33
  @values[str] = str
34
34
  end
35
35
 
@@ -40,6 +40,10 @@ module GraphQL
40
40
  self
41
41
  end
42
42
 
43
+ def [](value)
44
+ @values[value]
45
+ end
46
+
43
47
  # Internal: Cast JSON value to the enumeration's corresponding constant string instance
44
48
  # with the convenience predicate methods.
45
49
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.2
4
+ version: 0.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-13 00:00:00.000000000 Z
11
+ date: 2017-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport