github-graphql-client 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/github/graphql/client.rb +12 -3
- data/lib/github/graphql/client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d554cfa6de5c73673450deeb6c91fe0087c5dfb2
|
4
|
+
data.tar.gz: 02b76b3473807c6bcd4fb71433f948b8b64f3401
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce152d2af3893e3dc7f9df152848e42fdad530ca8e45b8dc08f04f0f4be1f2fb8a41e0beaeb0c74865996d9442f4e8a2dbf6c4b288ca5b76a5fbdf12e15d8d33
|
7
|
+
data.tar.gz: 19da4af46033b38a22a5c04aa05d81597eba392d5242cfe92b6a812eff109eb95efc3a117fae3ed22a4fca502bfbd18454802489af09ffdec58fde950b84b63b
|
@@ -7,10 +7,19 @@ module GitHub
|
|
7
7
|
URL = 'https://api.github.com/graphql'.freeze
|
8
8
|
|
9
9
|
class Client
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
class HTTP < ::GraphQL::Client::HTTP
|
11
|
+
def initialize(token)
|
12
|
+
@token = token
|
13
|
+
super(GitHub::GraphQL::URL)
|
14
|
+
end
|
15
|
+
|
16
|
+
def headers(context)
|
17
|
+
context.merge({"Authorization" => "bearer #{@token}"})
|
13
18
|
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def initialize(token: )
|
22
|
+
http = ::GitHub::GraphQL::Client::HTTP.new(token)
|
14
23
|
schema = ::GraphQL::Client.load_schema(http)
|
15
24
|
|
16
25
|
@client = ::GraphQL::Client.new(schema: schema, execute: http)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github-graphql-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- takkanm
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql-client
|