github-graphql 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/github/graphql.rb +2 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9e629e8d8167946aa97d0bae290b2e13368f82bc
4
- data.tar.gz: e39d3eee7f3b1c920da89070e16083d528537c8c
3
+ metadata.gz: e2a1e80140f87cf9aed84e103b233e418c44d37f
4
+ data.tar.gz: d36a972a94a9fce48122b4a0a0e288a120b42751
5
5
  SHA512:
6
- metadata.gz: f7747e6b7be1dc312d0d849d1b765de98fe5f81d78bcf8fec572c09480455bb261ccf050932348715bac0f0d3bea125ba20ec847ed468f66d8344c7575ddedbb
7
- data.tar.gz: 41ba79ce2c8074d66586d008af5dd4ef44764c3c427fd41c1d3d1ee40e9df9b89e47afc071917b65b6bdd1852f621755cd17d888494bf4673dfe515b2d01fbbe
6
+ metadata.gz: 651daf68796686e601fa6212e75dac45ee187a92d4ab7c909b257a0d6bf34f041d1358ed447c216415c86e05b64e81da1236947443de57e037bb55d61e534ac2
7
+ data.tar.gz: d8b23cd44f0cc95228c5912e1adc9e41dc30274513a3c919a7588e4c0b62ee8b5bca1146e681fe8a4d84bed4da624e0f3271095a1eb39ea8f73eb63b45b7a691
@@ -37,7 +37,8 @@ module Github
37
37
  # Will raise an ArgumentError if token is nil
38
38
  #
39
39
  def token(token)
40
- raise ArgumentError, 'Cannot have nil token!', caller if token.nil?
40
+ raise ArgumentError, 'Invalid Token', caller unless
41
+ token =~ /\A[A-Za-z0-9]{40,40}\z/
41
42
  @request['Authorization'] = "bearer #{token}"
42
43
  end
43
44
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-11 00:00:00.000000000 Z
11
+ date: 2017-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json