Skip to content

Releases: shakrmedia/gcs-signer

v0.4.1

03 Feb 04:43
Compare
Choose a tag to compare

Changelog

  • Changed path escaping strategy which caused issues for some environments.
  • It now loads environment variables when initializing the GcsSigner object.

v0.4.0

21 Jan 13:34
Compare
Choose a tag to compare

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 and md5.
  • Renamed json_string to keyfile_json which tells more when initializing GcsSigner.
# 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)

06 Sep 05:23
Compare
Choose a tag to compare

Changes

Minor breaking change in GcsSigner#new:

Changed gcs_host(optional) to gcs_url since gcs_host parameter should include URL scheme.

GcsSigner.new(
  gcs_url: "https://storage.googleapis.com"
)

from PR #3 by @relip

v0.2.2: Add response_content_disposition option (#2)

30 Aug 03:12
Compare
Choose a tag to compare
  • Add options: response_content_disposition and response_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"
)

v0.2.0

25 May 07:01
Compare
Choose a tag to compare

Changelog

  • Added an ability to customize GCS host, for people who configured local cache that mirrors GCS. (#1)