omniauth-twitch 1.0.0 → 1.1.0

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: 5ecadb9a41c29aa7a689c417c0e845cf4f9ecd83
4
- data.tar.gz: abf17ab0748e156b3598286e0dfb465c8f5b503d
3
+ metadata.gz: 498816f5bc8776ea22b24a32581a92a9cb7b787d
4
+ data.tar.gz: 43b2daa8616073edf875802c62e48f838b8962eb
5
5
  SHA512:
6
- metadata.gz: 636af1dd58e652e4f9c5c965d68e37473e71acc0e486d292bf8ac33f60bfbdc43fb6e232b40785ca31dee89c7287e02c93df17c47e98a10323639e57c854d3e5
7
- data.tar.gz: c3d23ce153fb2f355416fb1fe2f0a9e02270ff4dfb015c4e4e4af906e6de24501478444cccf2a46ba6287752b4b2dd86d87aff4813cbed747144bfefde1bd9c8
6
+ metadata.gz: a323dd1b635f0ea9f0b6152a362c89bc0e2da8129b3e2523450dff7806b74f60901cfe5a22e3afabbf302a992172b964cfedfad4db31b74149a9d40da0e364f6
7
+ data.tar.gz: 454998d0e7c829bf16b45e5da503b25412e5aef299c9912f43a6e8cc347bbac764a6bc6a8a217b158b15faa79f576545ac3f639377f8d28e73fae35c3a1d366f
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 Jonathan Gertig
1
+ Copyright (c) 2018 Jonathan Gertig
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -35,31 +35,34 @@ Here's an example *Auth Hash* available in `request.env['omniauth.auth']`:
35
35
  ```ruby
36
36
  {
37
37
  provider: 'twitch',
38
- uid: 12345678,
38
+ uid: '12345678',
39
39
  info: {
40
40
  name: 'JohnDoe',
41
41
  email: 'johndoe@gmail.com',
42
42
  nickname: 'johndoe',
43
43
  description: 'My channel.',
44
44
  image: 'http://static-cdn.jtvnw.net/jtv-static/404_preview-300x300.png',
45
+ urls: {
46
+ Twitch: 'http://www.twitch.tv/johndoe'
47
+ }
45
48
  },
46
49
  credentials: {
47
50
  token: 'asdfghjklasdfghjklasdfghjkl', # OAuth 2.0 access_token, which you may wish to store
48
- expires: false # this will always be false
51
+ expires: false # this will always be false,
52
+ refresh_token: 'asdschbjh24h23yfsjfhbsjdc3a' # OAuth 2.0 refresh token, to renew the access token when it expires
49
53
  },
50
54
  extra: {
51
55
  raw_info: {
52
56
  display_name: 'JohnDoe',
53
- _id: 12345678,
54
- name: 'johndoe',
55
- type: 'user',
56
- bio:"My channel.",
57
- created_at:"2011-07-01T19:46:21Z",
58
- updated_at:"2014-05-06T05:59:37Z",
59
- logo:nil,
60
- _links: { self: 'https://api.twitch.tv/kraken/users/johndoe'},
61
- email:'johdoe@gmail.com',
62
- partnered:false
57
+ id: '12345678',
58
+ login: 'johndoe',
59
+ type: '',
60
+ broadcaster_type: '',
61
+ description: 'My channel.',
62
+ profile_image_url: 'https://static-cdn.jtvnw.net/user-default-pictures/0ecbb6c3-fecb-4016-8115-aa467b7c36ed-profile_image-300x300.jpg',
63
+ offline_image_url: '',
64
+ view_count: 100500,
65
+ email: 'johdoe@gmail.com'
63
66
  }
64
67
  }
65
68
  }
@@ -51,7 +51,8 @@ module OmniAuth
51
51
 
52
52
  def raw_info
53
53
  @raw_info ||=
54
- access_token.get("https://api.twitch.tv/helix/users").parsed.
54
+ access_token.get("https://api.twitch.tv/helix/users",
55
+ headers: { "Client-ID" => client.id }).parsed.
55
56
  fetch("data").fetch(0)
56
57
  end
57
58
 
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Twitch
3
- VERSION = "1.0.0"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -17,8 +17,8 @@ Gem::Specification.new do |spec|
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ["lib"]
19
19
 
20
- spec.add_runtime_dependency 'omniauth-oauth2', '~> 1.1'
20
+ spec.add_runtime_dependency 'omniauth-oauth2', '~> 1.6'
21
21
 
22
- spec.add_development_dependency "bundler", "~> 1.5"
22
+ spec.add_development_dependency "bundler", "~> 2.1"
23
23
  spec.add_development_dependency "rake"
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-twitch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Gertig (Webtheory) and William Holt (Webtheory)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-12 00:00:00.000000000 Z
11
+ date: 2020-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.1'
19
+ version: '1.6'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.1'
26
+ version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.5'
33
+ version: '2.1'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.5'
40
+ version: '2.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement