Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeDupuis committed Nov 1, 2024
1 parent 3b2acd7 commit 9a9b3f9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/azure_blob/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def initialize(account_name:, access_key: nil, principal_id: nil, container:, **
)
end
@signer = using_managed_identities ?
AzureBlob::EntraIdSigner.new(account_name:, host:, principal_id: ) :
AzureBlob::EntraIdSigner.new(account_name:, host:, principal_id:) :
AzureBlob::SharedKeySigner.new(account_name:, access_key:)
end

Expand Down
14 changes: 7 additions & 7 deletions lib/azure_blob/tags.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
require 'rexml/document'
require "rexml/document"

module AzureBlob
class Tags # :nodoc:
def self.from_response response
def self.from_response(response)
document = REXML::Document.new(response)
tags = {}
document.elements.each('Tags/TagSet/Tag') do |tag|
key = tag.elements['Key'].text
value = tag.elements['Value'].text
document.elements.each("Tags/TagSet/Tag") do |tag|
key = tag.elements["Key"].text
value = tag.elements["Value"].text
tags[key] = value
end
new(tags)
Expand All @@ -23,8 +23,8 @@ def headers
{
"x-ms-tags":
@tags.map do |key, value|
%{#{key}=#{value}}
end.join("&")
%(#{key}=#{value})
end.join("&"),
}
end

Expand Down
4 changes: 2 additions & 2 deletions test/client/test_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,10 @@ def test_create_container
end

def test_get_blob_tags
client.create_block_blob(key, content, tags: { tag1: "value 1", "tag 2": "value 2"})
client.create_block_blob(key, content, tags: { tag1: "value 1", "tag 2": "value 2" })

tags = client.get_blob_tags(key)

assert_equal({"tag1" => "value 1", "tag 2" => "value 2"}, tags)
assert_equal({ "tag1" => "value 1", "tag 2" => "value 2" }, tags)
end
end

0 comments on commit 9a9b3f9

Please sign in to comment.