github-graphql 1.1.1 → 1.1.2
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 +4 -4
- data/lib/github/graphql.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afed0e342c963c03ff31ec5751f081c29e580048
|
4
|
+
data.tar.gz: 7ed3f2ba22f772a742d0226d9b16721ae9076fa2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9fcf8aabd49a55be437ea9c8d6b3397274204c325926ffad2a2f426cb1a5029353da02e4ddf6d99e3c7620c52a946f4aaa78ac99230a89fdfa456ef07b20541
|
7
|
+
data.tar.gz: 5e723df6044835208180126053c368572bd5328ae137884e502094e3ff6757b9be2ea5e3315cd2541a59b800d477dfb832db240e12b18ebc04eae7d52ded16ec
|
data/lib/github/graphql.rb
CHANGED
@@ -21,10 +21,12 @@ module Github
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def token(token)
|
24
|
+
raise ArgumentError, 'Cannot have nil token!', caller if token.nil?
|
24
25
|
@request['Authorization'] = "bearer #{token}"
|
25
26
|
end
|
26
27
|
|
27
28
|
def payload(query, vars = nil)
|
29
|
+
raise ArgumentError, 'Cannot have nil query!', caller if query.nil?
|
28
30
|
@payload['query'] = query
|
29
31
|
@payload['variables'] = vars
|
30
32
|
@request.body = @payload.to_json
|