Skip to content

Commit

Permalink
CI: Add ruby 3.4 (#696)
Browse files Browse the repository at this point in the history
  • Loading branch information
ylecuyer authored Dec 28, 2024
1 parent ff86054 commit cf27135
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [2.7, "3.0", 3.1, 3.2, 3.3, head]
ruby: [2.7, "3.0", 3.1, 3.2, 3.3, 3.4, head]

steps:
- name: Checkout repository
Expand Down
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Internal improvements:

Testing improvements:

* Add ruby 3.4 to CI ([696](https://github.com/arsduo/koala/pull/696))

Others:

v3.6.0 (2024-06-27)
Expand Down
24 changes: 18 additions & 6 deletions spec/cases/http_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -238,17 +238,25 @@ def adapter(arg)
it 'logs tokens' do
allow(Koala.config).to receive(:mask_tokens) { false }

expect(Koala::Utils).to receive(:debug).with('STARTED => GET: /foo params: {"an"=>:arg, "access_token"=>"myvisbleaccesstoken"}')
expect(Koala::Utils).to receive(:debug).with('FINISHED => GET: /foo params: {"an"=>:arg, "access_token"=>"myvisbleaccesstoken"}')
expect(Koala::Utils).to receive(:debug) do |log|
expect(log).to match(/STARTED => GET: \/foo params: {"an"\s?=>\s?:arg, "access_token"\s?=>\s?"myvisbleaccesstoken"}/)
end
expect(Koala::Utils).to receive(:debug) do |log|
expect(log).to match(/FINISHED => GET: \/foo params: {"an"\s?=>\s?:arg, "access_token"\s?=>\s?"myvisbleaccesstoken"}/)
end

Koala::HTTPService.make_request(request)
end

it 'doesnt log tokens' do
allow(Koala.config).to receive(:mask_tokens) { true }

expect(Koala::Utils).to receive(:debug).with('STARTED => GET: /foo params: {"an"=>:arg, "access_token"=>"myvisbleac*****token"}')
expect(Koala::Utils).to receive(:debug).with('FINISHED => GET: /foo params: {"an"=>:arg, "access_token"=>"myvisbleac*****token"}')
expect(Koala::Utils).to receive(:debug) do |log|
expect(log).to match(/STARTED => GET: \/foo params: {"an"\s?=>\s?:arg, "access_token"\s?=>\s?"myvisbleac[*]{5}token"}/)
end
expect(Koala::Utils).to receive(:debug) do |log|
expect(log).to match(/FINISHED => GET: \/foo params: {"an"\s?=>\s?:arg, "access_token"\s?=>\s?"myvisbleac[*]{5}token"}/)
end

Koala::HTTPService.make_request(request)
end
Expand All @@ -258,8 +266,12 @@ def adapter(arg)

allow(Koala.config).to receive(:mask_tokens) { true }

expect(Koala::Utils).to receive(:debug).with('STARTED => GET: /debug_token params: {"input_token"=>"myvisiblea*****token", "access_token"=>"myvisiblea*****token"}')
expect(Koala::Utils).to receive(:debug).with('FINISHED => GET: /debug_token params: {"input_token"=>"myvisiblea*****token", "access_token"=>"myvisiblea*****token"}')
expect(Koala::Utils).to receive(:debug) do |log|
expect(log).to match(/STARTED => GET: \/debug_token params: {"input_token"\s?=>\s?"myvisiblea[*]{5}token", "access_token"\s?=>\s?"myvisiblea[*]{5}token"}/)
end
expect(Koala::Utils).to receive(:debug) do |log|
expect(log).to match(/FINISHED => GET: \/debug_token params: {"input_token"\s?=>\s?"myvisiblea[*]{5}token", "access_token"\s?=>\s?"myvisiblea[*]{5}token"}/)
end

Koala::HTTPService.make_request(request)
end
Expand Down

0 comments on commit cf27135

Please sign in to comment.