Skip to content

Commit e2955ae

Browse files
author
Eugene
authored
Fix minor issues (#53)
* Fix rubocop linting error * Fix channel export test. * Update Github action
1 parent 0cf43e6 commit e2955ae

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: build
1+
name: test
22

33
on: [pull_request]
44

55
jobs:
6-
build:
6+
test:
77
runs-on: ubuntu-latest
88
strategy:
99
max-parallel: 1
@@ -12,15 +12,14 @@ jobs:
1212
name: Ruby ${{ matrix.ruby }}
1313
steps:
1414
- uses: actions/checkout@v2
15-
- uses: actions/setup-ruby@v1
15+
- uses: ruby/setup-ruby@v1
1616
with:
1717
ruby-version: ${{ matrix.ruby }}
18+
bundler-cache: true
1819

1920
- env:
2021
STREAM_CHAT_API_KEY: ${{ secrets.STREAM_CHAT_API_KEY }}
2122
STREAM_CHAT_API_SECRET: ${{ secrets.STREAM_CHAT_API_SECRET }}
2223
run: |
23-
gem install bundler
24-
bundle install --jobs 4 --retry 3
2524
bundle exec rake rubocop
2625
bundle exec rake test

lib/stream-chat/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ def make_http_request(method, relative_url, params: nil, data: nil)
413413
headers['Authorization'] = @auth_token
414414
headers['stream-auth-type'] = 'jwt'
415415
url = [@base_url, relative_url].join('/')
416-
params = params.nil? ? {} : params
416+
params = {} if params.nil?
417417
params = (get_default_params.merge(params).sort_by { |k, _v| k.to_s }).to_h
418418
url = "#{url}?#{URI.encode_www_form(params)}"
419419

spec/client_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@
364364

365365
it 'should not block messages anymore' do
366366
resp = @channel.send_message({ text: 'put some sugar and fudge on that!' }, @random_user[:id])
367-
puts resp
368367
expect(resp['message']['text']).to eq 'put some sugar and fudge on that!'
369368
end
370369

@@ -414,7 +413,7 @@
414413
if resp['status'] == 'completed'
415414
expect(resp['result']).not_to be_empty
416415
expect(resp['result']['url']).not_to be_empty
417-
expect(resp['error']).not_to be_empty
416+
expect(resp).not_to include 'error'
418417
break
419418
end
420419
sleep(0.5)

0 commit comments

Comments
 (0)