Skip to content

Commit f9b5cc1

Browse files
committed
Merge branch 'main' into support-additional-headers
2 parents 01ce4fa + f6a18d6 commit f9b5cc1

File tree

4 files changed

+39
-9
lines changed

4 files changed

+39
-9
lines changed

.github/workflows/test.yml

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ on:
55
push:
66
tags:
77
- test
8-
branches:
9-
- '*'
10-
pull_request:
118

129
permissions:
1310
id-token: write
@@ -20,6 +17,16 @@ env:
2017
ARM_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
2118

2219
jobs:
20+
lint:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Setup Ruby
25+
uses: ruby/setup-ruby@v1
26+
with:
27+
bundler-cache: true
28+
- name: RuboCop
29+
run: bundle exec rubocop
2330
deploy-infrastructure:
2431
runs-on: ubuntu-latest
2532
if: startsWith(github.ref, 'refs/tags/test')
@@ -113,7 +120,7 @@ jobs:
113120
AZURE_PRINCIPAL_ID: ${{ secrets.AZURE_PRINCIPAL_ID }}
114121
run: bundle exec rake test_azurite
115122

116-
test:
123+
client_test:
117124
runs-on: ubuntu-latest
118125
steps:
119126
- name: Install dependencies
@@ -124,11 +131,32 @@ jobs:
124131
uses: ruby/setup-ruby@v1
125132
with:
126133
bundler-cache: true
127-
- name: Tests
134+
- name: Client tests
135+
env:
136+
AZURE_ACCOUNT_NAME: ${{secrets.AZURE_ACCOUNT_NAME}}
137+
AZURE_ACCESS_KEY: ${{secrets.AZURE_ACCESS_KEY}}
138+
AZURE_PRIVATE_CONTAINER: ${{secrets.AZURE_PRIVATE_CONTAINER}}
139+
AZURE_PUBLIC_CONTAINER: ${{secrets.AZURE_PUBLIC_CONTAINER}}
140+
AZURE_PRINCIPAL_ID: ${{secrets.AZURE_PRINCIPAL_ID}}
141+
run: bundle exec rake test_client
142+
143+
rails_test:
144+
runs-on: ubuntu-latest
145+
steps:
146+
- name: Install dependencies
147+
run: sudo apt-get install -y libvips sqlite3 libsqlite3-dev
148+
- name: Checkout
149+
uses: actions/checkout@v4
150+
- name: Setup ruby
151+
uses: ruby/setup-ruby@v1
152+
with:
153+
bundler-cache: true
154+
- name: Rails tests
128155
env:
129156
AZURE_ACCOUNT_NAME: ${{secrets.AZURE_ACCOUNT_NAME}}
130157
AZURE_ACCESS_KEY: ${{secrets.AZURE_ACCESS_KEY}}
131158
AZURE_PRIVATE_CONTAINER: ${{secrets.AZURE_PRIVATE_CONTAINER}}
132159
AZURE_PUBLIC_CONTAINER: ${{secrets.AZURE_PUBLIC_CONTAINER}}
133160
AZURE_PRINCIPAL_ID: ${{secrets.AZURE_PRINCIPAL_ID}}
134-
run: bundle exec rake test
161+
run: bundle exec rake test_rails
162+

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
## [Unreleased]
22

33
- Add support for additional headers to all endpoints
4+
- Fix typo in class name `AzureBlob::ForbidenError` to `AzureBlob::ForbiddenError`
5+
- Fix proper URI encoding for keys with special characters like question marks
46

57
## [0.5.8] 2025-05-14
68

lib/azure_blob/http.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def inspect
1919
end
2020
end
2121
class FileNotFoundError < Error; end
22-
class ForbidenError < Error; end
22+
class ForbiddenError < Error; end
2323
class IntegrityError < Error; end
2424

2525
include REXML
@@ -94,7 +94,7 @@ def success?
9494

9595
ERROR_MAPPINGS = {
9696
Net::HTTPNotFound => FileNotFoundError,
97-
Net::HTTPForbidden => ForbidenError,
97+
Net::HTTPForbidden => ForbiddenError,
9898
}
9999

100100
ERROR_CODE_MAPPINGS = {

test/client/test_client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def test_read_only_signed_uri
294294
permissions: "r",
295295
expiry: Time.at(Time.now.to_i + EXPIRATION).utc.iso8601,
296296
)
297-
assert_raises(AzureBlob::Http::ForbidenError) do
297+
assert_raises(AzureBlob::Http::ForbiddenError) do
298298
AzureBlob::Http.new(uri, { "x-ms-blob-type": "BlockBlob" }).put(content)
299299
end
300300

0 commit comments

Comments
 (0)