Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: RSpec

on:
pull_request:

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true

- name: Run RSpec
run: bundle exec rspec
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.0.0
15 changes: 14 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,25 @@ PATH
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.9)
public_suffix (>= 2.0.2, < 8.0)
bigdecimal (4.0.1)
crack (1.0.1)
bigdecimal
rexml
csv (3.3.5)
diff-lcs (1.6.2)
hashdiff (1.2.1)
httparty (0.24.0)
csv
mini_mime (>= 1.0.0)
multi_xml (>= 0.5.2)
json (2.18.0)
json (2.19.2)
mini_mime (1.1.5)
multi_xml (0.8.0)
bigdecimal (>= 3.1, < 5)
public_suffix (7.0.5)
rexml (3.4.4)
rspec (3.13.2)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
Expand All @@ -32,6 +40,10 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.6)
webmock (3.26.2)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)

PLATFORMS
arm64-darwin-25
Expand All @@ -40,6 +52,7 @@ PLATFORMS
DEPENDENCIES
rspec
twitch!
webmock

BUNDLED WITH
2.7.2
2 changes: 1 addition & 1 deletion lib/twitch/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def adapter=(adapter)
def link
scope = ""
@scope.each { |s| scope += s + '+' }
"#{@base_url}/oauth2/authorize?response_type=code&client_id=#{@client_id}&redirect_uri=#{@redirect_uri}&scope=#{scope}"
"https://id.twitch.tv/oauth2/authorize?response_type=code&client_id=#{@client_id}&redirect_uri=#{@redirect_uri}&scope=#{scope}"
end

def app_auth
Expand Down
2 changes: 1 addition & 1 deletion spec/helpers/open_uri_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def self.request(method, url, options={})
if (method == :get)
ret = {}

open(url) do |io|
URI.open(url) do |io|
ret[:body] = JSON.parse(io.read)
ret[:response] = io.status.first.to_i
end
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'rspec'
require 'webmock/rspec'
require 'twitch'

RSpec.configure do |config|
Expand Down
Loading
Loading