Releases: shakrmedia/gcs-signer
Releases · shakrmedia/gcs-signer
v0.4.1
v0.4.0
Changelog
- It won't bother you when you update your ruby to 3.0.0!
- Removed
URI.join
which caused tons of obsolete warnings:
/usr/local/lib/ruby/gems/2.7.0/gems/gcs-signer-0.3.0/lib/gcs_signer.rb:69: warning: URI.escape is obsolete
- Added
Addressable
as an external dependency. - Dropped some options which is not frequently used and sometimes conusing:
content_type
andmd5
. - Renamed
json_string
tokeyfile_json
which tells more when initializingGcsSigner
.
# before
signer = GcsSigner.new json_string: '{ "type": "service_account", ...'
# after
signer = GcsSigner.new keyfile_json: '{ "type": "service_account", ...'
- You can use
GOOGLE_APPLICATION_CREDENTIALS
environment variable to specify the path to the service account json file. - You can now use V4 signing if you prefer longer URL and shorter retention time. (V4 signature has 7 days of maximum duration)
GcsSigner.new.sign_url "bucket", "object", version: :v4
v0.3.0: Change gcs_host to gcs_url (#3)
v0.2.2: Add response_content_disposition option (#2)
- Add options:
response_content_disposition
andresponse_content_type
:
require "gcs-signer"
signer = GcsSigner.new
signer.sign_url(
"test-bucket",
"hello.txt",
response_content_disposition: "attachment; filename=world.txt",
response_content_type: "text/plain"
)