twitch_oauth2 0.1.0
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 +7 -0
- data/.cirrus.yml +32 -0
- data/.editorconfig +17 -0
- data/.gitignore +2 -0
- data/.rspec +3 -0
- data/.rubocop.yml +47 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +101 -0
- data/Rakefile +8 -0
- data/lib/twitch_oauth2/client.rb +121 -0
- data/lib/twitch_oauth2/error.rb +6 -0
- data/lib/twitch_oauth2/version.rb +5 -0
- data/lib/twitch_oauth2.rb +5 -0
- data/twitch_oauth2.gemspec +57 -0
- metadata +230 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 774bd262b409e02731b8d17031f22130f886a821b8042e8eb948e8e6b7137114
|
4
|
+
data.tar.gz: 32afb0a9c9406acc3225d468e9d23245470eaaa40ae94c6d0795d7137bf3a8bf
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6b0220445931a12f5cb271b178ead318674d4a9c9e113758dc8784853e16a3305d1623c6595cf3783d40a84293fe28e60abd537c5f7e33148d4ac70c314d5972
|
7
|
+
data.tar.gz: 28dc850d48767600756bcba6ff1a609f062ff971dd05e39a257a34c8c59892b7069191e7b74ae932de751c6e752297b6de57561e0f8077c7fbfd443a1f725a7b
|
data/.cirrus.yml
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
bundle_cache: &bundle_cache
|
2
|
+
bundle_cache:
|
3
|
+
folder: /usr/local/bundle
|
4
|
+
fingerprint_script:
|
5
|
+
- echo $CIRRUS_OS
|
6
|
+
- ruby -v
|
7
|
+
- cat Gemfile
|
8
|
+
- cat *.gemspec
|
9
|
+
install_script: bundle update
|
10
|
+
|
11
|
+
test_task:
|
12
|
+
container:
|
13
|
+
matrix:
|
14
|
+
image: ruby:2.5
|
15
|
+
image: ruby:2.6
|
16
|
+
image: ruby:2.7
|
17
|
+
<<: *bundle_cache
|
18
|
+
environment:
|
19
|
+
CODECOV_TOKEN: ENCRYPTED[b26ecd3e49540f09f5c9bf830caa29f5daedaf6769d6b1ba1a650eb6e81432ffb857f19421aed8e8dfddf21724fb57b6]
|
20
|
+
test_script: bundle exec rake
|
21
|
+
|
22
|
+
rubocop_task:
|
23
|
+
container:
|
24
|
+
image: ruby:latest
|
25
|
+
<<: *bundle_cache
|
26
|
+
rubocop_script: bundle exec rubocop
|
27
|
+
|
28
|
+
markdown_lint_task:
|
29
|
+
container:
|
30
|
+
image: ruby:latest
|
31
|
+
<<: *bundle_cache
|
32
|
+
rubocop_script: bundle exec mdl .
|
data/.editorconfig
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
root = true
|
2
|
+
|
3
|
+
[*]
|
4
|
+
indent_style = tab
|
5
|
+
indent_size = 2
|
6
|
+
end_of_line = lf
|
7
|
+
charset = utf-8
|
8
|
+
trim_trailing_whitespace = true
|
9
|
+
insert_final_newline = true
|
10
|
+
|
11
|
+
[*.y{a,}ml]
|
12
|
+
indent_style = space
|
13
|
+
indent_size = 2
|
14
|
+
|
15
|
+
[*.md]
|
16
|
+
indent_style = space
|
17
|
+
indent_size = 4
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-performance
|
3
|
+
- rubocop-rspec
|
4
|
+
|
5
|
+
Layout/IndentationStyle:
|
6
|
+
EnforcedStyle: tabs
|
7
|
+
IndentationWidth: 2
|
8
|
+
Layout/IndentationWidth:
|
9
|
+
Width: 1
|
10
|
+
Layout/MultilineMethodCallIndentation:
|
11
|
+
EnforcedStyle: indented
|
12
|
+
Layout/ArgumentAlignment:
|
13
|
+
EnforcedStyle: with_fixed_indentation
|
14
|
+
Layout/SpaceAroundMethodCallOperator:
|
15
|
+
Enabled: true
|
16
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
17
|
+
Enabled: true
|
18
|
+
|
19
|
+
Lint/StructNewOverride:
|
20
|
+
Enabled: true
|
21
|
+
Lint/RaiseException:
|
22
|
+
Enabled: true
|
23
|
+
|
24
|
+
Style/HashEachMethods:
|
25
|
+
Enabled: true
|
26
|
+
Style/HashTransformKeys:
|
27
|
+
Enabled: true
|
28
|
+
Style/HashTransformValues:
|
29
|
+
Enabled: true
|
30
|
+
Style/ExponentialNotation:
|
31
|
+
Enabled: true
|
32
|
+
Style/SlicingWithRange:
|
33
|
+
Enabled: true
|
34
|
+
|
35
|
+
Metrics/BlockLength:
|
36
|
+
Exclude:
|
37
|
+
- '*.gemspec'
|
38
|
+
- spec/**/*.rb
|
39
|
+
|
40
|
+
AllCops:
|
41
|
+
TargetRubyVersion: 2.5
|
42
|
+
|
43
|
+
RSpec/FilePath:
|
44
|
+
CustomTransform:
|
45
|
+
TwitchOAuth2: twitch_oauth2
|
46
|
+
RSpec/NestedGroups:
|
47
|
+
Max: 4
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 Alexander Popov
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
# TwitchOAuth2
|
2
|
+
|
3
|
+
Twitch authentication with OAuth 2.
|
4
|
+
Result tokens can be used for API libraries, chat libraries or something else.
|
5
|
+
|
6
|
+
[Twitch Authentication Documentation]
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
gem 'twitch_oauth2'
|
14
|
+
```
|
15
|
+
|
16
|
+
And then execute:
|
17
|
+
|
18
|
+
```
|
19
|
+
bundle install
|
20
|
+
```
|
21
|
+
|
22
|
+
Or install it yourself as:
|
23
|
+
|
24
|
+
```
|
25
|
+
gem install twitch_oauth2
|
26
|
+
```
|
27
|
+
|
28
|
+
## Usage
|
29
|
+
|
30
|
+
### Initialization
|
31
|
+
|
32
|
+
```ruby
|
33
|
+
require 'twitch_oauth2'
|
34
|
+
|
35
|
+
client = TwitchOAuth2::Client.new(
|
36
|
+
client_id: 'application_client_id',
|
37
|
+
client_secret: 'application_client_secret',
|
38
|
+
scopes: %w[user:read:email bits:read] # default is `nil`
|
39
|
+
redirect_uri: 'application_redirect_uri' # default is `http://localhost`
|
40
|
+
)
|
41
|
+
```
|
42
|
+
|
43
|
+
### Check tokens
|
44
|
+
|
45
|
+
```ruby
|
46
|
+
tokens = previously_saved_tokens
|
47
|
+
# => { access_token: 'abcdef', refresh_token: 'ghikjl' }
|
48
|
+
# Can be empty.
|
49
|
+
|
50
|
+
client.check_tokens **tokens
|
51
|
+
```
|
52
|
+
|
53
|
+
#### The first run
|
54
|
+
|
55
|
+
You can pass nothing to `#check_tokens`, then client will generate new ones.
|
56
|
+
You will be asked to open a Twitch link in a browser and login as user
|
57
|
+
for whom tokens are intended.
|
58
|
+
|
59
|
+
#### Reusing tokens
|
60
|
+
|
61
|
+
Then, if you pass tokens, client will validate them and return themselves
|
62
|
+
or refresh and return new ones.
|
63
|
+
|
64
|
+
### Explicitly refresh tokens
|
65
|
+
|
66
|
+
You can refresh tokens manually:
|
67
|
+
|
68
|
+
```ruby
|
69
|
+
client.refreshed_tokens refresh_token: 'ghikjl'
|
70
|
+
```
|
71
|
+
|
72
|
+
This is used internally in `#check_tokens`, and can be used separately
|
73
|
+
for failed requests to API.
|
74
|
+
|
75
|
+
## Development
|
76
|
+
|
77
|
+
After checking out the repo, run `bundle install` to install dependencies.
|
78
|
+
Then, run `bundle exec rake spec` to run the tests.
|
79
|
+
|
80
|
+
We're using [VCR](https://relishapp.com/vcr/vcr/docs) cassettes
|
81
|
+
with filtered sensitive data, so you don't need for real credentials
|
82
|
+
(like Twitch Client ID and Client Secret) for changing existing methods,
|
83
|
+
but you need for them to add new requests.
|
84
|
+
You can read how to get them [here][Twitch Authentication Documentation].
|
85
|
+
|
86
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
87
|
+
To release a new version, update the version number in `version.rb`,
|
88
|
+
and then run `bundle exec rake release`, which will create a git tag
|
89
|
+
for the version, push git commits and tags, and push the `.gem` file
|
90
|
+
to [rubygems.org](https://rubygems.org).
|
91
|
+
|
92
|
+
## Contributing
|
93
|
+
|
94
|
+
Bug reports and pull requests are welcome on [GitHub](https://github.com/AlexWayfer/twitch_oauth2).
|
95
|
+
|
96
|
+
## License
|
97
|
+
|
98
|
+
The gem is available as open source under the terms of the
|
99
|
+
[MIT License](https://opensource.org/licenses/MIT).
|
100
|
+
|
101
|
+
[Twitch Authentication Documentation]: https://dev.twitch.tv/docs/authentication
|
data/Rakefile
ADDED
@@ -0,0 +1,121 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'faraday'
|
4
|
+
require 'faraday_middleware'
|
5
|
+
require 'securerandom'
|
6
|
+
|
7
|
+
module TwitchOAuth2
|
8
|
+
## Client for making requests
|
9
|
+
class Client
|
10
|
+
CONNECTION = Faraday.new(
|
11
|
+
url: 'https://id.twitch.tv/oauth2/'
|
12
|
+
) do |connection|
|
13
|
+
connection.request :json
|
14
|
+
|
15
|
+
connection.response :dates
|
16
|
+
|
17
|
+
connection.response :json,
|
18
|
+
content_type: /\bjson$/,
|
19
|
+
parser_options: { symbolize_names: true }
|
20
|
+
end.freeze
|
21
|
+
|
22
|
+
def initialize(
|
23
|
+
client_id:, client_secret:, redirect_uri: 'http://localhost', scopes: nil
|
24
|
+
)
|
25
|
+
@client_id = client_id
|
26
|
+
@client_secret = client_secret
|
27
|
+
@redirect_uri = redirect_uri
|
28
|
+
@scopes = scopes
|
29
|
+
|
30
|
+
@state = SecureRandom.alphanumeric(32)
|
31
|
+
end
|
32
|
+
|
33
|
+
def check_tokens(access_token: nil, refresh_token: nil)
|
34
|
+
if access_token
|
35
|
+
validate_result = validate access_token: access_token
|
36
|
+
|
37
|
+
if validate_result[:status] == 401
|
38
|
+
return refreshed_tokens(refresh_token: refresh_token)
|
39
|
+
end
|
40
|
+
|
41
|
+
if validate_result[:expires_in].positive?
|
42
|
+
return { access_token: access_token, refresh_token: refresh_token }
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
flow
|
47
|
+
end
|
48
|
+
|
49
|
+
def refreshed_tokens(refresh_token:)
|
50
|
+
refresh(refresh_token: refresh_token).slice(:access_token, :refresh_token)
|
51
|
+
end
|
52
|
+
|
53
|
+
private
|
54
|
+
|
55
|
+
def flow
|
56
|
+
link = authorize
|
57
|
+
|
58
|
+
puts <<~TEXT
|
59
|
+
1. Open URL in your browser:
|
60
|
+
#{link}
|
61
|
+
2. Login to Twitch.
|
62
|
+
3. Copy the `code` parameter from redirected URL.
|
63
|
+
4. Insert below:
|
64
|
+
TEXT
|
65
|
+
|
66
|
+
code = STDIN.gets.chomp
|
67
|
+
|
68
|
+
token(code: code).slice(:access_token, :refresh_token)
|
69
|
+
end
|
70
|
+
|
71
|
+
def authorize
|
72
|
+
response = CONNECTION.get(
|
73
|
+
'authorize',
|
74
|
+
client_id: @client_id,
|
75
|
+
redirect_uri: @redirect_uri,
|
76
|
+
scope: Array(@scopes).join(' '),
|
77
|
+
response_type: :code
|
78
|
+
)
|
79
|
+
|
80
|
+
location = response.headers[:location]
|
81
|
+
return location if location
|
82
|
+
|
83
|
+
raise Error, response.body[:message]
|
84
|
+
end
|
85
|
+
|
86
|
+
def token(code:)
|
87
|
+
response = CONNECTION.post(
|
88
|
+
'token',
|
89
|
+
client_id: @client_id,
|
90
|
+
client_secret: @client_secret,
|
91
|
+
code: code,
|
92
|
+
grant_type: :authorization_code,
|
93
|
+
redirect_uri: @redirect_uri
|
94
|
+
)
|
95
|
+
|
96
|
+
response.body
|
97
|
+
end
|
98
|
+
|
99
|
+
def validate(access_token:)
|
100
|
+
response = CONNECTION.get(
|
101
|
+
'validate', {}, { 'Authorization' => "OAuth #{access_token}" }
|
102
|
+
)
|
103
|
+
|
104
|
+
response.body
|
105
|
+
end
|
106
|
+
|
107
|
+
def refresh(refresh_token:)
|
108
|
+
response = CONNECTION.post(
|
109
|
+
'token',
|
110
|
+
client_id: @client_id,
|
111
|
+
client_secret: @client_secret,
|
112
|
+
grant_type: :refresh_token,
|
113
|
+
refresh_token: refresh_token
|
114
|
+
)
|
115
|
+
|
116
|
+
return response.body if response.success?
|
117
|
+
|
118
|
+
raise Error, response.body[:message]
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'lib/twitch_oauth2/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'twitch_oauth2'
|
7
|
+
spec.version = TwitchOAuth2::VERSION
|
8
|
+
spec.authors = ['Alexander Popov']
|
9
|
+
spec.email = ['alex.wayfer@gmail.com']
|
10
|
+
|
11
|
+
spec.summary = 'Twitch authentication with OAuth 2.'
|
12
|
+
spec.description = <<~DESC
|
13
|
+
Twitch authentication with OAuth 2.
|
14
|
+
Result tokens can be used for API libraries, chat libraries
|
15
|
+
or something else.
|
16
|
+
DESC
|
17
|
+
spec.license = 'MIT'
|
18
|
+
|
19
|
+
spec.required_ruby_version = '>= 2.5'
|
20
|
+
|
21
|
+
source_code_uri = 'https://github.com/AlexWayfer/twitch_oauth2'
|
22
|
+
|
23
|
+
spec.homepage = source_code_uri
|
24
|
+
|
25
|
+
spec.metadata['source_code_uri'] = source_code_uri
|
26
|
+
|
27
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
28
|
+
|
29
|
+
# TODO: Put your gem's CHANGELOG.md URL here.
|
30
|
+
# spec.metadata["changelog_uri"] = ""
|
31
|
+
|
32
|
+
# Specify which files should be added to the gem when it is released.
|
33
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added
|
34
|
+
# into git.
|
35
|
+
spec.files = Dir.chdir(__dir__) do
|
36
|
+
`git ls-files -z`.split("\x0").reject do |file|
|
37
|
+
file.match(%r{^(test|spec|features)/})
|
38
|
+
end
|
39
|
+
end
|
40
|
+
spec.bindir = 'exe'
|
41
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |file| File.basename(file) }
|
42
|
+
spec.require_paths = ['lib']
|
43
|
+
|
44
|
+
spec.add_dependency 'faraday', '~> 1.0'
|
45
|
+
spec.add_dependency 'faraday_middleware', '~> 1.0'
|
46
|
+
|
47
|
+
spec.add_development_dependency 'codecov', '~> 0.1.0'
|
48
|
+
spec.add_development_dependency 'mdl', '~> 0.9.0'
|
49
|
+
spec.add_development_dependency 'pry-byebug', '~> 3.9'
|
50
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
51
|
+
spec.add_development_dependency 'rspec', '~> 3.9'
|
52
|
+
spec.add_development_dependency 'rubocop', '~> 0.83.0'
|
53
|
+
spec.add_development_dependency 'rubocop-performance', '~> 1.0'
|
54
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 1.0'
|
55
|
+
spec.add_development_dependency 'simplecov', '~> 0.18.0'
|
56
|
+
spec.add_development_dependency 'vcr', '~> 5.1'
|
57
|
+
end
|
metadata
ADDED
@@ -0,0 +1,230 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: twitch_oauth2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Alexander Popov
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-05-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: faraday_middleware
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: codecov
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.1.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.1.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: mdl
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.9.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.9.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry-byebug
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.9'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.9'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '13.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '13.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '3.9'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '3.9'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.83.0
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.83.0
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop-performance
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '1.0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '1.0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rubocop-rspec
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '1.0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '1.0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: simplecov
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 0.18.0
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 0.18.0
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: vcr
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '5.1'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '5.1'
|
181
|
+
description: |
|
182
|
+
Twitch authentication with OAuth 2.
|
183
|
+
Result tokens can be used for API libraries, chat libraries
|
184
|
+
or something else.
|
185
|
+
email:
|
186
|
+
- alex.wayfer@gmail.com
|
187
|
+
executables: []
|
188
|
+
extensions: []
|
189
|
+
extra_rdoc_files: []
|
190
|
+
files:
|
191
|
+
- ".cirrus.yml"
|
192
|
+
- ".editorconfig"
|
193
|
+
- ".gitignore"
|
194
|
+
- ".rspec"
|
195
|
+
- ".rubocop.yml"
|
196
|
+
- Gemfile
|
197
|
+
- LICENSE.txt
|
198
|
+
- README.md
|
199
|
+
- Rakefile
|
200
|
+
- lib/twitch_oauth2.rb
|
201
|
+
- lib/twitch_oauth2/client.rb
|
202
|
+
- lib/twitch_oauth2/error.rb
|
203
|
+
- lib/twitch_oauth2/version.rb
|
204
|
+
- twitch_oauth2.gemspec
|
205
|
+
homepage: https://github.com/AlexWayfer/twitch_oauth2
|
206
|
+
licenses:
|
207
|
+
- MIT
|
208
|
+
metadata:
|
209
|
+
source_code_uri: https://github.com/AlexWayfer/twitch_oauth2
|
210
|
+
homepage_uri: https://github.com/AlexWayfer/twitch_oauth2
|
211
|
+
post_install_message:
|
212
|
+
rdoc_options: []
|
213
|
+
require_paths:
|
214
|
+
- lib
|
215
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
216
|
+
requirements:
|
217
|
+
- - ">="
|
218
|
+
- !ruby/object:Gem::Version
|
219
|
+
version: '2.5'
|
220
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
221
|
+
requirements:
|
222
|
+
- - ">="
|
223
|
+
- !ruby/object:Gem::Version
|
224
|
+
version: '0'
|
225
|
+
requirements: []
|
226
|
+
rubygems_version: 3.1.2
|
227
|
+
signing_key:
|
228
|
+
specification_version: 4
|
229
|
+
summary: Twitch authentication with OAuth 2.
|
230
|
+
test_files: []
|