Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

d4rky-pl/shrine-google_cloud_storage

 
 

Repository files navigation

Shrine::Storage::GoogleCloudStorage

Provides Google Cloud Storage (GCS) storage for Shrine.

Installation

gem "shrine-google_cloud_storage"

Authentication

The GCS plugin uses Google's Application Default Credentials. Please check documentation for the various ways to provide credentials.

Usage

require "shrine/storage/gcs"

Shrine.storages = {
  cache: Shrine::Storage::GoogleCloudStorage.new(bucket: "cache"),
  store: Shrine::Storage::GoogleCloudStorage.new(bucket: "store"),
}

Contributing

Firstly you need to create an .env file with a dedicated GCS bucket:

# .env
GCS_BUCKET="..."

Warning: all content of the bucket is cleared between tests, create a new one only for this usage!

Afterwards you can run the tests:

$ bundle exec rake test

License

MIT

About

Google Cloud Storage for Shrine

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%